Loading...
Loading...
Use this skill for OKX Outcomes markets (YES/NO event contracts, formerly OKX Predictions) via the okx-outcomes binary. Triggers: 'list prediction events', '预测市场', 'event detail', 'place prediction order', '预测下单', 'buy YES', 'buy NO', '撤单 预测', 'split xp', '拆分 xp', 'merge YES NO', '赎回 预测', 'prediction positions', '预测持仓', 'live prediction price', '预测行情', 'OHLCV candles', 'K线', 'CTF', 'polymarket'. Auth: OAuth sign-in via 'okx outcomes auth login'; writes need a signing key configured by 'okx outcomes setup'. Do NOT use for OKX CEX event contracts (use okx-cex-trade event), spot/swap/futures (okx-cex-trade), crypto market data (okx-cex-market), or CEX portfolio (okx-cex-portfolio). Namespace required: account: balance/positions/order/orders/trades; clob: price/prices/midpoint/midpoints/spread/spreads/book/books; data: events/event/event-markets/market/trending/ticker/candles; ctf: split/merge/redeem; wallet: show; auth: login/refresh/status; setup: status/region/bind.
npx skill4agent add okx/agent-skills okx-outcomesokx-outcomesokx-predictokx outcomes <command>../_shared/preflight.mdokx-outcomesokx outcomes statusError: okx-outcomes binary not found in PATH# 1. Main OKX CLI (provides the `okx outcomes` wrapper command)
npm install -g @okx_ai/okx-trade-cli
# 2. Outcomes binary
# macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/okx/outcomes-cli/main/install.sh | sh
# Windows: download okx-outcomes.exe from https://github.com/okx/outcomes-cli/releases
# and place it on your PATH.
# 3. First-time setup — sign in + bind wallet.
# In a real terminal you can run the full interactive wizard:
okx outcomes setup
# In an agent / chat context, drive it step-by-step instead — see
# "Setup & Onboarding" below (the full wizard needs a TTY and cannot be
# spawned from an agent).
# 4. Verify
okx outcomes status~/.okx-outcomes/config.json~/.okx-outcomes/keyring.enc.envPREDICTIONS_*| Var | Used for | Notes |
|---|---|---|
| On-chain writes (clob create-order / cancel / ctf *) | secp256k1 hex. Normally generated by |
| REST host override | Defaults to the region picked during setup |
| Binary path override | Useful for local dev builds |
Security: NEVER accept the signing private key in chat. The wallet is created by/okx outcomes setupand stored in the keyring. If the user pastes a key anyway, refuse and tell them to revoke / rotate it.setup bind
Naming note: env vars still use theprefix (upstream legacy naming) even after the product rebrand to OKX Outcomes.PREDICTIONS_*
okxokx auth loginokx outcomes auth login| Operation class | Example commands | Credential |
|---|---|---|
| Public data | | none |
| Authenticated reads | | OAuth session ( |
| On-chain writes | | signing key (keyring |
okx outcomes setup status --json
# → { "region": {...}, "oauth": {...}, "eoa_binding": {...}, "next_step": "...", "complete": false }next_stepokx outcomes setup region <global|us>okx outcomes auth login --manual --json{verificationUri, userCode, expiresIn}<verificationUri><userCode>okx outcomes auth refresh --jsonokx outcomes setup bind --jsonaddressdeeplinkhttps://okx.com/ul/3OauBX?eoa=<eoa>&uid=<uid>eoauidaddresssetup bind --keepsetup bind我刚为你新生成了一个签名钱包(私钥保存在本地 keyring,永远不会展示)。
请在手机上打开下面的短链接,在 OKX App 中批准绑定这个新钱包:
新钱包地址:<address>
绑定短链:<short link>
(也可以把短链复制到浏览器打开。如果打不开,请复制上面的新钱包地址,
在 OKX App 里手动绑定:Outcomes → Profile → Settings → API 绑定钱包,
把钱包地址粘贴进去。)
⚠️ 关于这个钱包:
• 它只用来给你的交易做签名授权,不是一个充值钱包。
• 不要往这个地址转任何币 —— 余额在你的 OKX 账户里,转到这个地址的资金无法使用、大概率找不回。
• 地址可以公开(用于绑定),但它背后的私钥永远不要外泄。
在 App 中批准后告诉我。I just generated a fresh signing wallet for you (the private key
stays in the local keyring and is never displayed). Open this short
link on your phone — it'll launch the OKX app to approve binding
this new wallet:
New wallet address: <address>
Binding short link: <short link>
(You can also copy the link into any browser. If the link won't open,
copy the wallet address above and bind it manually in the OKX app:
Outcomes → Profile → Settings → API Bind Wallet.)
⚠️ About this wallet:
• It's only used to sign your trade authorizations — it is NOT a deposit wallet.
• Do NOT send any crypto/tokens to this address. Your balance lives in your
OKX account; funds sent here are unusable and likely unrecoverable.
• The address is fine to share (it's used for binding), but the private key
behind it must never be exposed.
Tell me when you've approved it in the app.addresssetup status --jsonokx outcomes statuscomplete: trueokx outcomessetup statussetup regionauth login --manual --jsonauth refreshauth statussetup bindokx outcomes setupokx outcomes shellThe plain(nookx outcomes auth login) is the interactive/browser-foreground variant for a user at a real terminal; agents must use--manual.--manual
okx-cex-tradeokx event ...okx-cex-tradeokx-cex-marketokx-cex-portfolio# Health check
okx outcomes status
# Browse active events
okx outcomes data events --status active --limit 10
# Drill into one event with all its markets (returns YES + NO asset ids per market)
okx outcomes data event-markets <eventId>
# Live price for a YES outcome
okx outcomes clob price --asset <yesAssetId>
# Top-of-book depth
okx outcomes clob book --asset <yesAssetId> --sz 5
# My account balance / positions
okx outcomes account balance
okx outcomes account positions
# Place an order (ALWAYS dry-run first — see Operation Flow)
okx outcomes clob create-order --asset <assetId> --side buy --price 0.55 --size 100Flag placement: put flags after the subcommand () or before the module (okx outcomes events --json).okx --json outcomes events— a flag wedged between the module and its subcommand — is not supported.okx outcomes --json events
| # | Command | Auth | Description |
|---|---|---|---|
| 1 | | none | List outcome events |
| 2 | | none | Single event detail |
| 3 | | none | Event + all its markets (includes YES/NO asset ids) |
| 4 | | none | Single market detail |
| 5 | | none | Trending events |
| 6 | | none | 24h ticker for one outcome asset |
| 7 | | none | OHLCV candles |
| 8 | | OAuth | Keyword search |
| 9 | | none | Trimmed price (last/bid/ask/mid/spread) |
| 10 | | none | Batch price view |
| 11 | | none | (bid+ask)/2 |
| 12 | | none | Bid/ask spread |
| 13 | | none | Multi-level depth (default sz=10, max 400) |
| 14 | | OAuth | Account balance |
| 15 | | OAuth | Single order detail |
| 16 | | OAuth | Open orders |
| 17 | | OAuth | Open positions (look for status="Won" → redeem) |
| 18 | | OAuth | Closed positions + realized PnL |
| 19 | | OAuth | Trade history |
| 20 | | signing | Derived wallet address |
| 21 | | OAuth | Health check |
| 22 | | none | OAuth session state |
| 23 | | none | Onboarding progress (region/oauth/binding) |
| Command | Auth | Description | Agent-runnable? |
|---|---|---|---|
| none | Set region (step 1) | ✅ yes |
| none | OAuth device-code (step 2): prints | ✅ yes (relay URL+code to user) |
| none | Verify/refresh session after the user authorizes (writes session marker) | ✅ yes |
| signing | Bind EOA wallet (step 3): prints address + a short link ( | ✅ yes (user opens the short link, or copies the address to bind manually) |
| none | Interactive/browser-foreground sign-in (for a user at a real terminal) | 🚫 needs a TTY |
| — | Full interactive wizard / REPL | 🚫 needs a TTY |
| # | Command | Risk |
|---|---|---|
| 24 | | High |
| 25 | | High (immediate cross) |
| 26 | | Medium |
| 27 | | High |
| 28 | | Medium (5-min dead-man auto cancel-all) |
| 29 | | High (locks xp) |
| 30 | | High |
| 31 | | High (burns full winning balance) |
Aliases:delegate to the correspondingclob order/orders/tradescommands. Preferaccount *in skill output for clarity.account *
okx outcomes status --jsoncurl -fsSL https://raw.githubusercontent.com/okx/outcomes-cli/main/install.sh | shstatusokx outcomes auth status --jsonauth loginokx outcomes auth status --jsonclob create-orderclob market-orderclob cancel-*clob cancel-allctf *About to execute: okx outcomes clob create-order --asset 100888000 --side buy --price 0.55 --size 100
Market : "Will BTC be above $100k by Dec 31, 2026?" (mkt_t001)
Asset : 100888000 (YES outcome)
Side : buy
Price : 0.55 xp
Size : 100 shares
TIF : gtc
Estimated notional: 55.00 xp
Wallet : 0x1234...abcd (from `wallet show`)
Available (spots): 1,234.56 xp (from `account balance`)
Reply "confirm" to execute, or "cancel" to abort.okx outcomes data market <marketId>marketIdassetIdevent-markets <eventId>price * sizeokx outcomes wallet show --jsonokx outcomes account balance --jsonoddsType="spots"availableconfirmokx outcomes account orders --json # confirm order placed / cancelled
okx outcomes account positions --json # confirm position change (for ctf)references/setup-auth.mdreferences/data-commands.mdreferences/account-commands.mdreferences/clob-commands.mdreferences/ctf-commands.mdreferences/workflows.mdokx outcomes <command>okx-outcomescurl -fsSL https://raw.githubusercontent.com/okx/outcomes-cli/main/install.sh | shclob create-ordermarket-orderctf *okx outcomes setup bind --jsondeeplinkhttps://okx.com/ul/3OauBX?eoa=…&uid=…clob price/book/create-order/market-orderassetIdctf *account trades --marketmarketIdevent-markets <eventId>--tif gtd--expirygtc--size-type quotebuy + ioccreate-orderclob market-order --tif fok--size--tif iocokx outcomes status--json--json--json[0,1]PREDICTIONS_AGENT_PRIVATE_KEY0x0x****--side buy--side sellaccount trades --sideBUYSELL429okx outcomes <cmd>okx-outcomesokx/outcomes-cli docs/cli-reference.mdOKX_OUTCOMES_BINcargo build --release