skills/okx-cex-market/SKILL.md
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 prices (gold, XAU, XAG), commodities (oil, OIL), forex rates (EUR/USD, EURUSDT), bond instruments, non-crypto assets, or any technical indicator query (RSI, MACD, EMA, Bollinger Bands, KDJ, SuperTrend, AHR999, BTC rainbow, and 70+ more). All commands are read-only and do NOT require API credentials. Do NOT use for account balance/positions (okx-cex-portfolio), placing/cancelling orders (okx-cex-trade), or bots (okx-cex-bot).
npx skillsauth add okx/agent-skills okx-cex-marketInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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-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>] | List instruments (instId, ctVal, lotSz, minSz, tickSz, state) |
| 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); 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>] | Recent public trades |
| 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) |
| 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 |
| 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 |
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; if unknown, run open-interest --instType OPTION first to discover active instIds--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: uses 1Dutc not 1D, 1Wutc not 1W — different from candle bar valuesmarket 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: comma-separated, no spaces — --params 5,20ahr999, 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 contextdevelopment
Smart Money analytics on OKX: leaderboard traders, position tracking, trade records, closed-position history, aggregated consensus signals, and signal history. Use this skill when the user asks about 聪明钱, smart money, 牛人榜, leaderboard, top traders, 交易员排行, trader ranking, trader positions, trader PnL, 交易员持仓, 交易员收益, 历史平仓, closed positions, realized PnL track record, trade history, 成交记录, smart money signal, 聪明钱信号, long/short ratio, 多空比, capital flow, 资金流向, position conviction, 仓位强度, entry price distribution, smart money overview, 聪明钱总览, signal history, 信号历史, trader search, 搜索交易员, who is trading BTC, 谁在交易BTC, recommend traders, 推荐交易员, best traders, top performers.
tools
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 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).
development
Use this skill when the user asks about: 'any crypto news', 'latest news', 'market update', 'daily briefing', 'BTC news', 'ETH news', 'news on SOL', 'search SEC ETF', 'regulation news', 'Bitcoin halving', 'is BTC bullish or bearish', 'coin sentiment', 'sentiment trend', 'trending coins', 'top bullish coins', 'bearish sentiment', 'social buzz', 'market mood', 'fear and greed', 'full article', 'read more', 'economic calendar', '经济日历', 'macro data', '宏观数据', 'NFP', 'nonfarm', '非农', 'CPI', 'GDP', 'FOMC', '利率决议', 'interest rate decision', 'PMI', 'unemployment rate', '失业率', 'economic events', '经济事件', or any request for crypto news, market intelligence, sentiment analysis, social trend data, or macro-economic calendar. Requires API credentials. Do NOT use for market prices/candles (okx-cex-market), placing orders (okx-cex-trade), or account info (okx-cex-portfolio).
development
Use when the user asks to 'buy BTC', 'sell ETH', 'place a limit order', 'place a market order', 'cancel my order', 'amend my order', 'long BTC perp', 'short ETH swap', 'open a position', 'close a position', 'set take profit', 'limit take profit', 'immediate TP', 'set stop loss', 'self-trade prevention', 'stpMode', 'auto-cancel on close', 'trailing stop', 'pending order', 'chase order', 'iceberg', 'TWAP', 'split order', 'large order', 'set leverage', 'check my orders', 'fill history', 'buy a call', 'sell a put', 'option chain', 'implied volatility', 'IV', 'Greeks', 'delta', 'gamma', 'event contract', 'buy Yes', 'buy No', 'buy Up', 'buy Down', 'prediction market', or any request to place, cancel, or amend spot, swap, futures, options, or event contract orders on OKX CEX. Covers conditional (TP/SL/trailing) algo orders. Requires API credentials. Do NOT use for market data (okx-cex-market), account balance (okx-cex-portfolio), or bots (okx-cex-bot).