Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add okx/agent-skills --skill okx-cex-marketgit clone --depth 1 https://github.com/okx/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/okx/agent-skills/okx-cex-market)<a href="https://agentmods.dev/skills/okx/agent-skills/okx-cex-market"><img src="https://agentmods.dev/badge/skills/okx/agent-skills/okx-cex-market/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/okx/agent-skills/okx-cex-market"><img src="https://agentmods.dev/badge/skills/okx/agent-skills/okx-cex-market.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk warn
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00242 | $0.04037 |
| Opus 5 | $0.00121 | $0.02018 |
| Sonnet 5 | $0.00048 | $0.00807 |
| Haiku 4.5 | $0.00024 | $0.00404 |
Grade A, and why
okx-cex-market scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to okx-cex-market — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OKX CEX Market Data CLI
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
- Market data / indicators →
okx-cex-market(this skill) - Account balance / positions →
okx-cex-portfolio - Place / cancel orders →
okx-cex-trade - Trading a directional view as an event contract →
okx-cex-trade - Market sentiment / most bullish-bearish coins →
okx-sentiment-tracker - Grid / DCA bots →
okx-cex-bot
Preflight
Before running any command, follow ../_shared/preflight.md.
Use metadata.version from this file's frontmatter as the reference for Step 2.
Install
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 Index
| # | 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); 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). 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. For period-based indicators (ema/ma/wma/rsi/macd/bb/…) the CLI applies a sensible default period when --params is omitted (e.g. EMA/RSI → 14, MACD → 12,26,9, BB → 20,2) so values render without you specifying params; explicit --params always wins. If no values come back, the CLI prints a visible hint (try --params …) — never silent. |
| 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 |
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed · +1 lines c115e533ea62
- 7d ago Changed · +14 lines · +48 tokens per session c195981dc7bb
- 12d ago First seen · 139 lines · 194 tokens per session scan A a4f10bfc37d6
okx-cex-market is a skill published in the GitHub repository okx/agent-skills (172 stars, last pushed 4d ago), licensed MIT. It adds 242 tokens to every session and 4,037 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to okx-cex-market, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
dcf-model
Build discounted cash flow valuation workbooks in Excel.
comps-analysis
Build comparable-company valuation workbooks in Excel.
hyperliquid
Hyperliquid market data, account history, trade review.
stocks
Stock quotes, history, search, compare, crypto via Yahoo.
social-media-intelligence
Social media intelligence: financial signal extraction from Twitter/X, Telegram, Discord, and Reddit for sentiment-driven trading strategies.
vibe-trading
Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract →…