okx-spot-derivatives-mcp
Queries OKX public v5 API endpoints without an API key, providing live spot and perpetual swap tickers, orderbook depth with spread and volume imbalance, OHLCV candlesticks from 1 minute to 1 week, perpetual funding rates with annualized APR, and rankings of active markets by 24h quote volume.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@okx-spot-derivatives-mcp show me the current BTC-USDT perpetual funding rate and annualized APR"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
okx-spot-derivatives-mcp
Live OKX spot and perpetual swap tickers, orderbook depth, OHLCV candlestick bars, perpetual funding rates, and 24h volume leaders over Model Context Protocol (MCP). Trading desks, market makers, and quantitative researchers can query OKX public v5 endpoints directly without an API key or account. It connects right away.
Hosted endpoint
Point any Streamable HTTP MCP client at the free hosted Cloudflare Worker endpoint.
https://okx-spot-derivatives-mcp.lipmichal.workers.dev/mcpRelated MCP server: mcp-okx
Available tools
Tool | Purpose |
| Fetch live OKX spot or perpetual swap ticker with last price, bid, ask, spread in bps, 24h high, low, and volume |
| Retrieve live OKX orderbook depth with top bids, asks, spread, and bid/ask volume imbalance |
| Pull OKX OHLCV candlestick bars across intervals from 1 minute to 1 week |
| Inspect current and next OKX perpetual swap funding rates with annualized APR and funding timestamp |
| Rank active OKX spot or swap markets by 24h quote volume with optional symbol filter |
Client configuration
Add the remote URL to Claude Desktop, Cursor, or VS Code MCP settings.
{
"mcpServers": {
"okx-spot-derivatives": {
"url": "https://okx-spot-derivatives-mcp.lipmichal.workers.dev/mcp"
}
}
}Run locally over stdio
You can also run the server locally on Node 20 or newer over stdio.
npm install
npm startCompliance and reliability
Every upstream request queries www.okx.com/api/v5/ with a polite User-Agent header and automatic retry on transient network or 5xx errors. Cloudflare edge caching applies only to HTTP 2xx responses, so upstream faults don't linger in cache. All five tools declare read-only, non-destructive, idempotent, open-world annotations, and the Worker negotiates newer MCP protocol versions down to the SDK version cleanly.
More MCP servers and readiness check
This server belongs to the public MCP directory maintained by MCPStamp and Zovo.
Free live-data MCP directory with hosted keyless endpoints and client setup guides.
Free MCP readiness checker to score any MCP server for Claude, ChatGPT, and registry submission.
MCP Readiness Audit ($490) for teams shipping a production server who want a hands-on security, schema, and store review.
Zovo Pro MCP Bundle ($39 one-time) with hosted commercial servers and priority endpoints.
Available Tools
5 toolsget_okx_candlesGet OKX candlestick barsBRead-onlyIdempotentInspect
Fetch OHLCV candlestick bars for an OKX spot or perpetual swap instrument.
Inputs: bar, limit, inst_id.
get_okx_funding_rateGet OKX perpetual funding rateARead-onlyIdempotentInspect
Fetch the live OKX perpetual swap funding rate, annualized APR, min/max bounds, and next funding timestamp.
Inputs: inst_id.
get_okx_orderbookGet OKX orderbook depthBRead-onlyIdempotentInspect
Retrieve top bid and ask levels from the live OKX orderbook along with spread in bps and bid/ask volume imbalance.
Inputs: depth, inst_id.
get_okx_tickerGet OKX live tickerARead-onlyIdempotentInspect
Fetch live OKX spot or perpetual swap ticker including last price, best bid, best ask, spread in basis points, 24h high/low, and volume.
Inputs: inst_id.
list_okx_top_marketsList OKX top markets by volumeARead-onlyIdempotentInspect
Rank active OKX spot, perpetual swap, or futures markets by 24h quote volume with optional symbol search.
Inputs: limit, search, inst_type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool maps to a distinct market-data artifact: snapshot ticker, orderbook depth, OHLCV candles, funding rate, and market rankings. The only mild overlap is spread reporting in both ticker and orderbook, but the primary resources are clearly separate and an agent can select confidently.
All five names follow a predictable verb_okx_noun pattern (get_okx_*, list_okx_*), with the verb varying meaningfully between single-resource fetch and ranked listing. Uniform snake_case with a consistent domain prefix.
Five tools is well-scoped for a read-only OKX market-data server; each covers a distinct data type with no filler. Nothing feels redundant or conspicuously absent in terms of surface size.
Core market snapshots are covered (price, depth, candles, funding, rankings), enabling most analysis workflows. Minor gaps remain for a derivatives data surface — no open interest, mark/index price, or historical funding rate series — though agents can approximate much of this from the existing tools.
Maintenance
Related MCP Connectors
Read-only crypto, equities, FX and commodities market data. No trading tools. API key required.
Read-only market data on derivatives: digital asset and US stock perpetuals, liquidations, options.
Hyperliquid public API for perpetual futures mid prices, funding rates, OI, and L2 books.
51Find, plan and download historical crypto order book, trade and liquidation data. Read-only.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides real-time and historical cryptocurrency price data from the OKX exchange, including live WebSocket updates, candlestick charts, and visual price analysis for trading pairs.53ISC
- AlicenseNot gradedqualityCmaintenanceProvides tools to query OKX cryptocurrency exchange data including instruments, tickers, candles, funding rates, and mark prices via MCP.92 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents and developers to retrieve read-only OKX public market data such as tickers, OHLCV candles, funding rates, and open interest, and to run stateless threshold alerts through MCP tools or a CLI with strict allowlisting and no credentials.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables users to inspect live spot market tickers, OHLC candlesticks, orderbook depth, tradable pairs, and recent trades without an API key or account.MIT