okx-cex-market

Query OKX public market data, derivatives metrics, and technical indicators via CLI.

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/nickthelegend/xorr-monorepo --skill okx-cex-market-nickthelegend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: okx-cex-market
Source: https://github.com/nickthelegend/xorr-monorepo/tree/main/.agents/skills/okx-cex-market
Command: npx skills add https://github.com/nickthelegend/xorr-monorepo --skill okx-cex-market-nickthelegend

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @okx_ai/okx-trade-cli, and includes references (resource) components.

What problem does it solve? Getting reliable crypto and multi-asset market data usually requires writing API integration code, handling authentication, and parsing raw exchange responses. This Skill gives an AI agent direct read-only access to OKX public market data through a CLI, with no API credentials required. ## Core Features & Use Cases - Market Data Queries: Fetch tickers, order books, OHLCV candles back to 2021, recent trades, funding rates, mark prices, and open interest for SPOT, SWAP, FUTURES, and OPTION instruments. - Technical Indicators: Compute 70+ indicators (RSI, MACD, EMA, Bollinger Bands, KDJ, SuperTrend, AHR999, BTC Rainbow) with sensible default parameters and historical series support. - Screening & Discovery: Rank instruments by volume, OI change, funding rate, or price movement, and discover stock tokens, metals, commodities, forex, and bond instruments by category. - Use Case: Ask for the current funding rate and 4H RSI on BTC-USDT-SWAP before deciding whether to open a perpetual position, and get both values immediately without writing any code. ## Quick Start Ask the agent to get the current price and 24-hour statistics for BTC-USDT using the okx market ticker command.

Frequently Asked Questions about okx-cex-market

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get the current price of Bitcoin on OKX?

Run okx market ticker BTC-USDT to get the last price, 24h high/low, volume, and 24h change percentage. No API key is required since all market data commands are read-only public endpoints.

How to check RSI or MACD indicators for a crypto pair?

Use okx market indicator rsi BTC-USDT --bar 4H or okx market indicator macd BTC-USDT --bar 1Dutc. Period-based indicators apply sensible defaults (RSI 14, MACD 12,26,9) when --params is omitted, and --list returns a historical series.

Does OKX market data require an API key?

No. All commands in this skill are read-only public endpoints and work without any API credentials. The only requirement is installing the @okx_ai/okx-trade-cli npm package, and the rate limit is 20 requests per 2 seconds per IP.

Can I get gold, forex, or stock token prices from OKX?

Yes. Run okx market instruments-by-category with --instCategory 3 for stock tokens, 4 for metals like gold, 5 for commodities, 6 for forex, or 7 for bonds to discover valid instIds, then query them with ticker or candles.

Why does funding-rate reject my BTC-USDT instrument ID?

Funding rate only applies to perpetual swap instruments, so the instId must end with -SWAP, such as BTC-USDT-SWAP. Spot IDs like BTC-USDT are rejected; the same SWAP-only restriction applies to price-limit.

How far back does OKX candle history go?

The candles command automatically routes to the historical endpoint when paginating with --after, supporting data back to 2021. For large ranges, estimate the candle count first since fetching more than 500 candles can fill the context window.