[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GT32669SP9H2RJM2010MQP":3,"skill-same:01M6GT32669SP9H2RJM2010MQP":97},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":63,"repositoryHtmlUrl":64,"repositoryHomepageUrl":6,"ownerHtmlUrl":65,"ownerBlogUrl":66,"ownerDescription":67,"updatedAt":68,"install":69,"resources":82},"01M6GT32669SP9H2RJM2010MQP","okx-cex-market",null,"This skill should be used when the user asks for 'price of BTC', 'ETH ticker', 'show me the orderbook', 'market depth', 'BTC candles', 'OHLCV chart data', 'funding rate', 'open interest', 'mark price', 'index price', 'recent trades', 'price limit', 'list instruments', 'what instruments are available', or any request to query public market data on OKX CEX. All commands are read-only and do NOT require API credentials. Do NOT use for account balance\u002Fpositions (use okx-cex-portfolio), placing\u002Fcancelling orders (use okx-cex-trade), or grid\u002FDCA bots (use okx-cex-bot).","jiayaoqijia\u002Fcryptoskill","jiayaoqijia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1453879?v=4","01M6GMYTX7Q7S504VC6E756ENR","YQ","01M6GMYV1QKJ1CC75MTTGT9PR0",81,"MIT","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fokx-cex-market\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"okx cex market","cex","Market","okx","when","bot","funding","market data","chart","funding rate","dca","me","query","bots","show","only","portfolio","read","show me","open","api","credentials","cli","2026-11-10 10:12:30",false,"---\nname: okx-cex-market\ndescription: \"This skill should be used when the user asks for 'price of BTC', 'ETH ticker', 'show me the orderbook', 'market depth', 'BTC candles', 'OHLCV chart data', 'funding rate', 'open interest', 'mark price', 'index price', 'recent trades', 'price limit', 'list instruments', 'what instruments are available', or any request to query public market data on OKX CEX. All commands are read-only and do NOT require API credentials. Do NOT use for account balance\u002Fpositions (use okx-cex-portfolio), placing\u002Fcancelling orders (use okx-cex-trade), or grid\u002FDCA bots (use okx-cex-bot).\"\nlicense: MIT\nmetadata:\n  author: okx\n  version: \"1.0.0\"\n  homepage: \"https:\u002F\u002Fwww.okx.com\"\n  agent:\n    requires:\n      bins: [\"okx\"]\n    install:\n      - id: npm\n        kind: node\n        package: \"@okx_ai\u002Fokx-trade-cli\"\n        bins: [\"okx\"]\n        label: \"Install okx CLI (npm)\"\n---\n\n# OKX CEX Market Data CLI\n\nPublic market data for OKX exchange: prices, order books, candles, funding rates, open interest, and instrument info. All commands are **read-only** and do **not require API credentials**.\n\n## Prerequisites\n\n1. Install `okx` CLI:\n   ```bash\n   npm install -g @okx_ai\u002Fokx-trade-cli\n   ```\n2. No credentials needed for market data — all commands are public.\n3. Verify install:\n   ```bash\n   okx market ticker BTC-USDT\n   ```\n\n## Demo vs Live Mode\n\nMarket data commands are public and read-only — **demo mode has no effect**. The same data is returned with or without `--demo`. No confirmation needed before running any market command.\n\n## Skill Routing\n\n- For market data (prices, charts, depth, funding rates) → use `okx-cex-market` (this skill)\n- For account balance, P&L, positions, fees, transfers → use `okx-cex-portfolio`\n- For regular spot\u002Fswap\u002Ffutures\u002Falgo orders → use `okx-cex-trade`\n- For grid and DCA trading bots → use `okx-cex-bot`\n\n## Quickstart\n\n```bash\n# Current BTC spot price\nokx market ticker BTC-USDT\n\n# All SWAP (perp) tickers\nokx market tickers SWAP\n\n# BTC perp order book (top 5 levels each side)\nokx market orderbook BTC-USDT-SWAP\n\n# BTC hourly candles (last 20)\nokx market candles BTC-USDT --bar 1H --limit 20\n\n# BTC perp current funding rate\nokx market funding-rate BTC-USDT-SWAP\n\n# BTC perp funding rate history\nokx market funding-rate BTC-USDT-SWAP --history\n\n# Open interest for all SWAP instruments\nokx market open-interest --instType SWAP\n\n# List all active SPOT instruments\nokx market instruments --instType SPOT\n```\n\n## Command Index\n\n| # | Command | Type | Description |\n|---|---|---|---|\n| 1 | `okx market ticker \u003CinstId>` | READ | Single instrument: last price, 24h high\u002Flow\u002Fvol |\n| 2 | `okx market tickers \u003CinstType>` | READ | All tickers for an instrument type |\n| 3 | `okx market instruments --instType \u003Ctype>` | READ | List tradeable instruments |\n| 4 | `okx market orderbook \u003CinstId> [--sz \u003Cn>]` | READ | Order book top asks\u002Fbids |\n| 5 | `okx market candles \u003CinstId> [--bar] [--limit]` | READ | OHLCV candlestick data |\n| 6 | `okx market index-candles \u003CinstId> [--bar] [--limit]` | READ | Index OHLCV candles |\n| 7 | `okx market funding-rate \u003CinstId> [--history]` | READ | Current or historical funding rate |\n| 8 | `okx market trades \u003CinstId> [--limit \u003Cn>]` | READ | Recent public trades |\n| 9 | `okx market mark-price --instType \u003Ctype> [--instId \u003Cid>]` | READ | Mark price for contracts |\n| 10 | `okx market index-ticker [--instId \u003Cid>] [--quoteCcy \u003Cccy>]` | READ | Index price (e.g., BTC-USD) |\n| 11 | `okx market price-limit \u003CinstId>` | READ | Upper\u002Flower price limits for contracts |\n| 12 | `okx market open-interest --instType \u003Ctype> [--instId \u003Cid>]` | READ | Open interest in contracts and coins |\n\n## Cross-Skill Workflows\n\n### Check price before placing an order\n> User: \"What's the current BTC price? I want to place a limit buy.\"\n\n```\n1. okx-cex-market    okx market ticker BTC-USDT              → check last price and 24h range\n        ↓ user decides price\n2. okx-cex-portfolio okx account balance USDT                → confirm available funds\n        ↓ user approves\n3. okx-cex-trade     okx spot place --instId BTC-USDT --side buy --ordType limit --px \u003Cpx> --sz \u003Csz>\n```\n\n### Check funding rate before holding a perp position\n> User: \"Is the BTC perp funding rate high right now?\"\n\n```\n1. okx-cex-market    okx market funding-rate BTC-USDT-SWAP   → current rate + next funding time\n2. okx-cex-market    okx market funding-rate BTC-USDT-SWAP --history  → trend over recent periods\n        ↓ decide whether to hold position\n3. okx-cex-portfolio okx account positions                   → check existing exposure\n```\n\n### Research market before creating a grid bot\n> User: \"I want to set up a BTC grid bot — what's the recent range?\"\n\n```\n1. okx-cex-market    okx market candles BTC-USDT --bar 4H --limit 50  → recent OHLCV for range\n2. okx-cex-market    okx market ticker BTC-USDT                        → current price\n3. okx-cex-market    okx market orderbook BTC-USDT --sz 20             → liquidity check\n        ↓ decide minPx \u002F maxPx\n4. okx-cex-bot       okx bot grid create --instId BTC-USDT ...\n```\n\n### Compare perp vs spot premium\n> User: \"Is there a premium between BTC spot and BTC perp?\"\n\n```\n1. okx-cex-market    okx market ticker BTC-USDT              → spot last price\n2. okx-cex-market    okx market ticker BTC-USDT-SWAP         → perp last price\n3. okx-cex-market    okx market mark-price --instType SWAP --instId BTC-USDT-SWAP  → mark price\n```\n\n### Discover and price an option\n> User: \"What's the price of a BTC call option expiring this week?\"\n\n```\n1. okx-cex-market    okx market open-interest --instType OPTION --instId BTC-USD  → list active option instIds\n        ↓ pick target instId from the list (e.g., BTC-USD-250328-95000-C)\n2. okx-cex-market    okx market ticker BTC-USD-250328-95000-C → option last price and stats\n3. okx-cex-market    okx market orderbook BTC-USD-250328-95000-C → bid\u002Fask spread\n```\n\n> **Note**: `okx market instruments --instType OPTION` requires `--uly \u003Cunderlying>` (e.g., `--uly BTC-USD`). If the underlying is unknown, use `open-interest` first to discover active option instIds.\n\n## Operation Flow\n\n### Step 1: Identify the data needed\n\n- Current price → `okx market ticker`\n- All prices for a category → `okx market tickers`\n- Order book depth → `okx market orderbook`\n- Price history\u002Fchart → `okx market candles`\n- Funding cost → `okx market funding-rate`\n- Contract valuation → `okx market mark-price` or `okx market price-limit`\n- Market volume\u002FOI → `okx market open-interest`\n- What instruments exist → `okx market instruments`\n\n### Step 2: Run commands immediately\n\nAll market data commands are read-only — no confirmation needed.\n\n- `--instType` values: `SPOT`, `SWAP`, `FUTURES`, `OPTION`\n- `--bar` values: `1m`, `3m`, `5m`, `15m`, `30m`, `1H`, `2H`, `4H`, `6H`, `12H`, `1D`, `1W`, `1M`\n- `--limit`: number of results (default varies per endpoint, typically 100)\n- `--history`: for `funding-rate`, returns historical records instead of current rate\n\n### Step 3: No writes — no verification needed\n\nAll commands in this skill are read-only. No post-execution verification required.\n\n## CLI Command Reference\n\n### Ticker — Single Instrument\n\n```bash\nokx market ticker \u003CinstId> [--json]\n```\n\nReturns: `last`, `24h high\u002Flow`, `24h volume`, `sodUtc8` (24h change %).\n\n---\n\n### Tickers — All Instruments of a Type\n\n```bash\nokx market tickers \u003CinstType> [--json]\n```\n\n| Param | Required | Values | Description |\n|---|---|---|---|\n| `instType` | Yes | `SPOT`, `SWAP`, `FUTURES`, `OPTION` | Instrument type |\n\nReturns table: `instId`, `last`, `high24h`, `low24h`, `vol24h`.\n\n---\n\n### Instruments — List Tradeable Instruments\n\n```bash\nokx market instruments --instType \u003Ctype> [--instId \u003Cid>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `--instType` | Yes | - | `SPOT`, `SWAP`, `FUTURES`, `OPTION` |\n| `--instId` | No | - | Filter to a single instrument |\n\nReturns: `instId`, `ctVal`, `lotSz`, `minSz`, `tickSz`, `state`. Displays up to 50 rows.\n\n---\n\n### Order Book\n\n```bash\nokx market orderbook \u003CinstId> [--sz \u003Cn>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `instId` | Yes | - | Instrument ID (e.g., `BTC-USDT-SWAP`) |\n| `--sz` | No | 5 | Depth levels per side (1–400) |\n\nDisplays top 5 asks (ascending) and bids (descending) with price and size.\n\n---\n\n### Candles — OHLCV\n\n```bash\nokx market candles \u003CinstId> [--bar \u003Cbar>] [--limit \u003Cn>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `instId` | Yes | - | Instrument ID |\n| `--bar` | No | `1m` | Time granularity (`1m`, `1H`, `4H`, `1D`, etc.) |\n| `--limit` | No | 100 | Number of candles to return |\n\nReturns columns: `time`, `open`, `high`, `low`, `close`, `vol`.\n\n---\n\n### Index Candles\n\n```bash\nokx market index-candles \u003CinstId> [--bar \u003Cbar>] [--limit \u003Cn>] [--history] [--json]\n```\n\nSame params as `candles`. Use index instrument IDs like `BTC-USD` (not `BTC-USDT`).\n\n---\n\n### Funding Rate\n\n```bash\nokx market funding-rate \u003CinstId> [--history] [--limit \u003Cn>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `instId` | Yes | - | SWAP instrument (e.g., `BTC-USDT-SWAP`) |\n| `--history` | No | false | Return historical funding rates |\n| `--limit` | No | - | Number of historical records |\n\nCurrent (no `--history`): returns `fundingRate`, `nextFundingRate`, `fundingTime`, `nextFundingTime`.\nHistorical (`--history`): table with `fundingRate`, `realizedRate`, `fundingTime`.\n\n---\n\n### Recent Trades\n\n```bash\nokx market trades \u003CinstId> [--limit \u003Cn>] [--json]\n```\n\nReturns: `tradeId`, `px`, `sz`, `side`, `ts`.\n\n---\n\n### Mark Price\n\n```bash\nokx market mark-price --instType \u003Ctype> [--instId \u003Cid>] [--json]\n```\n\nReturns: `instId`, `instType`, `markPx`, `ts`. Used for liquidation price calculation and contract valuation.\n\n---\n\n### Index Ticker\n\n```bash\nokx market index-ticker [--instId \u003Cid>] [--quoteCcy \u003Cccy>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `--instId` | Cond. | - | Index ID (e.g., `BTC-USD`) |\n| `--quoteCcy` | Cond. | - | Filter by quote currency (e.g., `USD`, `USDT`) |\n\nReturns: `idxPx`, `high24h`, `low24h`.\n\n---\n\n### Price Limit\n\n```bash\nokx market price-limit \u003CinstId> [--json]\n```\n\nReturns: `buyLmt` (max buy price), `sellLmt` (min sell price). Applies to SWAP and FUTURES only.\n\n---\n\n### Open Interest\n\n```bash\nokx market open-interest --instType \u003Ctype> [--instId \u003Cid>] [--json]\n```\n\nReturns: `oi` (contracts), `oiCcy` (base currency amount), `ts`.\n\n---\n\n## MCP Tool Reference\n\n| Tool | Description |\n|---|---|\n| `market_get_ticker` | Single instrument ticker |\n| `market_get_tickers` | All tickers for instType |\n| `market_get_instruments` | List instruments |\n| `market_get_orderbook` | Order book depth |\n| `market_get_candles` | OHLCV candles |\n| `market_get_index_candles` | Index OHLCV candles |\n| `market_get_funding_rate` | Funding rate (current or history) |\n| `market_get_trades` | Recent public trades |\n| `market_get_mark_price` | Mark price for contracts |\n| `market_get_index_ticker` | Index price ticker |\n| `market_get_price_limit` | Price limits for contracts |\n| `market_get_open_interest` | Open interest |\n\n---\n\n## Input \u002F Output Examples\n\n**\"What's the price of BTC?\"**\n```bash\nokx market ticker BTC-USDT\n# → instId: BTC-USDT | last: 95000.5 | 24h change %: +1.2% | 24h high: 96000 | 24h low: 93000\n```\n\n**\"Show me all SWAP tickers\"**\n```bash\nokx market tickers SWAP\n# → table of all perpetual contracts with last price, 24h high\u002Flow\u002Fvol\n```\n\n**\"What's the BTC\u002FUSDT order book look like?\"**\n```bash\nokx market orderbook BTC-USDT\n# Asks (price \u002F size):\n#          95100.0  2.5\n#          95050.0  1.2\n# Bids (price \u002F size):\n#          95000.0  3.1\n#          94950.0  0.8\n```\n\n**\"Show me BTC 4H candles for the last 30 periods\"**\n```bash\nokx market candles BTC-USDT --bar 4H --limit 30\n# → table: time, open, high, low, close, vol\n```\n\n**\"What's the current funding rate for BTC perp?\"**\n```bash\nokx market funding-rate BTC-USDT-SWAP\n# → fundingRate: 0.0001 | nextFundingRate: 0.00012 | fundingTime: ... | nextFundingTime: ...\n```\n\n**\"Show historical funding rates for ETH perp\"**\n```bash\nokx market funding-rate ETH-USDT-SWAP --history --limit 20\n# → table: fundingRate, realizedRate, fundingTime\n```\n\n**\"What's the open interest on BTC perp?\"**\n```bash\nokx market open-interest --instType SWAP --instId BTC-USDT-SWAP\n# → oi: 125000 | oiCcy: 125000 | ts: ...\n```\n\n**\"List all available SPOT instruments\"**\n```bash\nokx market instruments --instType SPOT\n# → table: instId, ctVal, lotSz, minSz, tickSz, state (up to 50 rows)\n```\n\n## Edge Cases\n\n- **instId format**: SPOT uses `BTC-USDT`; SWAP uses `BTC-USDT-SWAP`; FUTURES uses `BTC-USDT-250328`; OPTION uses `BTC-USD-250328-95000-C`; Index uses `BTC-USD`\n- **OPTION instruments — cannot list directly**: `okx market instruments --instType OPTION` requires `--uly BTC-USD` (underlying). If the underlying is unknown, run `okx market open-interest --instType OPTION` first to discover active option instIds from the results, then use those instIds with `okx market ticker \u003CinstId>`\n- **No data returned**: instrument may be delisted or instId is wrong — verify with `okx market instruments`\n- **funding-rate**: only applies to SWAP instruments; returns error for SPOT\u002FFUTURES\n- **price-limit**: only applies to SWAP and FUTURES instruments\n- **mark-price**: available for SWAP, FUTURES, OPTION; not applicable to SPOT\n- **candles --bar**: use uppercase `H`, `D`, `W`, `M` for hour\u002Fday\u002Fweek\u002Fmonth (e.g., `1H` not `1h`)\n- **index-ticker**: use `BTC-USD` format (not `BTC-USDT`) for index IDs\n- **orderbook --sz**: max depth is 400; default display shows top 5 per side regardless of `--sz`\n\n## Global Notes\n\n- All market data commands are public — no API key required\n- `--json` returns raw OKX API v5 response for programmatic use\n- `--profile \u003Cname>` has no effect on market commands (no auth needed)\n- Rate limit: 20 requests per 2 seconds per IP for market data endpoints\n- Candle data is sorted newest-first by default\n- `vol24h` in tickers is in base currency (e.g., BTC for BTC-USDT)\n","# OKX CEX Market Data CLI\n\nPublic market data for OKX exchange: prices, order books, candles, funding rates, open interest, and instrument info. All commands are **read-only** and do **not require API credentials**.\n\n## Prerequisites\n\n1. Install `okx` CLI:\n   ```bash\n   npm install -g @okx_ai\u002Fokx-trade-cli\n   ```\n2. No credentials needed for market data — all commands are public.\n3. Verify install:\n   ```bash\n   okx market ticker BTC-USDT\n   ```\n\n## Demo vs Live Mode\n\nMarket data commands are public and read-only — **demo mode has no effect**. The same data is returned with or without `--demo`. No confirmation needed before running any market command.\n\n## Skill Routing\n\n- For market data (prices, charts, depth, funding rates) → use `okx-cex-market` (this skill)\n- For account balance, P&L, positions, fees, transfers → use `okx-cex-portfolio`\n- For regular spot\u002Fswap\u002Ffutures\u002Falgo orders → use `okx-cex-trade`\n- For grid and DCA trading bots → use `okx-cex-bot`\n\n## Quickstart\n\n```bash\n# Current BTC spot price\nokx market ticker BTC-USDT\n\n# All SWAP (perp) tickers\nokx market tickers SWAP\n\n# BTC perp order book (top 5 levels each side)\nokx market orderbook BTC-USDT-SWAP\n\n# BTC hourly candles (last 20)\nokx market candles BTC-USDT --bar 1H --limit 20\n\n# BTC perp current funding rate\nokx market funding-rate BTC-USDT-SWAP\n\n# BTC perp funding rate history\nokx market funding-rate BTC-USDT-SWAP --history\n\n# Open interest for all SWAP instruments\nokx market open-interest --instType SWAP\n\n# List all active SPOT instruments\nokx market instruments --instType SPOT\n```\n\n## Command Index\n\n| # | Command | Type | Description |\n|---|---|---|---|\n| 1 | `okx market ticker \u003CinstId>` | READ | Single instrument: last price, 24h high\u002Flow\u002Fvol |\n| 2 | `okx market tickers \u003CinstType>` | READ | All tickers for an instrument type |\n| 3 | `okx market instruments --instType \u003Ctype>` | READ | List tradeable instruments |\n| 4 | `okx market orderbook \u003CinstId> [--sz \u003Cn>]` | READ | Order book top asks\u002Fbids |\n| 5 | `okx market candles \u003CinstId> [--bar] [--limit]` | READ | OHLCV candlestick data |\n| 6 | `okx market index-candles \u003CinstId> [--bar] [--limit]` | READ | Index OHLCV candles |\n| 7 | `okx market funding-rate \u003CinstId> [--history]` | READ | Current or historical funding rate |\n| 8 | `okx market trades \u003CinstId> [--limit \u003Cn>]` | READ | Recent public trades |\n| 9 | `okx market mark-price --instType \u003Ctype> [--instId \u003Cid>]` | READ | Mark price for contracts |\n| 10 | `okx market index-ticker [--instId \u003Cid>] [--quoteCcy \u003Cccy>]` | READ | Index price (e.g., BTC-USD) |\n| 11 | `okx market price-limit \u003CinstId>` | READ | Upper\u002Flower price limits for contracts |\n| 12 | `okx market open-interest --instType \u003Ctype> [--instId \u003Cid>]` | READ | Open interest in contracts and coins |\n\n## Cross-Skill Workflows\n\n### Check price before placing an order\n> User: \"What's the current BTC price? I want to place a limit buy.\"\n\n```\n1. okx-cex-market    okx market ticker BTC-USDT              → check last price and 24h range\n        ↓ user decides price\n2. okx-cex-portfolio okx account balance USDT                → confirm available funds\n        ↓ user approves\n3. okx-cex-trade     okx spot place --instId BTC-USDT --side buy --ordType limit --px \u003Cpx> --sz \u003Csz>\n```\n\n### Check funding rate before holding a perp position\n> User: \"Is the BTC perp funding rate high right now?\"\n\n```\n1. okx-cex-market    okx market funding-rate BTC-USDT-SWAP   → current rate + next funding time\n2. okx-cex-market    okx market funding-rate BTC-USDT-SWAP --history  → trend over recent periods\n        ↓ decide whether to hold position\n3. okx-cex-portfolio okx account positions                   → check existing exposure\n```\n\n### Research market before creating a grid bot\n> User: \"I want to set up a BTC grid bot — what's the recent range?\"\n\n```\n1. okx-cex-market    okx market candles BTC-USDT --bar 4H --limit 50  → recent OHLCV for range\n2. okx-cex-market    okx market ticker BTC-USDT                        → current price\n3. okx-cex-market    okx market orderbook BTC-USDT --sz 20             → liquidity check\n        ↓ decide minPx \u002F maxPx\n4. okx-cex-bot       okx bot grid create --instId BTC-USDT ...\n```\n\n### Compare perp vs spot premium\n> User: \"Is there a premium between BTC spot and BTC perp?\"\n\n```\n1. okx-cex-market    okx market ticker BTC-USDT              → spot last price\n2. okx-cex-market    okx market ticker BTC-USDT-SWAP         → perp last price\n3. okx-cex-market    okx market mark-price --instType SWAP --instId BTC-USDT-SWAP  → mark price\n```\n\n### Discover and price an option\n> User: \"What's the price of a BTC call option expiring this week?\"\n\n```\n1. okx-cex-market    okx market open-interest --instType OPTION --instId BTC-USD  → list active option instIds\n        ↓ pick target instId from the list (e.g., BTC-USD-250328-95000-C)\n2. okx-cex-market    okx market ticker BTC-USD-250328-95000-C → option last price and stats\n3. okx-cex-market    okx market orderbook BTC-USD-250328-95000-C → bid\u002Fask spread\n```\n\n> **Note**: `okx market instruments --instType OPTION` requires `--uly \u003Cunderlying>` (e.g., `--uly BTC-USD`). If the underlying is unknown, use `open-interest` first to discover active option instIds.\n\n## Operation Flow\n\n### Step 1: Identify the data needed\n\n- Current price → `okx market ticker`\n- All prices for a category → `okx market tickers`\n- Order book depth → `okx market orderbook`\n- Price history\u002Fchart → `okx market candles`\n- Funding cost → `okx market funding-rate`\n- Contract valuation → `okx market mark-price` or `okx market price-limit`\n- Market volume\u002FOI → `okx market open-interest`\n- What instruments exist → `okx market instruments`\n\n### Step 2: Run commands immediately\n\nAll market data commands are read-only — no confirmation needed.\n\n- `--instType` values: `SPOT`, `SWAP`, `FUTURES`, `OPTION`\n- `--bar` values: `1m`, `3m`, `5m`, `15m`, `30m`, `1H`, `2H`, `4H`, `6H`, `12H`, `1D`, `1W`, `1M`\n- `--limit`: number of results (default varies per endpoint, typically 100)\n- `--history`: for `funding-rate`, returns historical records instead of current rate\n\n### Step 3: No writes — no verification needed\n\nAll commands in this skill are read-only. No post-execution verification required.\n\n## CLI Command Reference\n\n### Ticker — Single Instrument\n\n```bash\nokx market ticker \u003CinstId> [--json]\n```\n\nReturns: `last`, `24h high\u002Flow`, `24h volume`, `sodUtc8` (24h change %).\n\n---\n\n### Tickers — All Instruments of a Type\n\n```bash\nokx market tickers \u003CinstType> [--json]\n```\n\n| Param | Required | Values | Description |\n|---|---|---|---|\n| `instType` | Yes | `SPOT`, `SWAP`, `FUTURES`, `OPTION` | Instrument type |\n\nReturns table: `instId`, `last`, `high24h`, `low24h`, `vol24h`.\n\n---\n\n### Instruments — List Tradeable Instruments\n\n```bash\nokx market instruments --instType \u003Ctype> [--instId \u003Cid>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `--instType` | Yes | - | `SPOT`, `SWAP`, `FUTURES`, `OPTION` |\n| `--instId` | No | - | Filter to a single instrument |\n\nReturns: `instId`, `ctVal`, `lotSz`, `minSz`, `tickSz`, `state`. Displays up to 50 rows.\n\n---\n\n### Order Book\n\n```bash\nokx market orderbook \u003CinstId> [--sz \u003Cn>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `instId` | Yes | - | Instrument ID (e.g., `BTC-USDT-SWAP`) |\n| `--sz` | No | 5 | Depth levels per side (1–400) |\n\nDisplays top 5 asks (ascending) and bids (descending) with price and size.\n\n---\n\n### Candles — OHLCV\n\n```bash\nokx market candles \u003CinstId> [--bar \u003Cbar>] [--limit \u003Cn>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `instId` | Yes | - | Instrument ID |\n| `--bar` | No | `1m` | Time granularity (`1m`, `1H`, `4H`, `1D`, etc.) |\n| `--limit` | No | 100 | Number of candles to return |\n\nReturns columns: `time`, `open`, `high`, `low`, `close`, `vol`.\n\n---\n\n### Index Candles\n\n```bash\nokx market index-candles \u003CinstId> [--bar \u003Cbar>] [--limit \u003Cn>] [--history] [--json]\n```\n\nSame params as `candles`. Use index instrument IDs like `BTC-USD` (not `BTC-USDT`).\n\n---\n\n### Funding Rate\n\n```bash\nokx market funding-rate \u003CinstId> [--history] [--limit \u003Cn>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `instId` | Yes | - | SWAP instrument (e.g., `BTC-USDT-SWAP`) |\n| `--history` | No | false | Return historical funding rates |\n| `--limit` | No | - | Number of historical records |\n\nCurrent (no `--history`): returns `fundingRate`, `nextFundingRate`, `fundingTime`, `nextFundingTime`.\nHistorical (`--history`): table with `fundingRate`, `realizedRate`, `fundingTime`.\n\n---\n\n### Recent Trades\n\n```bash\nokx market trades \u003CinstId> [--limit \u003Cn>] [--json]\n```\n\nReturns: `tradeId`, `px`, `sz`, `side`, `ts`.\n\n---\n\n### Mark Price\n\n```bash\nokx market mark-price --instType \u003Ctype> [--instId \u003Cid>] [--json]\n```\n\nReturns: `instId`, `instType`, `markPx`, `ts`. Used for liquidation price calculation and contract valuation.\n\n---\n\n### Index Ticker\n\n```bash\nokx market index-ticker [--instId \u003Cid>] [--quoteCcy \u003Cccy>] [--json]\n```\n\n| Param | Required | Default | Description |\n|---|---|---|---|\n| `--instId` | Cond. | - | Index ID (e.g., `BTC-USD`) |\n| `--quoteCcy` | Cond. | - | Filter by quote currency (e.g., `USD`, `USDT`) |\n\nReturns: `idxPx`, `high24h`, `low24h`.\n\n---\n\n### Price Limit\n\n```bash\nokx market price-limit \u003CinstId> [--json]\n```\n\nReturns: `buyLmt` (max buy price), `sellLmt` (min sell price). Applies to SWAP and FUTURES only.\n\n---\n\n### Open Interest\n\n```bash\nokx market open-interest --instType \u003Ctype> [--instId \u003Cid>] [--json]\n```\n\nReturns: `oi` (contracts), `oiCcy` (base currency amount), `ts`.\n\n---\n\n## MCP Tool Reference\n\n| Tool | Description |\n|---|---|\n| `market_get_ticker` | Single instrument ticker |\n| `market_get_tickers` | All tickers for instType |\n| `market_get_instruments` | List instruments |\n| `market_get_orderbook` | Order book depth |\n| `market_get_candles` | OHLCV candles |\n| `market_get_index_candles` | Index OHLCV candles |\n| `market_get_funding_rate` | Funding rate (current or history) |\n| `market_get_trades` | Recent public trades |\n| `market_get_mark_price` | Mark price for contracts |\n| `market_get_index_ticker` | Index price ticker |\n| `market_get_price_limit` | Price limits for contracts |\n| `market_get_open_interest` | Open interest |\n\n---\n\n## Input \u002F Output Examples\n\n**\"What's the price of BTC?\"**\n```bash\nokx market ticker BTC-USDT\n# → instId: BTC-USDT | last: 95000.5 | 24h change %: +1.2% | 24h high: 96000 | 24h low: 93000\n```\n\n**\"Show me all SWAP tickers\"**\n```bash\nokx market tickers SWAP\n# → table of all perpetual contracts with last price, 24h high\u002Flow\u002Fvol\n```\n\n**\"What's the BTC\u002FUSDT order book look like?\"**\n```bash\nokx market orderbook BTC-USDT\n# Asks (price \u002F size):\n#          95100.0  2.5\n#          95050.0  1.2\n# Bids (price \u002F size):\n#          95000.0  3.1\n#          94950.0  0.8\n```\n\n**\"Show me BTC 4H candles for the last 30 periods\"**\n```bash\nokx market candles BTC-USDT --bar 4H --limit 30\n# → table: time, open, high, low, close, vol\n```\n\n**\"What's the current funding rate for BTC perp?\"**\n```bash\nokx market funding-rate BTC-USDT-SWAP\n# → fundingRate: 0.0001 | nextFundingRate: 0.00012 | fundingTime: ... | nextFundingTime: ...\n```\n\n**\"Show historical funding rates for ETH perp\"**\n```bash\nokx market funding-rate ETH-USDT-SWAP --history --limit 20\n# → table: fundingRate, realizedRate, fundingTime\n```\n\n**\"What's the open interest on BTC perp?\"**\n```bash\nokx market open-interest --instType SWAP --instId BTC-USDT-SWAP\n# → oi: 125000 | oiCcy: 125000 | ts: ...\n```\n\n**\"List all available SPOT instruments\"**\n```bash\nokx market instruments --instType SPOT\n# → table: instId, ctVal, lotSz, minSz, tickSz, state (up to 50 rows)\n```\n\n## Edge Cases\n\n- **instId format**: SPOT uses `BTC-USDT`; SWAP uses `BTC-USDT-SWAP`; FUTURES uses `BTC-USDT-250328`; OPTION uses `BTC-USD-250328-95000-C`; Index uses `BTC-USD`\n- **OPTION instruments — cannot list directly**: `okx market instruments --instType OPTION` requires `--uly BTC-USD` (underlying). If the underlying is unknown, run `okx market open-interest --instType OPTION` first to discover active option instIds from the results, then use those instIds with `okx market ticker \u003CinstId>`\n- **No data returned**: instrument may be delisted or instId is wrong — verify with `okx market instruments`\n- **funding-rate**: only applies to SWAP instruments; returns error for SPOT\u002FFUTURES\n- **price-limit**: only applies to SWAP and FUTURES instruments\n- **mark-price**: available for SWAP, FUTURES, OPTION; not applicable to SPOT\n- **candles --bar**: use uppercase `H`, `D`, `W`, `M` for hour\u002Fday\u002Fweek\u002Fmonth (e.g., `1H` not `1h`)\n- **index-ticker**: use `BTC-USD` format (not `BTC-USDT`) for index IDs\n- **orderbook --sz**: max depth is 400; default display shows top 5 per side regardless of `--sz`\n\n## Global Notes\n\n- All market data commands are public — no API key required\n- `--json` returns raw OKX API v5 response for programmatic use\n- `--profile \u003Cname>` has no effect on market commands (no auth needed)\n- Rate limit: 20 requests per 2 seconds per IP for market data endpoints\n- Candle data is sorted newest-first by default\n- `vol24h` in tickers is in base currency (e.g., BTC for BTC-USDT)\n",{"name":5,"license":15,"metadata":47,"description":7},{"agent":48,"author":22,"version":58,"homepage":59},{"install":49,"requires":56},[50],{"id":51,"bins":52,"kind":53,"label":54,"package":55},"npm",[22],"node","Install okx CLI (npm)","@okx_ai\u002Fokx-trade-cli",{"bins":57},[22],"1.0.0","https:\u002F\u002Fwww.okx.com","main","3df1d0d67b30ff15236561f8c0f9f06d33f42dfd","skills\u002Fexchanges\u002Fokx-cex-market",17,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia","https:\u002F\u002Feth2030.com","Hardcore infra. Building @alt-research and applied cryptography.","2026-11-15 02:28:10",{"source":8,"skillName":5,"commands":70,"prompt":80,"zipAvailable":81},[71,74,77],{"tool":72,"command":73},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill okx-cex-market",{"tool":75,"command":76},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill okx-cex-market",{"tool":78,"command":79},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill okx-cex-market","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fokx-cex-market\u002FSKILL.md",true,[83,89,93],{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"_meta.json","REFERENCE","参考文档",283,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fokx-cex-market\u002F_meta.json",{"path":90,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":91,"sourceHtmlUrl":92},"SOURCE.md",275,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fokx-cex-market\u002FSOURCE.md",{"path":94,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":95,"sourceHtmlUrl":96},"TRUST.auto.yaml",2242,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fexchanges\u002Fokx-cex-market\u002FTRUST.auto.yaml",[98,107,115,123,131,138],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":102,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":106},"01M7DTKCERMV0RNX3HZJP4CZ26","troves","Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say \"Troves\" explicitly.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":106},"01M7DTK6CJSMGC8KCQHGNYFZBD","trade","Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say \"swap\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":106},"01M7DTJZ6A0X4PAW3Y8W4J9K64","staking","Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say \"stake\" explicitly.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":127,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":106},"01M7DTJSDZJKCDMW7GHRF4BRH5","send","Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say \"pay 10 STRK to 0x...\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FSKILL.md",[],[],{"skillNo":132,"name":35,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":134,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":106},"01M7DTJG1E480D51ZQ7WKDQ26K","View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks \"what do I have\", \"show me everything\", \"how much am I worth\", \"my positions\", \"my investments\", \"rebalance my portfolio\", \"I want 50% ETH\", \"optimize my holdings\", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say \"portfolio\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FSKILL.md",[],[],{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":142,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":106},"01M7DTJ7M8TE9R2N36HFBZDGVD","multi-swap","Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions \"two swaps\", \"three swaps\", \"swap X and Y at the same time\", or wants to convert multiple tokens in a single call.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FSKILL.md",[],[]]