Unified Markets · CEX, PerpDEX & DEX · 57 venues
Unified CEX & PerpDEX Markets API
Read venue descriptors & browser-direct ws_schemas, fast symbol search, OHLCV klines
(native CEX/PerpDEX, automatic TradingView fallback for equities/FX, and market=dex
1s..1w candles), L2 orderbooks, trades, funding history, instrument cards, read-only batch
POST /unified/markets/bulk, arbitrage spreads and canonical cross-exchange token
resolution across 57 exchanges with one X-Hub-Key.
19 Canonical Routes
| Route | Area | Description |
|---|---|---|
GET /unified/markets/venues | Catalog | List all 57 CEX and PerpDEX venues with live spot/futures pair counts, network assets, freshness and asset graph totals. |
GET /unified/markets/descriptors | Catalog | Declarative venue metadata across 57 exchanges: capabilities, deep-link templates, icons, TradingView symbol mappings and browser-direct ws_schemas (60s cache + ETag/304). |
GET /unified/markets/search | Search | Fast cross-venue spot & futures symbol search ranked by exact match and 24h volume with change_24h_pct, icons and tv_symbol (q 1..64, market, exchange, limit 1..100). |
GET /unified/markets/klines | Charts | Canonical OHLCV candlesticks across CEX, PerpDEX, on-chain DEX (market=dex via OKX DEX 1s..1w) and automatic TradingView fallback (fallback=auto|none|tv) for equities, FX and additional venues. |
GET /unified/markets/orderbook | Liquidity | Normalized L2 orderbook snapshot (bids, asks, mid, spread_bps and 1% USD depth) for a spot or futures symbol (depth 5..200). |
GET /unified/markets/trades | Liquidity | Recent normalized public trades (price, qty, quote_qty, side, ts_ms) for tick and sub-minute backfill (limit 1..1000). |
GET /unified/markets/funding-history | Funding | Historical perpetual funding rate settlements (ts_ms, rate, interval_hours) for a symbol on a venue (limit 1..200, start_ms, end_ms). |
GET /unified/markets/instrument | Instrument | Single-call instrument card with live ticker, funding, limits, canonical binding, trade/deposit/withdraw links, networks, icons, tv_symbol and browser WS spec. |
GET /unified/markets/ws-token | Streaming | Stateless WebSocket connection token and endpoint helper for token-gated browser-direct exchange WebSockets (such as KuCoin). |
POST /unified/markets/bulk | Batch | Read-only batch lookup for up to 50 instruments and/or 20 base assets in one HTTP call with selectable ticker, funding, links, networks and icon sections. |
GET /unified/cex/tickers | Spot | Live spot tickers across 40+ CEX venues with bid/ask, 24h change, 24h quote volume and canonical asset binding. Filters: exchange, base, limit (1..2000). |
GET /unified/cex/networks | Networks | Live deposit and withdrawal availability, network fees, minimums, confirmations and contract addresses. Filters: exchange, ticker. |
GET /unified/perps/tickers | Perps | Live perpetual and futures tickers across CEX and PerpDEX venues with mark/index price, open interest and funding. Filters: exchange, base, limit (1..2000). |
GET /unified/perps/funding | Funding | Live perpetual funding rates sorted by absolute funding rate descending with interval and next settlement timestamp. Filters: exchange, base, limit (1..1000). |
GET /unified/spreads | Spreads | Live cross-venue arbitrage spreads (spot-spot, futures-futures, spot-futures, funding-spread) with optional transferability and confidence filters (limit 1..500). |
GET /unified/assets/resolve | Normalization | Resolve an exchange spot or futures symbol (exchange, market, symbol) to its canonical asset ID, multiplier, confidence and proof tier. |
GET /unified/assets/profile | Normalization | Cross-exchange asset profile by canonical_id or base symbol: on-chain contracts, all spot/futures venues, icon URL and active spreads. |
GET /unified/assets/graph/stats | Normalization | Cross-venue asset normalization graph summary: canonical asset counts, proof tiers and collision splits. |
GET /unified/contracts/{address} | Normalization | Look up every CEX venue and ticker supporting a given on-chain token contract address. |
Quick curl Examples
# Venue descriptors (browser-direct ws_schemas, links, icons, ETag/304) & symbol search
curl -i -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/descriptors?exchange=binance"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/search?q=BTC&limit=10"
# OHLCV klines: native CEX/PerpDEX, TradingView auto-fallback (NASDAQ:NVDA) & 1s DEX (SOL)
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/klines?exchange=binance&market=futures&symbol=BTCUSDT&interval=15m&limit=50"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/klines?exchange=NASDAQ&market=spot&symbol=NASDAQ:NVDA&interval=15m&limit=10&fallback=auto"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/klines?exchange=okx_dex&market=dex&symbol=501:So11111111111111111111111111111111111111112&interval=1s&limit=10"
# L2 orderbook, recent trades, funding history, instrument card & WS token
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/orderbook?exchange=hyperliquid&market=futures&symbol=BTC&depth=20"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/trades?exchange=binance&market=spot&symbol=BTCUSDT&limit=50"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/funding-history?exchange=bybit&symbol=BTCUSDT&limit=20"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/instrument?exchange=bybit&market=futures&symbol=BTCUSDT"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/markets/ws-token?exchange=kucoin&market=spot"
# Read-only batch bulk lookup & cross-exchange asset profile
curl -X POST -H "X-Hub-Key: $API_HUB_KEY" -H "Content-Type: application/json" \
-d '{"instruments":[{"exchange":"binance","market":"futures","symbol":"BTCUSDT"}],"bases":["SOL"]}' \
"https://openapihub.dev/unified/markets/bulk"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/assets/profile?base=ETH"
# Live arbitrage spreads, funding rates & deposit/withdraw networks
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/spreads?kind=spot-spot&min_spread_pct=0.5&transferable=true&limit=25"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/perps/funding?limit=20"
curl -H "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/unified/cex/networks?exchange=binance&ticker=USDT"
MCP Tools (POST /mcp)
AI agents using the remote MCP server can query Unified Markets directly via 8 dedicated read-only tools:
| Tool | Purpose |
|---|---|
markets_venues | List all 57 CEX and PerpDEX venues with live pair counts and freshness |
markets_tickers | Query normalized spot (market_type=spot) or perpetual (market_type=perps) tickers |
markets_funding | Query perpetual funding rates sorted by absolute rate descending |
markets_spreads | Scan cross-venue arbitrage spreads (spot, futures, basis and funding spreads) |
markets_search | Search spot and futures symbols across 57 venues ranked by exact match and 24h volume |
markets_klines | Fetch OHLCV candlesticks across CEX, PerpDEX, DEX (market=dex) and TradingView auto-fallback |
markets_orderbook | Read normalized L2 orderbook snapshot (bids, asks, mid, spread_bps and 1% USD depth) |
markets_instrument | Fetch a full single-call instrument card (ticker, funding, limits, links, networks, ws) |
FAQ
What is the Unified Markets (CEX & PerpDEX) API?
A normalized read-only market data plane aggregating 57 centralized exchanges (40+ CEX) and decentralized perpetual exchanges (15+ PerpDEX) behind one X-Hub-Key: venue descriptors with browser-direct ws_schemas, fast symbol search, OHLCV klines with automatic TradingView fallback and OKX DEX routing (market=dex), L2 orderbooks, trades, funding history, single-call instrument cards, batch POST /unified/markets/bulk, live spreads and canonical cross-exchange token resolution.
How does automatic TradingView fallback and DEX routing work on /unified/markets/klines?
By default (fallback=auto), /unified/markets/klines serves native CEX/PerpDEX bars (source=native) and transparently falls back to TradingView (source=tradingview_fallback) for equities (e.g. NASDAQ:NVDA), FX or venues/intervals unavailable natively. Pass fallback=none to disable fallback, fallback=tv to force TradingView, or market=dex with symbol={chainId}:{tokenAddress} (e.g. 501:So111...) for 1s..1w DEX candlesticks (source=dex_native).
How do browser-direct WebSockets work with /unified/markets/descriptors?
GET /unified/markets/descriptors returns declarative ws_schemas per venue (endpoint, parser_profile, subscribe templates, ping_interval_ms) cached for 60s with ETag / If-None-Match 304 support. Token-gated venues such as KuCoin expose requires_ws_token=true and a stateless helper at GET /unified/markets/ws-token.
How can I filter arbitrage spreads to transferable opportunities?
Call GET /unified/spreads?kind=spot-spot&min_spread_pct=0.5&transferable=true to keep only opportunities where the buy venue has withdrawals open and the sell venue has deposits open on a shared blockchain network.
Can AI agents query Unified Markets via MCP?
Yes. Eight dedicated read-only MCP tools (markets_venues, markets_tickers, markets_funding, markets_spreads, markets_search, markets_klines, markets_orderbook and markets_instrument) are available at POST /mcp.
Are Unified Markets routes read-only?
Yes. All 19 routes (18 GET plus the read-only batch POST /unified/markets/bulk) and all 8 MCP tools are strictly read-only; no orders are placed and no exchange credentials are required.