WebSocket API Specification
Version 1.0 — April 2026
The Microverse Systems WebSocket API provides real-time, normalized L2 order book data from 21 cryptocurrency exchanges through a single JSON-over-WebSocket endpoint. Data is captured at the network layer with nanosecond-precision timestamps, normalized into a canonical format, and distributed with sub-millisecond latency.
wss://api.microversesystems.com
| Parameter | Value |
|---|---|
| Transport | WebSocket (RFC 6455) over TLS 1.3 |
| Frame type | Text frames (opcode 0x1) |
| Encoding | UTF-8 JSON |
| Keepalive | Client should send ping every 30s |
| Max message size | 1 MB |
const ws = new WebSocket("wss://api.microversesystems.com"); ws.onopen = () => ws.send('{"op":"subscribe","channel":"fullbook:BTC-USDT","depth":20}'); ws.onmessage = (e) => console.log(JSON.parse(e.data));
The public API does not require authentication. Connect directly and subscribe to any channel. Rate limiting is applied per IP address.
All messages are JSON objects sent as WebSocket text frames.
Every client message must include an op field specifying the operation.
{
"op": "subscribe",
"channel": "fullbook:BTC-USDT",
"depth": 20
}
Every server message includes a type field identifying the message type.
{
"type": "snapshot",
"channel": "fullbook:BTC-USDT",
"data": { ... }
}
Subscribe to a market data channel. The server responds with a subscribed acknowledgment followed by continuous snapshot updates.
{
"op": "subscribe",
"channel": "fullbook:BTC-USDT",
"depth": 20
}
| Field | Type | Required | Description |
|---|---|---|---|
| op | string | required | "subscribe" |
| channel | string | required | Channel to subscribe to. See Channel Types. |
| depth | integer | optional | Max price levels per side (1–100). Default: 20. Ignored for top: (always 1). |
# BBO — best bid/offer, 1 level, aggregated across exchanges "channel": "top:BTC-USDT" # Consolidated book — aggregated multi-level, no exchange attribution "channel": "consbook:ETH-USDT" # Full book — all exchanges with attribution "channel": "fullbook:BTC-USDT" # Single exchange book "channel": "binance:BTC-USDT"
Unsubscribe from a previously subscribed channel.
{
"op": "unsubscribe",
"channel": "fullbook:BTC-USDT"
}
| Field | Type | Required | Description |
|---|---|---|---|
| op | string | required | "unsubscribe" |
| channel | string | required | Channel to unsubscribe from. |
Application-level keepalive. Send every 30 seconds to maintain the connection.
{ "op": "ping" }
Server responds with:
{ "type": "pong" }
Request the list of connected exchanges with live status and symbol counts.
{ "op": "exchanges" }
Request available symbols. Optionally filter by quote currency or exchange.
{
"op": "symbols",
"quote": "USDT",
"exchange": "binance"
}
| Field | Type | Required | Description |
|---|---|---|---|
| op | string | required | "symbols" |
| quote | string | optional | Filter by quote currency (e.g. "USDT", "USD"). |
| exchange | string | optional | Filter by exchange ID (e.g. "binance"). |
Book data pushed after subscribe and on each update. The level array format varies by channel type.
fullbook:) — with exchange attribution{
"type": "snapshot",
"channel": "fullbook:BTC-USDT",
"data": {
"bids": [
[83450.50, 1.234, 5, "binance"],
[83450.25, 0.891, 3, "coinbase"],
[83449.80, 2.100, 8, "okx"]
],
"asks": [
[83451.00, 0.750, 2, "binance"],
[83451.25, 1.500, 4, "bybit"]
],
"ts": 1712200000000
}
}
top:), consolidated (consbook:), and single exchange — no attribution{
"type": "snapshot",
"channel": "binance:BTC-USDT",
"data": {
"bids": [
[83450.50, 1.234, 5],
[83450.25, 0.891, 3]
],
"asks": [
[83451.00, 0.750, 2],
[83451.50, 1.100, 1]
],
"ts": 1712200000000
}
}
| Index | Field | Type | Description |
|---|---|---|---|
| 0 | price | float | Price level. Adaptive decimals: 2 (≥1000), 3 (≥10), 4 (≥1), 6 (≥0.01), 8 (<0.01). |
| 1 | qty | float | Total quantity at this price level. Up to 8 significant figures. |
| 2 | orders | integer | Number of orders at this price level. |
| 3 | exchange_id | string | Exchange ID. Only present in fullbook: channel. |
| Field | Type | Description |
|---|---|---|
| ts | integer | Milliseconds since Unix epoch (UTC). Server-side timestamp of the snapshot generation. |
Acknowledgment messages confirming subscription changes.
{ "type": "subscribed", "channel": "fullbook:BTC-USDT" }
{ "type": "unsubscribed", "channel": "fullbook:BTC-USDT" }
{
"type": "exchanges",
"data": [
{
"id": "binance",
"name": "Binance",
"quote": "USDT",
"symbols": 145,
"status": "live"
},
...
]
}
| Field | Type | Description |
|---|---|---|
| id | string | Exchange identifier used in channel names. |
| name | string | Human-readable exchange name. |
| quote | string | Primary quote currency for this exchange. |
| symbols | integer | Number of live symbols on this exchange. |
| status | string | live, stale, or pending. |
{
"type": "symbols",
"data": [
{
"symbol": "BTC-USDT",
"exchanges": ["binance", "coinbase", "okx", "bybit"]
},
...
]
}
| Field | Type | Description |
|---|---|---|
| symbol | string | Canonical symbol in BASE-QUOTE format. |
| exchanges | string[] | Exchange IDs that have this symbol live. |
{ "type": "pong" }
{ "type": "error", "message": "unknown channel" }
| Prefix | Example | Description | Level Format |
|---|---|---|---|
top: |
top:BTC-USDT |
BBO (best bid/offer). Exactly 1 level per side, aggregated across all exchanges. Depth parameter is ignored. | [price, qty, orders] |
consbook: |
consbook:ETH-USDT |
Consolidated book. Multi-level aggregated across exchanges — levels at the same price are merged (quantities summed, order counts summed). No exchange attribution. | [price, qty, orders] |
fullbook: |
fullbook:BTC-USDT |
Full book from all exchanges. Each level carries the source exchange ID. Best price across all exchanges at top. | [price, qty, orders, exchange_id] |
{exchange}: |
binance:BTC-USDT |
Single exchange book. Only data from the specified exchange. | [price, qty, orders] |
top:)Best bid and best offer aggregated across all exchanges. Always returns exactly 1 level per side. If multiple exchanges share the best price, quantities and order counts are summed. The depth parameter is ignored.
consbook:)Multi-level aggregated book. Merges levels at identical price points across exchanges. If Binance and Coinbase both have a bid at 83450.50, the aggregated level shows the combined quantity and order count. No exchange attribution. Price matching uses adaptive floating-point tolerance based on price magnitude.
fullbook:)Merges order books from all exchanges into a single sorted book. Each level carries the exchange_id of its source exchange. This allows clients to see the global best bid/ask and which exchange offers it.
{exchange}:)Raw order book from a single exchange, normalized into canonical symbol format. No cross-exchange merging.
| # | ID | Name | Quote | Native Symbol Format | Markets |
|---|---|---|---|---|---|
| 0 | binance | Binance | USDT | BTCUSDT (concatenated) | Spot |
| 1 | coinbase | Coinbase | USD | BTC-USD (dash) | Advanced Trade |
| 2 | okx | OKX | USDT | BTC-USDT (dash) | Spot |
| 3 | bybit | Bybit | USDT | BTCUSDT (concatenated) | Spot |
| 4 | kraken | Kraken | USDT | BTC/USDT (slash) | Spot |
| 5 | gemini | Gemini | USD | BTCUSD (concatenated) | Spot |
| 6 | cryptocom | Crypto.com | USDT | BTC_USDT (underscore) | Spot |
| 7 | gateio | Gate.io | USDT | BTC_USDT (underscore) | Spot |
| 8 | kucoin | KuCoin | USDT | BTC-USDT (dash) | Spot |
| 9 | upbit | Upbit | USDT | USDT-BTC (reverse dash) | Spot |
| 10 | bitget | Bitget | USDT | BTCUSDT (concatenated) | Spot |
| 11 | mexc | MEXC | USDT | BTCUSDT (concatenated) | Spot |
| 12 | htx | HTX | USDT | btcusdt (lowercase concat) | Spot |
| 13 | bitfinex | Bitfinex | USD | tBTCUSD / tSHIB:USD | Spot |
| 14 | bingx | BingX | USDT | BTC-USDT (dash) | Spot |
| 15 | phemex | Phemex | USDT | sBTCUSDT (s-prefix concat) | Spot |
| 16 | lbank | LBank | USDT | btc_usdt (lowercase underscore) | Spot |
| 17 | bitmart | BitMart | USDT | BTC_USDT (underscore) | Spot |
| 18 | coinex | CoinEx | USDT | BTCUSDT (concatenated) | Spot |
| 19 | ascendex | AscendEX | USDT | BTC/USDT (slash) | Spot |
| 20 | deribit | Deribit | USD | BTC-PERPETUAL | Options & Futures |
The API uses a canonical symbol format: uppercase BASE-QUOTE separated by a hyphen.
| Canonical | Description |
|---|---|
BTC-USDT | Bitcoin / Tether |
ETH-USD | Ethereum / US Dollar |
SOL-USDT | Solana / Tether |
Each exchange uses its own native symbol format internally. The API normalizes all symbols to the canonical format automatically.
| Exchange | Native Format | Canonical |
|---|---|---|
| Binance | BTCUSDT | BTC-USDT |
| Coinbase | BTC-USD | BTC-USD |
| Kraken | BTC/USDT | BTC-USDT |
| Upbit | USDT-BTC | BTC-USDT |
| HTX | btcusdt | BTC-USDT |
| Bitfinex | tBTCUSD | BTC-USD |
| Phemex | sBTCUSDT | BTC-USDT |
| LBank | btc_usdt | BTC-USDT |
| Field | Type | Description |
|---|---|---|
| type | string | Always "snapshot". |
| channel | string | Channel identifier matching the subscription. |
| data.bids | array[] | Bid levels sorted descending by price. See level format. |
| data.asks | array[] | Ask levels sorted ascending by price. See level format. |
| data.ts | integer | Snapshot timestamp in milliseconds since Unix epoch (UTC). |
| Index | Field | Type | Unit | Description |
|---|---|---|---|---|
| 0 | price | float | Quote currency | Price level. Decimal precision adapts to magnitude. |
| 1 | qty | float | Base currency | Total quantity available at this price. Up to 8 significant figures. |
| 2 | orders | integer | Count | Number of resting orders at this price level. |
| 3 | exchange_id | string | — | Source exchange. Only in fullbook: channel. |
| Price Range | Decimals | Example |
|---|---|---|
| ≥ 1,000 | 2 | 83450.50 |
| ≥ 10 | 3 | 45.125 |
| ≥ 1 | 4 | 1.2345 |
| ≥ 0.01 | 6 | 0.012345 |
| < 0.01 | 8 | 0.00001234 |
| Parameter | Value |
|---|---|
| Update throttle | 100ms per channel (configurable). Updates arriving faster are coalesced — the client always receives the latest state. |
| Wire-to-client latency | < 1ms typical (exchange WebSocket → parser → SHM ring → mdf_server → gateway → client) |
| Max subscriptions per connection | Unlimited |
| Max depth | 100 levels per side |
| Message | Description |
|---|---|
missing op | No op field in the client message. |
unknown op | Unrecognized operation. Valid: subscribe, unsubscribe, ping, exchanges, symbols. |
missing channel | Subscribe/unsubscribe without a channel field. |
unknown channel | Invalid channel format. Expected {type}:{SYMBOL}. |
unknown symbol | Symbol not found on any exchange. |
unknown exchange | Exchange ID not recognized. |
already subscribed | Duplicate subscription to the same channel. |
�� Client sends: {"op":"subscribe","channel":"fullbook:BTC-USDT","depth":5} ← Server responds: {"type":"subscribed","channel":"fullbook:BTC-USDT"} ← Server pushes snapshots (every ~100ms): {"type":"snapshot","channel":"fullbook:BTC-USDT","data":{ "bids":[[83450.50,1.234,5,"binance"],[83450.25,0.891,3,"coinbase"],...], "asks":[[83451.00,0.750,2,"okx"],[83451.25,1.500,4,"bybit"],...], "ts":1712200000000}}
→ Client sends: {"op":"subscribe","channel":"binance:ETH-USDT","depth":20} ← Server responds: {"type":"subscribed","channel":"binance:ETH-USDT"} ← Snapshot (no exchange_id in levels): {"type":"snapshot","channel":"binance:ETH-USDT","data":{ "bids":[[3245.80,12.5,8],[3245.75,5.2,3],...], "asks":[[3245.85,8.1,4],[3245.90,15.3,6],...], "ts":1712200000123}}
→ Client sends: {"op":"exchanges"} ← Server responds: {"type":"exchanges","data":[ {"id":"binance","name":"Binance","quote":"USDT","symbols":145,"status":"live"}, {"id":"coinbase","name":"Coinbase","quote":"USD","symbols":98,"status":"live"}, ...]} → Client sends: {"op":"symbols","quote":"USDT"} ← Server responds: {"type":"symbols","data":[ {"symbol":"BTC-USDT","exchanges":["binance","okx","bybit",...]}, {"symbol":"ETH-USDT","exchanges":["binance","coinbase","okx",...]}, ...]}
→ Client sends (invalid): {"op":"subscribe","channel":"invalid"} ← Server responds: {"type":"error","message":"unknown channel"}
Reference documentation for the native WebSocket order book APIs of all 21 connected exchanges. Microverse normalizes these diverse protocols into the unified API described above.
| Exchange | Endpoint | Depth Channel | Model | Compression | Keepalive |
|---|---|---|---|---|---|
| AscendEX | wss://ascendex.com/api/pro/v2/stream | depth:{SYM} | Snapshot + incremental | None | Server ping, respond {"op":"pong"} |
| Binance | wss://stream.binance.com:9443/ws | {sym}@depth | Incremental + REST snapshot | None | Server ping (WebSocket frame) |
| BingX | wss://open-api-ws.bingx.com/market | {SYM}@depth | Snapshot + incremental | GZIP | Server ping/5s, echo pong |
| Bitfinex | wss://api-pub.bitfinex.com/ws/2 | book (prec/freq/len) | Snapshot then incremental | None | Server heartbeat/15s |
| Bitget | wss://ws.bitget.com/v2/ws/public | books / books5 | Snapshot (1/5/15) or incremental (full) | None | Client sends "ping"/30s |
| BitMart | wss://ws-manager-compress.bitmart.com/api?protocol=1.1 | spot/depth50:{SYM} | Snapshot (depth50) or incremental (increase100) | Deflate | Client sends "ping" text |
| Bybit | wss://stream.bybit.com/v5/public/spot | orderbook.{depth}.{sym} | Snapshot then delta | None | Client ping/20s, server pong |
| Coinbase | wss://advanced-trade-ws.coinbase.com | level2 | Snapshot then incremental | None | Server heartbeat channel |
| CoinEx | wss://socket.coinex.com/v2/spot | depth.subscribe | Configurable: full or incremental | ZIP | server.ping (60s timeout) |
| Crypto.com | wss://stream.crypto.com/exchange/v1/market | book.{sym}.{depth} | Snapshot or delta (configurable) | None | Heartbeat/30s, respond within 5s |
| Deribit | wss://www.deribit.com/ws/api/v2 | book.{inst}.{group}.{depth}.{interval} | Snapshot + incremental (change_id) | None | public/set_heartbeat or public/ping |
| Gate.io | wss://api.gateio.ws/ws/v4/ | spot.order_book_update | Incremental + REST snapshot | None | Client ping/15s |
| Gemini | wss://api.gemini.com/v2/marketdata | l2_updates | Snapshot then incremental | None | Server heartbeat/5s |
| HTX | wss://api.huobi.pro/ws | market.{sym}.depth.step0 | Snapshot (depth) or incremental (MBP) | GZIP | Server {"ping":ts}/20s, echo {"pong":ts} |
| Kraken | wss://ws.kraken.com/v2 | book (depth param) | Snapshot then incremental | None | Server ping, client pong |
| KuCoin | wss://x-push-spot.kucoin.com | obu (Pro) / /spotMarket/level2Depth* | Snapshot (5/50) or incremental | None | Ping/18s, timeout 10s |
| LBank | wss://www.lbkex.net/ws/V2/ | depth | Snapshot only | None | Server ping, echo pong (1min) |
| MEXC | wss://wbs-api.mexc.com/ws | [email protected]@{SYM} | Incremental + REST snapshot | None | Must respond to server pings |
| OKX | wss://ws.okx.com:8443/ws/v5/public | books / books5 | Snapshot then incremental | None | Client ping "ping"/30s |
| Phemex | wss://ws.phemex.com | orderbook.subscribe | Snapshot + incremental (60s re-snapshot) | None | Client ping <30s |
| Upbit | wss://api.upbit.com/websocket/v1 | orderbook | Full snapshot each push | None | 120s idle timeout |
wss://ascendex.com/api/pro/v2/stream
{"op": "sub", "ch": "depth:BTC/USDT"}
{"op": "req", "action": "depth-snapshot", "args": {"symbol": "BTC/USDT"}}
Subscribe to depth:{SYMBOL} for incremental updates, then request depth-snapshot for initial state. Updates throttled at 300ms. Symbol format uses forward slash: BTC/USDT.
| Parameter | Value |
|---|---|
| Max connections | 300/IP total, 20/IP/account group |
| Rate limits | subscribe: 150/min, snapshot queries: 400-500/min |
| Keepalive | Server sends ping, respond with {"op":"pong"} |
wss://stream.binance.com:9443/ws/btcusdt@depth
{"method": "SUBSCRIBE", "params": ["btcusdt@depth"], "id": 1}
Incremental updates via {symbol}@depth stream. Must fetch initial snapshot via REST GET /api/v3/depth?symbol=BTCUSDT&limit=1000 and synchronize using lastUpdateId. Apply updates where U <= lastUpdateId+1 <= u.
| Parameter | Value |
|---|---|
| Max connections | 5 per IP per 5 minutes |
| Max streams/conn | 1024 (combined stream) |
| Keepalive | Server WebSocket-level ping; idle disconnect after 24h |
| Rate limit | 10 messages/second |
wss://open-api-ws.bingx.com/market
{"id": "<uuid>", "dataType": "BTC-USDT@depth"}
All responses are GZIP compressed — must decompress before parsing. Symbol format uses hyphen: BTC-USDT. Server sends heartbeat ping every ~5 seconds; client must respond with pong or connection drops.
| Parameter | Value |
|---|---|
| Max subscriptions/conn | 200 |
| Compression | GZIP (all messages) |
| Keepalive | Server ping/5s, must echo pong |
wss://api-pub.bitfinex.com/ws/2
{
"event": "subscribe",
"channel": "book",
"symbol": "tBTCUSD",
"prec": "P0",
"freq": "F0",
"len": "25"
}
Precision: P0-P4 (5 to 1 sig figs). Frequency: F0 (real-time), F1 (2s batch). Length: 1, 25, 100, 250. Symbol prefix: t for trading pairs. Updates: COUNT=0 means delete level; AMOUNT sign indicates side (positive=bid, negative=ask).
| Parameter | Value |
|---|---|
| Max connections | 20 public/min |
| Max subscriptions/conn | 25 |
| Keepalive | Server heartbeat [CHANNEL_ID, "hb"] every 15s |
wss://ws.bitget.com/v2/ws/public
{
"op": "subscribe",
"args": [{"instType": "SPOT", "channel": "books5", "instId": "BTCUSDT"}]
}
Channels: books (full depth, incremental after first snapshot), books1/books5/books15 (snapshot each push). CRC32 checksum for integrity validation on books channel.
| Parameter | Value |
|---|---|
| Max subscriptions/conn | 1000 |
| Rate limits | 240 sub requests/hr, 10 msg/s |
| Keepalive | Client sends "ping" string every 30s |
wss://ws-manager-compress.bitmart.com/api?protocol=1.1
{"op": "subscribe", "args": ["spot/depth50:BTC_USDT"]}
Channels: spot/depth5, spot/depth50 (snapshots), spot/depth/increase100 (incremental). Symbol format uses underscore: BTC_USDT. Data is compressed (deflate).
| Parameter | Value |
|---|---|
| Max connections/IP | 10 |
| Max subscriptions/conn | 100 |
| Rate limits | 30 conn requests/min, 100 sub msg/10s |
| Keepalive | Client sends text ping, server responds pong |
wss://stream.bybit.com/v5/public/spot
{"op": "subscribe", "args": ["orderbook.50.BTCUSDT"]}
Depth: 1 (100ms), 50 (20ms), 200 (100ms). First message is snapshot ("type":"snapshot"), then deltas ("type":"delta"). Cross-sequence validation via seq field.
| Parameter | Value |
|---|---|
| Max connections | 500/5min per IP |
| Max subscriptions/conn | Varies by topic |
| Keepalive | Client sends {"op":"ping"} every 20s |
wss://advanced-trade-ws.coinbase.com
{
"type": "subscribe",
"product_ids": ["BTC-USD"],
"channel": "level2"
}
Initial snapshot followed by incremental updates. Updates have "side" ("bid"/"offer"), "price_level", "new_quantity". Quantity "0" = remove level. Requires HMAC-SHA256 signature for authentication (optional for public).
| Parameter | Value |
|---|---|
| Max connections | 750 per IP for public |
| Max subscriptions/conn | 100 product_ids per channel |
| Keepalive | Server heartbeat channel every ~1s |
wss://socket.coinex.com/v2/spot
{
"method": "depth.subscribe",
"params": {"market_list": [["BTCUSDT", 50, "0", true]]},
"id": 1
}
Params: [market, limit, merge_interval, is_full]. is_full=true = full push (~200ms), is_full=false = incremental diffs. CRC32 checksum included. All data is ZIP compressed.
| Parameter | Value |
|---|---|
| Depth levels | 5, 10, 20, 50 |
| Compression | ZIP (all messages) |
| Keepalive | {"method":"server.ping"}, 60s timeout |
wss://stream.crypto.com/exchange/v1/market
{
"id": 1,
"method": "subscribe",
"params": {"channels": ["book.BTC_USD.50"]},
"nonce": 1587523073344
}
Channel: book.{instrument}.{depth}. Depths: 10, 25, 50. Subscription type: SNAPSHOT (500ms) or SNAPSHOT_AND_UPDATE (100ms delta, recommended). Entries: [price, quantity, order_count]. Symbol format uses underscore: BTC_USD.
| Parameter | Value |
|---|---|
| Rate limits | 100 requests/s (market data) |
| Keepalive | Server heartbeat every 30s, respond within 5s with respond-heartbeat |
wss://www.deribit.com/ws/api/v2
{
"jsonrpc": "2.0",
"method": "public/subscribe",
"params": {"channels": ["book.BTC-PERPETUAL.none.20.100ms"]},
"id": 1
}
Channel: book.{instrument}.{group}.{depth}.{interval}. Groups: none, 1-25. Depth: 1, 10, 20. Interval: 100ms, agg2, raw. JSON-RPC 2.0 protocol. Uses change_id/prev_change_id for sequence tracking. Actions: "new", "change", "delete".
| Parameter | Value |
|---|---|
| Max connections | 32 per IP |
| Rate limits | 200 msg/s (burst 300), 500 channels/subscription msg |
| Keepalive | public/set_heartbeat or public/ping |
wss://api.gateio.ws/ws/v4/
{
"time": 1606292218,
"channel": "spot.order_book_update",
"event": "subscribe",
"payload": ["BTC_USDT", "100ms"]
}
Incremental updates with sequence IDs (u, U). Synchronize with REST snapshot GET /api/v4/spot/order_book?currency_pair=BTC_USDT&limit=100. Also available: spot.order_book (full snapshot mode). Symbol format uses underscore: BTC_USDT.
| Parameter | Value |
|---|---|
| Update intervals | 100ms, 1000ms |
| Rate limits | 120 requests/min per connection |
| Keepalive | Client sends ping, server pong; 60s idle timeout |
wss://api.gemini.com/v2/marketdata
{
"type": "subscribe",
"subscriptions": [{"name": "l2", "symbols": ["BTCUSD"]}]
}
Initial snapshot with full book, then incremental l2_updates. Each update contains an array of ["buy"/"sell", price, quantity] changes. Quantity "0" = remove level. Symbol format: concatenated uppercase BTCUSD.
| Parameter | Value |
|---|---|
| Max connections | Shared with REST rate limits |
| Keepalive | Server heartbeat every ~5s |
wss://api.huobi.pro/ws # market depth (snapshot) wss://api.huobi.pro/feed # MBP incremental (tick-by-tick) wss://api-aws.huobi.pro/ws # AWS (lower latency)
{"sub": "market.btcusdt.depth.step0", "id": "id1"}
{"sub": "market.btcusdt.mbp.150", "id": "id1"}
Depth steps: step0-step5 (price aggregation). MBP levels: 5, 20, 150, 400. MBP uses seqNum/prevSeqNum for sequencing. Symbols lowercase: btcusdt. All market data messages are GZIP compressed.
| Parameter | Value |
|---|---|
| Compression | GZIP (all market WS data) |
| Keepalive | Server {"ping": timestamp} every 20s; respond {"pong": timestamp} |
wss://ws.kraken.com/v2
{
"method": "subscribe",
"params": {
"channel": "book",
"symbol": ["BTC/USDT"],
"depth": 25
}
}
Depth: 10, 25, 100, 500, 1000. Initial snapshot then incremental updates with CRC32 checksum. Symbol format uses slash: BTC/USDT.
| Parameter | Value |
|---|---|
| Max connections | 150 per IP |
| Max subscriptions/conn | Soft limit; recommended <100 |
| Keepalive | Server ping, client responds with pong |
# Must first obtain token via POST /api/v1/bullet-public wss://x-push-spot.kucoin.com # Pro API
{
"id": "1545910660739",
"action": "SUBSCRIBE",
"channel": "obu",
"tradeType": "SPOT",
"symbol": "BTC-USDT",
"depth": "5"
}
{"type": "subscribe", "topic": "/spotMarket/level2Depth50:BTC-USDT", "response": true}
Token required (valid 24h, unauthenticated REST call). Pro API depth: 1, 5, 50, increment. Classic topics: /spotMarket/level2Depth5, /spotMarket/level2Depth50, /spotMarket/level2 (incremental).
| Parameter | Value |
|---|---|
| Max subscriptions/conn | 300 (Pro API) |
| Rate limits | 100 msg/10s per connection |
| Keepalive | Ping every 18s, timeout 10s |
wss://www.lbkex.net/ws/V2/
{"action": "subscribe", "subscribe": "depth", "depth": "100", "pair": "btc_usdt"}
Snapshot-only model: full book state pushed whenever the order book changes. Depth: 10, 50, 100. Symbol format: lowercase underscore btc_usdt.
| Parameter | Value |
|---|---|
| Keepalive | Server sends {"action":"ping","ping":"<uuid>"}; respond {"action":"pong","pong":"<uuid>"} within 1 min |
wss://wbs-api.mexc.com/ws
{"op": "sub", "args": ["[email protected]@BTCUSDT"]}
Incremental diff depth. Must fetch REST snapshot GET /api/v3/depth?symbol=BTCUSDT&limit=5000 and synchronize using fromVersion/lastUpdateId. Symbols uppercase: BTCUSDT.
| Parameter | Value |
|---|---|
| Max subscriptions/conn | 30 |
| Rate limits | 100 msg/s |
| Connection validity | 24h max; 60s inactivity disconnect |
| Keepalive | Must respond to server ping messages |
wss://ws.okx.com:8443/ws/v5/public
{
"op": "subscribe",
"args": [{"channel": "books", "instId": "BTC-USDT"}]
}
Channels: books (400 levels, incremental after initial snapshot), books5 (5 levels, snapshot each push), books-l2-tbt (tick-by-tick), bbo-tbt (BBO). CRC32 checksum for books/books-l2-tbt. Symbol format: BTC-USDT.
| Parameter | Value |
|---|---|
| Max connections | 3 per IP per URL |
| Max subscriptions/conn | 240 |
| Keepalive | Client sends "ping" text every 30s |
wss://ws.phemex.com
{"id": 0, "method": "orderbook.subscribe", "params": ["sBTCUSDT"]}
Initial snapshot followed by incremental updates. Full re-snapshot sent every 60 seconds. Prices use scaled integer format (priceEp): divide by 10^8 for actual price. Spot symbols prefixed with s: sBTCUSDT.
| Parameter | Value |
|---|---|
| Max connections | 5 per client |
| Max subscriptions/conn | 20 |
| Rate limits | 20 requests/s per connection |
| Keepalive | Client ping every <30s (recommended 5s) |
wss://api.upbit.com/websocket/v1
[
{"ticket": "unique-uuid"},
{"type": "orderbook", "codes": ["KRW-BTC", "KRW-ETH.5"]},
{"format": "DEFAULT"}
]
Full snapshot each push (not incremental). Append .{count} for depth: 1, 5, 15, 30 (default). Symbol format is reversed: FIAT-CRYPTO (e.g. KRW-BTC). Format: DEFAULT (verbose) or SIMPLE (compact field names).
| Parameter | Value |
|---|---|
| Rate limits | 5 conn/s, 5 msg/s, 100 msg/min |
| Idle timeout | 120s (send ping to keep alive) |