К основному содержанию
скилл CX Codex

okx-cex-market — скилл рыночных данных OKX

Скилл отдаёт агенту публичные данные OKX: цены, стаканы, свечи, ставки финансирования, открытый интерес и технические индикаторы. Только чтение, ключи API не нужны.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add okx/agent-skills --skill okx-cex-market -a claude-code
Открыть на GitHub

Что делает okx-cex-market

Скилл подключает к агенту CLI okx и открывает доступ к публичной рыночной статистике OKX. Спросите про цену инструмента, стакан, свечи OHLCV, ставку финансирования, открытый интерес или список инструментов — команда вернёт данные без всякой авторизации. Есть скринер: okx market filter фильтрует и ранжирует инструменты по цене, объёму, OI, ставке финансирования и капитализации, а okx market oi-change ищет контракты с самыми крупными изменениями открытого интереса.

Технические индикаторы считает отдельная команда okx market indicator — RSI, MACD, EMA, Bollinger Bands, KDJ, SuperTrend, AHR999, BTC rainbow и ещё больше семидесяти. Для индикаторов с периодом CLI сам подставляет разумное значение, если не передать --params; явный --params всегда перекрывает это значение. Если значений не нашлось, CLI печатает подсказку, а не молчит. Любая команда принимает --json для сырого ответа OKX API v5 и --env, чтобы обернуть вывод в {"env", "profile", "data"}.

Перед первым запуском нужен бинарник okx: npm install -g @okx_ai/okx-trade-cli, проверить можно через okx market ticker BTC-USDT. Скилл покрывает только рыночные данные. Баланс и позиции — это okx-cex-portfolio, выставление и отмена ордеров — okx-cex-trade, боты — okx-cex-bot. Если нужен трейд по направленному взгляду через event-контракт, тоже идите в okx-cex-trade.

Какие задачи решает

  • узнать последнюю цену и изменение за 24 часа по инструменту
  • посмотреть стакан и недавние публичные сделки
  • выгрузить свечи OHLCV за нужный период
  • отследить ставку финансирования и открытый интерес по свопам
  • отфильтровать инструменты по объёму, OI и капитализации

Примеры запросов агенту

  • покажи тикер BTC-USDT
  • какие свопы сильнее всего изменились по открытому интересу за час
  • посчитай RSI и MACD для ETH-USDT на дневных свечах

Как установить okx-cex-market

1Через Skills CLI (Vercel)

npx skills add okx/agent-skills --skill okx-cex-market -a claude-code

2Вручную: положить файлы

~/.claude/skills/okx-cex-market/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/okx-cex-market/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о okx-cex-market

Как установить okx-cex-market в Claude?

Сначала добавьте скилл командой npx skills add okx/agent-skills --skill okx-cex-market -a claude-code, затем поставьте CLI: npm install -g @okx_ai/okx-trade-cli. Файл скилла окажется в ~/.claude/skills/okx-cex-market/SKILL.md.

Что делает okx-cex-market?

Даёт агенту публичные рыночные данные OKX: цены, стаканы, свечи, ставки финансирования, открытый интерес, списки инструментов и технические индикаторы. Все команды только читают данные.

Нужны ли API-ключи для okx-cex-market?

Нет. Команды рыночных данных возвращают публичную информацию независимо от режима demo или live, поэтому учётные данные не требуются. Режим demo или live влияет только на контекст окружения.

Исходный текст

SKILL.md · MIT
---
name: okx-cex-market
description: "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). Do NOT use when the user wants to TRADE a directional view as an event contract — that is okx-cex-trade. Merely ASKING which way an asset's price is moving is a market-data question and belongs here."
license: MIT
metadata:
  author: okx
  version: "1.4.9"
  homepage: "https://www.okx.com"
  agent:
    requires:
      bins: ["okx"]
    install:
      - id: npm
        kind: node
        package: "@okx_ai/[email protected]"
        bins: ["okx"]
        label: "Install okx CLI (npm)"
---

# 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`](../_shared/preflight.md).
Use `metadata.version` from this file's frontmatter as the reference for Step 2.

## Install

```bash
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 |

---

## Operation Flow

### Step 1 — Identify data type and load reference

| 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.

### Step 2 — Run commands immediately

All market data commands are read-only — no confirmation needed.

### Step 3 — No writes, no verification needed

All commands in this skill are read-only.

---

## Edge Cases

- **instId format**: SPOT `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 first
- **OPTION listing**: `instruments --instType OPTION` requires `--uly BTC-USD` or `--instFamily BTC-USD`; if unknown, run `open-interest --instType OPTION` first to discover active instIds
- **EVENTS listing**: `instruments --instType EVENTS` requires `--seriesId` (e.g. `--seriesId BTC-ABOVE-DAILY`); run `okx event series` first to discover valid series IDs
- **funding-rate / price-limit**: SWAP only · mark-price: SWAP / FUTURES / OPTION only
- **candles `--bar`**: uppercase — `1H` not `1h`; use `--after <ts>` to paginate back into historical data (back to 2021); index-candles supports `--history` for extended history
- **⚠️ Large historical range**: before fetching with `--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.
- **indicator `--bar`**: uses `1Dutc` not `1D`, `1Wutc` not `1W` — different from candle bar values
- **`market filter` sortBy values**: `last` `chg24hPct` `marketCapUsd` `volUsd24h` `fundingRate` `oiUsd` `listTime` — default `volUsd24h`
- **`market filter` ctType**: `linear` or `inverse` (SWAP/FUTURES only); omit for SPOT
- **`market filter` quoteCcy**: comma-separated list supported, e.g. `--quoteCcy USDT,USDC`
- **`market 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 pagination
- **`market 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.
- **indicator `--bar` valid values**: `3m` `5m` `15m` `1H` `4H` `12Hutc` `1Dutc` `3Dutc` `1Wutc` — `1m` is **not supported** for indicators (use `candles` for 1-minute data)
- **indicator `--limit`**: 1–100 (only used with `returnList`, i.e. when a historical series is requested)
- **indicator arg order**: indicator name before instId — `okx market indicator rsi BTC-USDT`
- **indicator `--params`**: comma-separated, no spaces — `--params 5,20`. For period-based indicators (ema/ma/wma/rsi/macd/bb/…) omitting `--params` makes the CLI substitute a default period (EMA/MA/WMA/RSI → `14`, MACD → `12,26,9`, BB → `20,2`) so the table is populated instead of empty; pass `--params` explicitly to override the default. (CLI-only convenience — the MCP `market_get_indicator` raw-data path still requires an explicit `paramList`.)
- **indicator no values returned**: the CLI never prints nothing — if a query yields no values (e.g. a non-period indicator, or a period indicator with no default), it prints a visible hint: `No indicator values returned. This indicator may require a period — try --params (e.g. --params 14).`
- **BTC-only indicators**: `ahr999`, `rainbow` — BTC-USDT only
- **Unknown indicator name**: returns a `ValidationError` with similar-name suggestions before the API is called — use `market_list_indicators` / `okx market indicator list` to see all valid names
- **Stock token hours**: US stocks trade Mon–Fri ~09:30–16:00 ET; verify live price before acting
- **No data returned**: instrument may be delisted — verify with `okx market instruments`
- **`boll`** is an alias for `bb`

## Global Notes

- No API key required for any command in this skill
- Rate limit: 20 req / 2 s per IP
- Candle data is sorted newest-first
- `vol24h` 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 context

© okx · MIT · okx/agent-skills

Похожие скиллы

Всё по теме «Финансы и бизнес» →
okx-dex-market okx Скилл версии 4.6.6 для чтения данных DEX: котировки, пулы ликвидности, сигналы китов, трейдерские балансы и проверка снайперов в мемкоинах. CX Codex +1 19 100установок okx-agentic-wallet okx Скилл подключает агента к кошелькам OKX Onchain OS: балансы, переводы, свопы, бриджи, лимитные ордера и вызовы контрактов через CLI onchainos. CX Codex +1 17 400установок live-feed marketcalls Скилл собирает скрипт, который подписывается на WebSocket OpenAlgo и считает индикаторы по живому потоку. Пригодится, когда нужен реальный фид, а не бэктест. CX Codex +1 550установок crypto-market-rank binance-web3-team Скилл отдаёт агенту готовые рейтинги крипторынка: тренды и топ-поиск, соцшум с тональностью, приток умных денег, мемкоины Pulse и лидерборд трейдеров по PnL. CX Codex +1 9 200установок emblem-market-research EmblemAI Скилл подтягивает данные о крипторынке: трендовые токены, деривативы, потоки умных денег. Пригодится, когда нужен разбор токена или позиций китов. CX Codex +1 8 900установок custom-indicators agiprolabs Скилл для расчёта девяти крипто-специфичных индикаторов: NVT, MVRV, потоки на биржи, ставка финансирования, моментум открытого интереса. CX Codex +1 454установок

Из того же набора10

okx-cex-trade Скилл для ИИ-агента, который ставит, отменяет и меняет ордера на бирже OKX: спот, свопы, фьючерсы, опционы и событийные контракты. CX Codex +1 10 300установок okx-cex-portfolio Скилл для проверки баланса, открытых позиций, PnL и истории комиссий на бирже OKX через утилиту okx CLI. Помогает следить за счетами прямо в диалоге с агентом. CX Codex +1 10 100установок okx-cex-bot Управляет торговыми сеточными, DCA и портфельными ботами на OKX через CLI. Пригодится для автоматизации стратегий прямо из окна агента. CX Codex +1 9 900установок okx-cex-earn Скилл для работы с продуктами OKX Earn из терминала: Simple Earn, Flash Earn, стейкинг, Dual Investment и AutoEarn. CX Codex +1 9 200установок okx-sentiment-tracker Скилл запрашивает криптоновости, настроения по монетам и экономический календарь через OKX. Нужен для сводок, поиска новостей и оценки рыночного настроя. CX Codex +1 8 100установок okx-cex-skill-mp Скилл ищет, ставит, обновляет и проверяет ИИ-скиллы для трейдинга из маркетплейса OKX Skills Marketplace прямо из агента. CX Codex +1 8 200установок okx-cex-auth Настраивает OAuth-вход в OKX CLI, проверяет сессию и помогает восстановить авторизацию после ошибки. CX Codex +1 5 900установок okx-cex-smartmoney Анализирует рейтинг трейдеров OKX, их позиции, сделки и сводные сигналы. Пригодится для проверки активности Smart Money по монетам и авторам. CX Codex +1 5 900установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой