/okx-outcomes
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
$ npx -y skills add okx/agent-skills --skill okx-outcomes --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/okx-outcomes
Context preview
The summary Claude sees to decide when to auto-load this skill.
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
SKILL.md
okx-outcomes.SKILL.mdname: okx-outcomes
description: "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."
license: MIT
metadata:
author: okx
version: "1.4.1"
homepage: "https://www.okx.com"
agent:
requires:
bins: ["okx", "okx-outcomes"]
install:
- id: npm-cli
kind: node
package: "@okx_ai/okx-trade-cli@1.4.1"
bins: ["okx"]
label: "Install okx CLI (npm)"OKX Outcomes CLI
Binary-outcome (YES / NO) event-contract trading via the external `okx-outcomes` binary (formerly OKX Prediction Markets / `okx-predict`), wrapped under `okx outcomes <command>`.
Preflight
1. Run [`../_shared/preflight.md`](../_shared/preflight.md) **Step 1 only** (main CLI auto-upgrade). Steps 2 and 3 (OAuth/API-key detection, version drift) do **not** apply — Outcomes markets use an independent credential set. 2. Confirm `okx-outcomes` binary is reachable:
okx outcomes status
If you see `Error: okx-outcomes binary not found in PATH`, install it first (see Prerequisites).
Prerequisites
# 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
Configuration is stored in `~/.okx-outcomes/config.json` (non-secret) and the OS keyring (secrets; encrypted `~/.okx-outcomes/keyring.enc` fallback). There is **no `.env` auto-loading** — `PREDICTIONS_*` environment variables, if set, only override the stored values.
Environment variables (optional overrides)
| Var | Used for | Notes | |---|---|---| | `PREDICTIONS_AGENT_PRIVATE_KEY` | On-chain writes (clob create-order / cancel / ctf *) | secp256k1 hex. Normally generated by `okx outcomes setup` and stored in the keyring — this env var only **overrides** it. NEVER share or print. | | `PREDICTIONS_API_BASE` | REST host override | Defaults to the region picked during setup | | `OKX_OUTCOMES_BIN` | Binary path override | Useful for local dev builds |
> **Security**: NEVER accept the signing private key in chat. The wallet is created by `okx outcomes setup` / `setup bind` and stored in the keyring. If the user pastes a key anyway, refuse and tell them to revoke / rotate it.
> **Naming note**: env vars still use the `PREDICTIONS_*` prefix (upstream legacy naming) even after the product rebrand to OKX Outcomes.
Authentication paths
Outcomes markets use OKX **OAuth sign-in** for authenticated reads and an **EIP-712 signing key** for on-chain writes. These are **not** related to the main `okx` CLI's OAuth / API-key flow — do NOT call `okx auth login` for outcomes; outcomes has its own `okx outcomes auth login`.
| Operation class | Example commands | Credential | |---|---|---| | Public data | `data events/event/market/ticker/candles`, `clob price/prices/midpoint/spread/book/books` | none | | Authenticated reads | `account balance/order/orders/positions/trades` (closed = `positions --status closed`), `search`, `status` | OAuth session (`okx outcomes auth login`) | | On-chain writes | `clob create-order / market-order / cancel-oid / cancel-all / heartbeat`, `ctf split / merge / redeem`, `wallet show` | signing key (keyring `agent_private_key`, or `PREDICTIONS_AGENT_PRIVATE_KEY`) |
Setup & Onboarding
Setup can be completed **entirely from the agent — no terminal required**. The user only ever acts in a **browser** (open a URL + enter a code, and open a bind **short link** — which launches the OKX app on a phone, or opens a web fallback in any browser); the agent runs every command.
First-time setup has **three pieces, in dependency order**: (1) region, (2) OAuth sign-in, (3) EOA wallet binding. Detect progress with:
okx outcomes setup status --json
# → { "region": {...}, "oauth": {...}, "eoa_binding": {...}, "next_step": "...", "complete": false }Then advance the `next_step`:
1. **Region** — `okx outcomes setup region <global|us>` (non-interactive; agent runs it). 2. **OAuth sign-in (device-code)** — `okx outcomes auth login --manual --json`. This prints a one-line `{verificationUri, userCode, expiresIn}` envelope and **exits immediately** (it does not block or read stdin). Relay it to the user: *"Open `<verificationUri>` on any device and enter code `<userCode>` (valid ~N min)."* After they authorize in the browser, verify with `okx outcomes auth refresh --json` (writes the session marker on success) — poll a few times with backoff, or run once after the user says they're done. 3. **Wallet binding** — `okx outcomes setup bind -
Read more
name: okx-outcomes
description: "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."
license: MIT
metadata:
author: okx
version: "1.4.1"
homepage: "https://www.okx.com"
agent:
requires:
bins: ["okx", "okx-outcomes"]
install:
- id: npm-cli
kind: node
package: "@okx_ai/okx-trade-cli@1.4.1"
bins: ["okx"]
label: "Install okx CLI (npm)"OKX Outcomes CLI
Binary-outcome (YES / NO) event-contract trading via the external `okx-outcomes` binary (formerly OKX Prediction Markets / `okx-predict`), wrapped under `okx outcomes <command>`.
Preflight
1. Run [`../_shared/preflight.md`](../_shared/preflight.md) **Step 1 only** (main CLI auto-upgrade). Steps 2 and 3 (OAuth/API-key detection, version drift) do **not** apply — Outcomes markets use an independent credential set. 2. Confirm `okx-outcomes` binary is reachable:
okx outcomes status
If you see `Error: okx-outcomes binary not found in PATH`, install it first (see Prerequisites).
Prerequisites
# 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
Configuration is stored in `~/.okx-outcomes/config.json` (non-secret) and the OS keyring (secrets; encrypted `~/.okx-outcomes/keyring.enc` fallback). There is **no `.env` auto-loading** — `PREDICTIONS_*` environment variables, if set, only override the stored values.
Environment variables (optional overrides)
| Var | Used for | Notes | |---|---|---| | `PREDICTIONS_AGENT_PRIVATE_KEY` | On-chain writes (clob create-order / cancel / ctf *) | secp256k1 hex. Normally generated by `okx outcomes setup` and stored in the keyring — this env var only **overrides** it. NEVER share or print. | | `PREDICTIONS_API_BASE` | REST host override | Defaults to the region picked during setup | | `OKX_OUTCOMES_BIN` | Binary path override | Useful for local dev builds |
> **Security**: NEVER accept the signing private key in chat. The wallet is created by `okx outcomes setup` / `setup bind` and stored in the keyring. If the user pastes a key anyway, refuse and tell them to revoke / rotate it.
> **Naming note**: env vars still use the `PREDICTIONS_*` prefix (upstream legacy naming) even after the product rebrand to OKX Outcomes.
Authentication paths
Outcomes markets use OKX **OAuth sign-in** for authenticated reads and an **EIP-712 signing key** for on-chain writes. These are **not** related to the main `okx` CLI's OAuth / API-key flow — do NOT call `okx auth login` for outcomes; outcomes has its own `okx outcomes auth login`.
| Operation class | Example commands | Credential | |---|---|---| | Public data | `data events/event/market/ticker/candles`, `clob price/prices/midpoint/spread/book/books` | none | | Authenticated reads | `account balance/order/orders/positions/trades` (closed = `positions --status closed`), `search`, `status` | OAuth session (`okx outcomes auth login`) | | On-chain writes | `clob create-order / market-order / cancel-oid / cancel-all / heartbeat`, `ctf split / merge / redeem`, `wallet show` | signing key (keyring `agent_private_key`, or `PREDICTIONS_AGENT_PRIVATE_KEY`) |
Setup & Onboarding
Setup can be completed **entirely from the agent — no terminal required**. The user only ever acts in a **browser** (open a URL + enter a code, and open a bind **short link** — which launches the OKX app on a phone, or opens a web fallback in any browser); the agent runs every command.
First-time setup has **three pieces, in dependency order**: (1) region, (2) OAuth sign-in, (3) EOA wallet binding. Detect progress with:
okx outcomes setup status --json
# → { "region": {...}, "oauth": {...}, "eoa_binding": {...}, "next_step": "...", "complete": false }Then advance the `next_step`:
1. **Region** — `okx outcomes setup region <global|us>` (non-interactive; agent runs it). 2. **OAuth sign-in (device-code)** — `okx outcomes auth login --manual --json`. This prints a one-line `{verificationUri, userCode, expiresIn}` envelope and **exits immediately** (it does not block or read stdin). Relay it to the user: *"Open `<verificationUri>` on any device and enter code `<userCode>` (valid ~N min)."* After they authorize in the browser, verify with `okx outcomes auth refresh --json` (writes the session marker on success) — poll a few times with backoff, or run once after the user says they're done. 3. **Wallet binding** — `okx outcomes setup bind -
A collection of AI agent skills for OKX exchange operations. Each skill is a self-contained Markdown file with YAML frontmatter that tells an AI agent when to activate and how to execute tasks via the okx CLI.
Other skills on okx-agent-skills.
- /earn-hunter
Automatically monitors OKX Flash Earn, Fixed Earn and Flexible Earn opportunities, sends push notifications, and guides subscription. 自动监控 OKX 闪赚、定期和活期赚币机会,推送通知并引导申购。Use when user says: 有闪赚通知我, 监控赚币, monitor earn, notify me about earn, 定时检查理财, 执行 earn-hunter 扫描, earn-hunter
Open skill - /okx-cex-auth
Use this skill when the user wants to 'login/log in/sign in', 'authenticate', 'authorize', 'connect OKX account', 'set up credentials', 'first time setup', 'configure okx', '登录', '授权', '认证', '连接账户', '首次配置'. Also when any OKX CLI command fails with an auth error: 'Run okx auth
Open skill - /okx-cex-bot
Manage Grid bots (spot/contract/coin-margined) and DCA Martingale bots (Spot DCA 现货马丁 / Contract DCA 合约马丁) on OKX. Covers create, stop, amend, monitor P&L, TP/SL, margin/investment adjustment, and AI-recommended parameters. Requires API credentials. Not for regular orders
Open skill - /okx-cex-earn
Manages OKX Simple Earn (flexible savings/lending), Flash Earn, On-chain Earn (staking/DeFi), Dual Investment (DCD/双币赢), and AutoEarn (自动赚币) via the okx CLI. Use this skill whenever the user wants to check earn balances, browse flash-earn projects, subscribe or redeem earn
Open skill - /okx-cex-market
Use this skill when the user asks for: price of any asset, ticker, order book, candles, OHLCV, funding rate, open interest, OI change scanner, market screener (top movers, high-volume, newly listed), mark price, index price, recent trades, instrument list, stock tokens, metals
Open skill - /okx-cex-portfolio
This skill should be used when the user asks about 'account balance', 'how much USDT do I have', 'my funding account', 'show my positions', 'open positions', 'position P&L', 'unrealized PnL', 'closed positions', 'position history', 'realized PnL', 'account bills', 'transaction
Open skill

