Provides read-only OKX market data: prices, order books, candles, funding rates, open interest, technical indicators (RSI, MACD, EMA, Bollinger Bands, etc.), and market screener. No API credentials needed.
Ships in okx-agent-trade-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Compliance notice: This skill provides raw market data only. No strategy, recommendation, or optimization logic is embedded. All indicator outputs are objective numerical values; interpretation and trading decisions remain solely with the user.
Public market data for OKX: prices, order books, candles, funding rates, open interest, instrument info, and technical indicators. All commands are read-only and require no API credentials.
Skill routing
okx-cex-market (this skill)okx-cex-portfoliookx-cex-tradeokx-cex-tradeokx-sentiment-trackerokx-cex-botBefore running any command, follow ../_shared/preflight.md.
Use metadata.version from this file's frontmatter as the reference for Step 2.
npm install -g @okx_ai/okx-trade-cli
okx market ticker BTC-USDT # verify
Market data commands return the same public data regardless of demo/live mode — no API credentials required. If the user's profile has demo=true set and they want live data context, they can use --live to confirm they are in live mode (it has no effect on public market data but clarifies environment). Always inform the user which environment is active (demo or live) when it is relevant to their query. No confirmation needed before running any market command. Add --json to any command for raw OKX API v5 response. Add --env to wrap the output as {"env", "profile", "data"}.
| # | Command | Description |
|---|---|---|
| 1 | okx market ticker <instId> | Last price, 24h high/low/vol/change% |
| 2 | okx market tickers <instType> | All tickers for SPOT / SWAP / FUTURES / OPTION |
| 3 | okx market instruments --instType <type> [--instId <id>] [--uly <uly>] [--instFamily <fam>] [--seriesId <id>] | List instruments (instId, ctVal, lotSz, minSz, tickSz, state); OPTION requires --uly or --instFamily; EVENTS requires --seriesId |
| 4 | okx market orderbook <instId> [--sz <n>] | Order book asks/bids (default top 5 per side, max 400) |
| 5 | okx market candles <instId> [--bar <bar>] [--limit <n>] [--after <ts>] [--before <ts>] | OHLCV candles (default --bar 1m; UTC+0 bars 6Hutc…3Mutc available from 6H up); auto-routes to historical endpoint for data back to 2021; --after paginates back in time, --before paginates forward |
| 6 | okx market index-candles <instId> [--bar <bar>] [--limit <n>] [--history] | Index OHLCV (use BTC-USD not BTC-USDT) |
| 7 | okx market funding-rate <instId> [--history] [--limit <n>] | Current or historical funding rate (SWAP only) |
| 8 | okx market trades <instId> [--limit <n>] [--history [--type <1|2>] [--after <id|ts>] [--before <id>]] | Recent public trades (default 20, max 500). --history pages through the last 3 months (max 100 per page); --type/--after/--before require --history and are rejected otherwise |
| 9 | okx market mark-price --instType <type> [--instId <id>] | Mark price (SWAP / FUTURES / OPTION) |
| 10 | okx market index-ticker [--instId <id>] [--quoteCcy <ccy>] | Index price (e.g., BTC-USD) |
| 11 | okx market price-limit <instId> | Upper/lower price limits (SWAP / FUTURES only) |
| 12 | okx market open-interest --instType <type> [--instId <id>] | Open interest in contracts and base currency |
| 13 | okx market instruments-by-category --instCategory <3|4|5|6|7> | Discover instruments by asset category: 3=Stock tokens (AAPL/TSLA), 4=Metals (gold/silver), 5=Commodities (oil/gas), 6=Forex (EUR/USD), 7=Bonds |
| 13† | okx market stock-tokens | Deprecated — use instruments-by-category --instCategory 3 instead |
| 14 | okx market filter --instType <SPOT|SWAP|FUTURES> [--sortBy <field>] [--sortOrder <asc|desc>] [--limit <n>] [--baseCcy <ccy>] [--quoteCcy <ccy>] [--settleCcy <ccy>] [--instFamily <fam>] [--ctType <linear|inverse>] [--minLast <n>] [--maxLast <n>] [--minChg24hPct <n>] [--maxChg24hPct <n>] [--minMarketCapUsd <n>] [--maxMarketCapUsd <n>] [--minVolUsd24h <n>] [--maxVolUsd24h <n>] [--minFundingRate <n>] [--maxFundingRate <n>] [--minOiUsd <n>] [--maxOiUsd <n>] | Screen / rank instruments by multi-dimensional criteria (price, volume, OI, funding rate, market cap). Prints Total: N + a ranked table of matching instruments (No results only when nothing matches). Add --json for the raw OKX API v5 response (structurally unchanged). |
| 15 | okx market oi-history <instId> [--bar <5m|15m|1H|4H|1D>] [--limit <n>] [--ts <ms>] | OI history time series with bar-over-bar delta for a single instrument |
| 16 | okx market oi-change --instType <SWAP|FUTURES> [--bar <5m|15m|1H|4H|1D>] [--sortBy <field>] [--sortOrder <asc|desc>] [--limit <n>] [--minOiUsd <n>] [--minVolUsd24h <n>] [--minAbsOiDeltaPct <n>] | Find instruments with largest OI changes (accumulation/distribution scanner) |
| 17 | okx market indicator list | List all supported indicator names and descriptions |
| 18 | okx market indicator <indicator> <instId> [--bar] [--params] [--list] [--limit] [--backtest-time] | Technical indicator values. Omit --params to use the indicator's default (e.g. MACD 12,26,9, BB 20,2, RSI 14, MA 5,20,60, EMA 5,20, Supertrend 3,10); the CLI prints params: … (default). If you pass --params it must be complete — too few or too many values is an error (e.g. --params 12,26 for macd). Full list of params and defaults: references/indicator-commands.md. Unknown indicator names are rejected. |
| 19 | okx market pair-spread <instIdA> <instIdB> [--bar <5m|15m>] [--window <window>] [--backtest-time <ms>] | Spread statistics (abs + ratio: mean/stdDev/median/min/max) over a lookback window; supports backtest mode |
| User intent | Reference to load |
|---|---|
| Price, candles, order book, recent trades | {baseDir}/references/price-data-commands.md |
| Technical indicators (RSI, MACD, EMA, BB, KDJ, SuperTrend, AHR999, Rainbow, etc.) | {baseDir}/references/indicator-commands.md |
| Funding rate, mark price, open interest, price limit, index ticker | {baseDir}/references/derivatives-commands.md |
| Screen / rank instruments; find top movers, high-OI, high-volume contracts | Use okx market filter directly |
| OI history time series for a single instrument | Use okx market oi-history directly |
| OI change scanner; find contracts with large OI shifts | Use okx market oi-change directly |
| Pair spread statistics; mean-reversion / pairs-trade sizing | Use okx market pair-spread directly |
| List instruments, discover stock tokens, metals/commodities/forex/bonds, find option instIds | {baseDir}/references/instrument-commands.md |
| Multi-step or cross-skill workflows; MCP tool names | {baseDir}/references/workflows.md |
Event contracts are not served by this skill.
| User asks | Do |
|---|---|
| Which way an asset is moving — "is BTC going up", "what's the 15m trend" | Answer here with candles / indicators |
| Direction and whether they can trade it | Answer the data half here, then name okx-cex-trade for the trade half |
| To trade an event contract — "buy YES/NO on …" | Route to okx-cex-trade, serve nothing here |
Never substitute another product for an event contract — not a perp, not a futures position,
not market data presented as the contract they asked for. If you cannot load
okx-cex-trade, say so and stop.
All market data commands are read-only — no confirmation needed.
All commands in this skill are read-only.
BTC-USDT · SWAP BTC-USDT-SWAP · FUTURES BTC-USDT-250328 · OPTION BTC-USD-250328-95000-C · Index BTC-USD · Stock token TSLA-USDT-SWAP · Metals/Commodities/Forex/Bonds: use instruments-by-category to discover valid instIds firstinstruments --instType OPTION requires --uly BTC-USD or --instFamily BTC-USD; if unknown, run open-interest --instType OPTION first to discover active instIdsinstruments --instType EVENTS requires --seriesId (e.g. --seriesId BTC-ABOVE-DAILY); run okx event series first to discover valid series IDs--bar: uppercase — 1H not 1h; use --after <ts> to paginate back into historical data (back to 2021); index-candles supports --history for extended history--after/--before, estimate candle count = time_range_ms / bar_interval_ms. If estimate > 500, tell the user the estimated count and ask for confirmation before proceeding. This prevents silently filling the context window.--bar sets differ by command: the candles list is not the indicator list. Read the matching reference (price-data-commands.md / indicator-commands.md) for each command's bars.--bar: uses 1Dutc not 1D, 1Wutc not 1W — indicators accept only the values listed below (a subset of the candle bar values)market filter sortBy values: last chg24hPct marketCapUsd volUsd24h fundingRate oiUsd listTime — default volUsd24hmarket filter ctType: linear or inverse (SWAP/FUTURES only); omit for SPOTmarket filter quoteCcy: comma-separated list supported, e.g. --quoteCcy USDT,USDCmarket filter SPOT + quoteCcy: when --instType SPOT, the API returns instruments across all quote currencies (USDT, USDC, BTC, ETH, etc.) mixed together — this pollutes sort order and bloats results. Always pass --quoteCcy USDT by default unless the user explicitly asks for other quote currencies.market filter chg24hPct: value is a percentage number — --minChg24hPct -5 means -5%, --maxChg24hPct 10 means 10%market oi-history ts: Unix ms timestamp; returns bars with ts ≤ this value for historical paginationmarket oi-history / oi-change bar: valid values 5m 15m 1H 4H 1D — default 1H. Server accepts case variants (1h == 1H) but prefer canonical casing.market oi-history limit: 1–500 (default 50)market oi-change instType: only SWAP or FUTURES supported (not SPOT)market oi-change minAbsOiDeltaPct: filters by absolute OI change — 1.0 keeps only rows where |oiDeltaPct| ≥ 1%market oi-change sortBy values: oiUsd oiDeltaUsd oiDeltaPct absOiDeltaPct volUsd24h fundingRate last — default oiDeltaPct (signed). Use absOiDeltaPct to rank by |oiDeltaPct| (largest magnitude regardless of direction).market oi-change limit: 1–100 (default 20). For deeper than 100 rows, fetch oi-history per instId.--bar valid values: 3m 5m 15m 1H 4H 12Hutc 1Dutc 3Dutc 1Wutc — 1m is not supported for indicators (use candles for 1-minute data)--limit: 1–100 (only used with returnList, i.e. when a historical series is requested)okx market indicator rsi BTC-USDT--params: either omit it (default used) or pass the complete set — comma-separated integers, no spaces, given once: --params 12,26,9. Fixed-length indicators need exactly the full set (macd 3, kdj 3, bb 2, supertrend 2 as factor,atrPeriod, stoch-rsi 4, …); ma/ema/rsi/wr/wma/dema/tema/zlema/hma/kama take one or more periods. Periods are 2–365; the bb multiplier and supertrend factor are 1–9; alphatrend and halftrend take any int32 integer (negative allowed, no 2–365 range). A leading negative value parses (--params -9,3,3) but is rejected as out of range where the slot is a period or factor. Non-numeric tokens, a wrong count or an out-of-range value fail with an error that shows the expected signature, default and example; a repeated --params fails with specify --params once, comma-separated. Indicators not covered by the params contract (obv, vwap, sar, …) have no default and no count or range check, but malformed values (non-numeric, null, overflow) are still rejected.--params and no timeframe returns values → table mode fails with No values returned for <indicator> with params [...] (the period may exceed the available candles), exit code 1; --json prints the raw backend data and exits 0 as before. (2) --params omitted and a default was applied (the params: … (default) line is shown) → prints No indicator values returned for the default params; there may not be enough candles for this instrument and bar. (3) --params omitted for an indicator without a default → prints No indicator values returned. This indicator may require a period — try --params (e.g. --params 14).ahr999, rainbow — BTC-USDT onlyValidationError with similar-name suggestions before the API is called — use market_list_indicators / okx market indicator list to see all valid namesokx market instrumentsboll is an alias for bbvol24h is in base currency (e.g., BTC for BTC-USDT)--demo/--live and --profile do not affect market data results via CLI (public endpoints); they only determine the active trading environment contextWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/okx-okx-agent-trade-kit:okx-cex-marketfrom okx-agent-trade-kit
Generated from the plugin's indexed repository (okx/agent-trade-kit) — no native marketplace selected
npx claudepluginhub p/okx-okx-agent-trade-kit10 skills in this plugin
/earn-hunterAutomatically 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 scan, 活期年化高了通知我, 监控活期./okx-cex-authUse 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 login first', 'Session expired', 'not authenticated', 'requires_auth', '401 Unauthorized', 'token expired/not found', 'StorageNotFoundError', '会话过期', '未认证', '需要登录'. Also when the user asks about login status or the login was interrupted. Also when the user wants to install/update/check/remove the okx-auth binary — 'install/update/remove auth', 'download okx-auth', '安装/更新/卸载认证', 'auth binary status', 'Failed to spawn okx-auth'. Also use before using okx-cex-trade/portfolio/earn/bot for the first time. Do NOT use for market data queries (use okx-cex-market)./okx-cex-botManage Grid bots (spot/contract/coin-margined), DCA Martingale bots (Spot DCA 现货马丁 / Contract DCA 合约马丁), Smart Portfolio bots (智能组合, auto-rebalancing multi-asset portfolio; pause/resume rebalancing, add funds, edit coins and weights), and Recurring Buy strategies (定投, periodic fixed-amount multi-coin buys) on OKX. Covers create, stop, pause, amend, monitor P&L, TP/SL, margin/investment adjustment, AI-recommended parameters, and recommended zone backtest. Requires API credentials. Not for regular orders (okx-cex-trade), market data (okx-cex-market), or account info (okx-cex-portfolio)./okx-cex-earnManages 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 products, view or set lending rates, monitor on-chain staking orders, interact with dual investment structured products, or manage auto-earn — even if phrased casually as 活期赚币, 定期赚币, 闪赚, 赚币, 申购, 赎回, 链上赚币, 质押, 理财, 双币赢, 双币理财, 双币申购, 高卖, 低买, dual investment, DCD, flash earn, buy low, sell high structured product, earn with target price, 目标价, 自动赚币, auto earn, auto-earn, 自动借出, 自动质押, auto lend, auto staking, USDG earn, USDG 赚币, 闲置资金自动理财, fixed earn, fixed deposit, term deposit, 定期理财, 定期. Also use when the user asks about idle funds and whether to earn on them./okx-cex-portfolioThis 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 history', 'trading fees', 'fee tier', 'account config', 'max order size', 'how much can I buy', 'withdrawable amount', 'transfer funds', 'move USDT to trading account', or 'switch position mode'. Also use for '总资产', 'full balance', 'all assets', 'total holdings', 'net worth', 'how much do I have in total', 'show all my balances', 'all account balances', 'asset overview', 'aggregated balance', 'asset snapshot', '资产快照'. Requires API credentials. Do NOT use for market prices (use okx-cex-market), placing/cancelling orders (use okx-cex-trade), or grid/DCA bots (use okx-cex-bot)./okx-cex-skill-mpUse this skill when the user asks to: 'find a trading skill', 'search for skills', 'install a skill', 'add a skill', 'download a skill', 'browse skill marketplace', 'what skills are available', 'update a skill', 'check for skill updates', 'remove a skill', 'uninstall a skill', 'list installed skills', 'show my skills', 'skill categories', 'verify skill signature', 'verify installed skill', 're-verify a skill', 'check skill integrity', or any request to discover, install, update, verify, or manage AI trading skills from the OKX Skills Marketplace. This skill covers searching, browsing categories, installing via CLI, downloading zip packages, checking for updates, removing installed skills, and verifying Ed25519 signatures of installed skills. Requires API credentials for marketplace API access. Do NOT use for placing orders (use okx-cex-trade), market data (use okx-cex-market), or bot management (use okx-cex-bot).2 plugins ship this exact skill · first indexed Nov 27, 2026
Other plugins' skills for the same job