From okxoutcomes
Read-only OKX Outcomes driver. Use whenever the user wants to: browse prediction events (list / filter / trending), fetch event or market detail, search events by keyword, look up tickers / candles (K-line / OHLC), query CLOB midpoint / spread / multi-level book, watch live public WebSocket streams (prices / books / trades / tickers / event-status settlement / candles). Triggers include: '列事件', '热门事件', '事件详情', '市场详情', '行情快照', 'K线', '蜡烛图', '盘口', '订单簿', '中价', '价差', '实时价', '盯盘', '搜事件', 'browse prediction events', 'trending', 'event detail', 'market detail', 'ticker', 'candles', 'OHLC', 'order book', 'depth', 'midpoint', 'spread', 'live prices', 'live order book', 'WS prices', 'WS books', 'WS trades', 'search events'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/okxoutcomes:okx-outcomes-marketThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Drive the read-only side of the `okx-outcomes` Rust CLI: events,
Drive the read-only side of the okx-outcomes Rust CLI: events,
markets, candles, CLOB quotes / book, public WebSocket streams.
Binary on PATH
command -v okx-outcomes || echo "NOT_INSTALLED"
If missing: cargo install --locked --path .
or download the prebuilt binary.
No credentials needed. Every command in this skill — data,
search, clob reads (price / midpoint / spread / book), and public
ws streams — hits public, unauthenticated endpoints, so there is
nothing to set up here and no sign-in to gate on. (Account state and
signed writes do require auth, but those live in the
okx-outcomes-trade skill — route there for "my balance" / orders /
placing or cancelling trades.)
Corporate proxy: if the user mentions VPN / firewall, add
--proxy <URL>.
One-shot helper: bash skills/okx-outcomes-market/scripts/preflight.sh
emits JSON.
okx-outcomes-trade.$P below is the binary (default okx-outcomes, override via
OKX_OUTCOMES_BIN). Always pass -j for JSON / NDJSON and re-render
to the user as a table.
The CLI also accepts --theme auto|light|dark (or the OKX_THEME env
var) for color output. This skill never needs to set it — -j strips
colors entirely and we render the table ourselves — so leave --theme
unset unless the user explicitly asks about it.
| User intent | Command |
|---|---|
| list events | $P data events [--status active] [--category ...] [--tag ...] [--league ...] [--sort ...] [--cursor ...] [--limit 20] -j |
| trending events | $P data trending -j |
| event detail | $P data event <eventId> -j |
| event's markets | $P data event-markets <eventId> -j |
| single market detail | $P data market <marketId> -j |
| ticker (last / bid / ask + 24h) | $P data ticker <assetId> -j |
| candles / K-line | $P data candles <assetId> [--bar 1m|5m|15m|1H|4H|1D] [--limit 100] [--after <ms>] [--before <ms>] -j |
| search events | $P search <keyword> [--cursor ...] [--limit 20] -j |
assetId is the YES-outcome asset id; pass --outcome no (or --no)
for the NO side (derived as 1 - yes).
| User intent | Command |
|---|---|
| trimmed price (last / bid / ask / mid / spread) | $P clob price --asset <id> [--outcome yes|no] -j |
| batch price | $P clob prices <id1> <id2> ... [--outcome ...] -j |
midpoint (bid+ask)/2 | $P clob midpoint --asset <id> [--outcome ...] -j |
| batch midpoint | $P clob midpoints <id1> <id2> ... -j |
| spread (absolute + percent) | $P clob spread --asset <id> [--outcome ...] -j |
| batch spread | $P clob spreads <id1> <id2> ... -j |
| multi-level book | $P clob book --asset <id> [--outcome ...] [--sz 10] -j (sz max 400) |
| batch book | $P clob books <id1> <id2> ... [--sz ...] -j |
REST covers virtually every agent need — prefer it, and re-run for a
fresh snapshot. The ws * streaming commands emit unbounded NDJSON
that floods context and burns tokens fast, so they are not listed
here. Only when the user explicitly asks to watch a live feed, consult
references/ws-protocol.md for the channel commands — and always cap
hard with | head -n 5 or timeout 30 …. For sustained watching,
point the user to the TUI (ws terminal, in the trade skill).
daily-brief — "What's hot today?"
$P data trending -j → top 5 events table.okx-outcomes-trade skill.event-deep-dive — "Can I bet on this event?"
$P search "<keyword>" -j → resolve to eventId.$P data event-markets <eventId> -j → list outcomes + asset ids.$P data ticker <assetId> -j,
$P clob book --asset <assetId> --sz 10 -j,
$P data candles <assetId> --bar 1H --limit 50 -j.references/ws-protocol.md
(streaming is token-heavy — default to re-running clob price for a
fresh snapshot).okx-outcomes-trade.price-watch — "Track this asset's price"
$P data ticker <assetId> -j → snapshot.$P clob price --asset <assetId> -j → current bid / ask / mid;
re-run for a fresh snapshot.$P clob book --asset <assetId> --sz 5 -j for depth.ws terminal, trade
skill) or references/ws-protocol.md — streaming is token-heavy and
not for routine agent use.<IMPORTANT> rulesokx-outcomes-trade. This skill has no signing key and no write
surface.-j. Parse JSON, render table.ws * commands flood
context with unbounded frames — don't use them for routine queries.
Only on explicit user request, per references/ws-protocol.md, and
always capped with | head -n 5 or timeout 30 ….--key flag here. This skill never reads a signing key.REST endpoints may lag 5–30 s vs. the matching engine — fine for
virtually all agent queries; re-run the REST command for a fresh
snapshot. Sub-second live feeds exist over WebSocket but are
token-heavy, so use them only on explicit request (see
references/ws-protocol.md) or point the user to the TUI
(ws terminal, trade skill).
For historical data, REST is authoritative (data candles --after / --before).
references/cli-reference.md — full command reference (read-only
slice).references/ws-protocol.md — public channel frame schemas + cap
conventions.references/keyword-glossary.md — zh/EN trigger phrase →
command map.references/env-vars.md — config (config.json) + OAuth/keyring
model + supported operational env vars (no signing key here).scripts/preflight.sh — env check, JSON output.clob_reads: false).
Route to the okx-outcomes-setup skill — it owns onboarding and drives
the interactive okx-outcomes setup wizard in the user's own terminal.pagination.has_more or
has_next, surface next_cursor and offer to fetch next page.okx-outcomes-trade. Don't try to invoke clob write commands here.--proxy http://corp-proxy:8080 on
connection errors.npx claudepluginhub okx/outcomes-cli --plugin okxoutcomesGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.