Skip to content
Finance
Skill

/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

From plugin
okx-agent-skills
16011 skills
Install
$ npx -y skills add okx/agent-skills --skill okx-outcomes --agent claude-code

How 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.md
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 -

Read more
Ships withokx-agent-skills

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.

Get the whole plugin
Stats
162
Stars
26
Forks
Active
Maintenance
Shell
Language
MIT
License
27d ago
Last commit
5mo ago
Created

Repo: okx/agent-skills

Other skills on okx-agent-skills.