Table of Contents

  1. Overview
  2. Connection
  3. Authentication
  4. Message Format
  5. Client Messages
    1. subscribe
    2. unsubscribe
    3. ping
    4. exchanges
    5. symbols
  6. Server Messages
    1. snapshot
    2. subscribed / unsubscribed
    3. exchanges response
    4. symbols response
    5. pong
    6. error
  7. Channel Types
    1. BBO Top-of-Book (top:)
    2. Consolidated Book (consbook:)
    3. Full Book (fullbook:)
    4. Single Exchange ({exchange}:)
  8. Supported Exchanges
  9. Symbol Format
  10. Data Field Reference
  11. Throttling & Performance
  12. Error Codes
  13. Complete Examples
  14. Exchange Native WebSocket APIs

1. Overview

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.

Key Features

2. Connection

Endpoint

wss://api.microversesystems.com

Protocol

ParameterValue
TransportWebSocket (RFC 6455) over TLS 1.3
Frame typeText frames (opcode 0x1)
EncodingUTF-8 JSON
KeepaliveClient should send ping every 30s
Max message size1 MB

Quick Start

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));

3. Authentication

The public API does not require authentication. Connect directly and subscribe to any channel. Rate limiting is applied per IP address.

4. Message Format

All messages are JSON objects sent as WebSocket text frames.

Client → Server

Every client message must include an op field specifying the operation.

{
  "op": "subscribe",
  "channel": "fullbook:BTC-USDT",
  "depth": 20
}

Server → Client

Every server message includes a type field identifying the message type.

{
  "type": "snapshot",
  "channel": "fullbook:BTC-USDT",
  "data": { ... }
}

5. Client Messages

5.1 subscribe

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
}
FieldTypeRequiredDescription
opstringrequired"subscribe"
channelstringrequiredChannel to subscribe to. See Channel Types.
depthintegeroptionalMax price levels per side (1–100). Default: 20. Ignored for top: (always 1).

Channel format

# 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"

5.2 unsubscribe

Unsubscribe from a previously subscribed channel.

{
  "op": "unsubscribe",
  "channel": "fullbook:BTC-USDT"
}
FieldTypeRequiredDescription
opstringrequired"unsubscribe"
channelstringrequiredChannel to unsubscribe from.

5.3 ping

Application-level keepalive. Send every 30 seconds to maintain the connection.

{ "op": "ping" }

Server responds with:

{ "type": "pong" }

5.4 exchanges

Request the list of connected exchanges with live status and symbol counts.

{ "op": "exchanges" }

5.5 symbols

Request available symbols. Optionally filter by quote currency or exchange.

{
  "op": "symbols",
  "quote": "USDT",
  "exchange": "binance"
}
FieldTypeRequiredDescription
opstringrequired"symbols"
quotestringoptionalFilter by quote currency (e.g. "USDT", "USD").
exchangestringoptionalFilter by exchange ID (e.g. "binance").

6. Server Messages

6.1 snapshot

Book data pushed after subscribe and on each update. The level array format varies by channel type.

Full book (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
  }
}

BBO (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
  }
}

Level array fields

IndexFieldTypeDescription
0pricefloatPrice level. Adaptive decimals: 2 (≥1000), 3 (≥10), 4 (≥1), 6 (≥0.01), 8 (<0.01).
1qtyfloatTotal quantity at this price level. Up to 8 significant figures.
2ordersintegerNumber of orders at this price level.
3exchange_idstringExchange ID. Only present in fullbook: channel.
Ordering: Bids are sorted descending by price (best bid first). Asks are sorted ascending by price (best ask first).

Timestamp

FieldTypeDescription
tsintegerMilliseconds since Unix epoch (UTC). Server-side timestamp of the snapshot generation.

6.2 subscribed / unsubscribed

Acknowledgment messages confirming subscription changes.

{ "type": "subscribed", "channel": "fullbook:BTC-USDT" }
{ "type": "unsubscribed", "channel": "fullbook:BTC-USDT" }

6.3 exchanges response

{
  "type": "exchanges",
  "data": [
    {
      "id": "binance",
      "name": "Binance",
      "quote": "USDT",
      "symbols": 145,
      "status": "live"
    },
    ...
  ]
}
FieldTypeDescription
idstringExchange identifier used in channel names.
namestringHuman-readable exchange name.
quotestringPrimary quote currency for this exchange.
symbolsintegerNumber of live symbols on this exchange.
statusstringlive, stale, or pending.

6.4 symbols response

{
  "type": "symbols",
  "data": [
    {
      "symbol": "BTC-USDT",
      "exchanges": ["binance", "coinbase", "okx", "bybit"]
    },
    ...
  ]
}
FieldTypeDescription
symbolstringCanonical symbol in BASE-QUOTE format.
exchangesstring[]Exchange IDs that have this symbol live.

6.5 pong

{ "type": "pong" }

6.6 error

{ "type": "error", "message": "unknown channel" }

7. Channel Types

PrefixExampleDescriptionLevel 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]

7.1 BBO Top-of-Book (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.

Use case: Ticker displays, BBO monitoring, lightweight price feeds.

7.2 Consolidated Book (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.

Use case: Consolidated depth visualization, market microstructure analysis.

7.3 Full Book (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.

Use case: Cross-exchange arbitrage detection, global NBBO tracking, execution routing.

7.4 Single Exchange ({exchange}:)

Raw order book from a single exchange, normalized into canonical symbol format. No cross-exchange merging.

Use case: Exchange-specific trading, per-venue monitoring.

8. Supported Exchanges

#IDNameQuoteNative Symbol FormatMarkets
0binanceBinanceUSDTBTCUSDT (concatenated)Spot
1coinbaseCoinbaseUSDBTC-USD (dash)Advanced Trade
2okxOKXUSDTBTC-USDT (dash)Spot
3bybitBybitUSDTBTCUSDT (concatenated)Spot
4krakenKrakenUSDTBTC/USDT (slash)Spot
5geminiGeminiUSDBTCUSD (concatenated)Spot
6cryptocomCrypto.comUSDTBTC_USDT (underscore)Spot
7gateioGate.ioUSDTBTC_USDT (underscore)Spot
8kucoinKuCoinUSDTBTC-USDT (dash)Spot
9upbitUpbitUSDTUSDT-BTC (reverse dash)Spot
10bitgetBitgetUSDTBTCUSDT (concatenated)Spot
11mexcMEXCUSDTBTCUSDT (concatenated)Spot
12htxHTXUSDTbtcusdt (lowercase concat)Spot
13bitfinexBitfinexUSDtBTCUSD / tSHIB:USDSpot
14bingxBingXUSDTBTC-USDT (dash)Spot
15phemexPhemexUSDTsBTCUSDT (s-prefix concat)Spot
16lbankLBankUSDTbtc_usdt (lowercase underscore)Spot
17bitmartBitMartUSDTBTC_USDT (underscore)Spot
18coinexCoinExUSDTBTCUSDT (concatenated)Spot
19ascendexAscendEXUSDTBTC/USDT (slash)Spot
20deribitDeribitUSDBTC-PERPETUALOptions & Futures

9. Symbol Format

The API uses a canonical symbol format: uppercase BASE-QUOTE separated by a hyphen.

CanonicalDescription
BTC-USDTBitcoin / Tether
ETH-USDEthereum / US Dollar
SOL-USDTSolana / Tether

Each exchange uses its own native symbol format internally. The API normalizes all symbols to the canonical format automatically.

Native format examples for BTC-USDT

ExchangeNative FormatCanonical
BinanceBTCUSDTBTC-USDT
CoinbaseBTC-USDBTC-USD
KrakenBTC/USDTBTC-USDT
UpbitUSDT-BTCBTC-USDT
HTXbtcusdtBTC-USDT
BitfinextBTCUSDBTC-USD
PhemexsBTCUSDTBTC-USDT
LBankbtc_usdtBTC-USDT

10. Data Field Reference

Book Snapshot Fields

FieldTypeDescription
typestringAlways "snapshot".
channelstringChannel identifier matching the subscription.
data.bidsarray[]Bid levels sorted descending by price. See level format.
data.asksarray[]Ask levels sorted ascending by price. See level format.
data.tsintegerSnapshot timestamp in milliseconds since Unix epoch (UTC).

Price Level Fields

IndexFieldTypeUnitDescription
0pricefloatQuote currencyPrice level. Decimal precision adapts to magnitude.
1qtyfloatBase currencyTotal quantity available at this price. Up to 8 significant figures.
2ordersintegerCountNumber of resting orders at this price level.
3exchange_idstringSource exchange. Only in fullbook: channel.

Price Decimal Precision

Price RangeDecimalsExample
≥ 1,000283450.50
≥ 10345.125
≥ 141.2345
≥ 0.0160.012345
< 0.0180.00001234

11. Throttling & Performance

ParameterValue
Update throttle100ms 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 connectionUnlimited
Max depth100 levels per side
Coalescing: When a book updates faster than the throttle window, intermediate states are skipped. The client always receives a complete, consistent snapshot — never a partial update.

12. Error Codes

MessageDescription
missing opNo op field in the client message.
unknown opUnrecognized operation. Valid: subscribe, unsubscribe, ping, exchanges, symbols.
missing channelSubscribe/unsubscribe without a channel field.
unknown channelInvalid channel format. Expected {type}:{SYMBOL}.
unknown symbolSymbol not found on any exchange.
unknown exchangeExchange ID not recognized.
already subscribedDuplicate subscription to the same channel.

13. Complete Examples

Example 1: Subscribe to full BTC book

�� 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}}

Example 2: Subscribe to single exchange

→ 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}}

Example 3: Discover available symbols

→ 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",...]},
  ...]}

Example 4: Error handling

→ Client sends (invalid):
{"op":"subscribe","channel":"invalid"}

← Server responds:
{"type":"error","message":"unknown channel"}

14. Exchange Native WebSocket APIs

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.

Comparison Table

ExchangeEndpointDepth ChannelModelCompressionKeepalive
AscendEXwss://ascendex.com/api/pro/v2/streamdepth:{SYM}Snapshot + incrementalNoneServer ping, respond {"op":"pong"}
Binancewss://stream.binance.com:9443/ws{sym}@depthIncremental + REST snapshotNoneServer ping (WebSocket frame)
BingXwss://open-api-ws.bingx.com/market{SYM}@depthSnapshot + incrementalGZIPServer ping/5s, echo pong
Bitfinexwss://api-pub.bitfinex.com/ws/2book (prec/freq/len)Snapshot then incrementalNoneServer heartbeat/15s
Bitgetwss://ws.bitget.com/v2/ws/publicbooks / books5Snapshot (1/5/15) or incremental (full)NoneClient sends "ping"/30s
BitMartwss://ws-manager-compress.bitmart.com/api?protocol=1.1spot/depth50:{SYM}Snapshot (depth50) or incremental (increase100)DeflateClient sends "ping" text
Bybitwss://stream.bybit.com/v5/public/spotorderbook.{depth}.{sym}Snapshot then deltaNoneClient ping/20s, server pong
Coinbasewss://advanced-trade-ws.coinbase.comlevel2Snapshot then incrementalNoneServer heartbeat channel
CoinExwss://socket.coinex.com/v2/spotdepth.subscribeConfigurable: full or incrementalZIPserver.ping (60s timeout)
Crypto.comwss://stream.crypto.com/exchange/v1/marketbook.{sym}.{depth}Snapshot or delta (configurable)NoneHeartbeat/30s, respond within 5s
Deribitwss://www.deribit.com/ws/api/v2book.{inst}.{group}.{depth}.{interval}Snapshot + incremental (change_id)Nonepublic/set_heartbeat or public/ping
Gate.iowss://api.gateio.ws/ws/v4/spot.order_book_updateIncremental + REST snapshotNoneClient ping/15s
Geminiwss://api.gemini.com/v2/marketdatal2_updatesSnapshot then incrementalNoneServer heartbeat/5s
HTXwss://api.huobi.pro/wsmarket.{sym}.depth.step0Snapshot (depth) or incremental (MBP)GZIPServer {"ping":ts}/20s, echo {"pong":ts}
Krakenwss://ws.kraken.com/v2book (depth param)Snapshot then incrementalNoneServer ping, client pong
KuCoinwss://x-push-spot.kucoin.comobu (Pro) / /spotMarket/level2Depth*Snapshot (5/50) or incrementalNonePing/18s, timeout 10s
LBankwss://www.lbkex.net/ws/V2/depthSnapshot onlyNoneServer ping, echo pong (1min)
MEXCwss://wbs-api.mexc.com/ws[email protected]@{SYM}Incremental + REST snapshotNoneMust respond to server pings
OKXwss://ws.okx.com:8443/ws/v5/publicbooks / books5Snapshot then incrementalNoneClient ping "ping"/30s
Phemexwss://ws.phemex.comorderbook.subscribeSnapshot + incremental (60s re-snapshot)NoneClient ping <30s
Upbitwss://api.upbit.com/websocket/v1orderbookFull snapshot each pushNone120s idle timeout

14.1 AscendEX

Endpoint

wss://ascendex.com/api/pro/v2/stream

Subscribe

{"op": "sub", "ch": "depth:BTC/USDT"}

Snapshot Request

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

ParameterValue
Max connections300/IP total, 20/IP/account group
Rate limitssubscribe: 150/min, snapshot queries: 400-500/min
KeepaliveServer sends ping, respond with {"op":"pong"}

14.2 Binance

Endpoint

wss://stream.binance.com:9443/ws/btcusdt@depth

Subscribe (combined stream)

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

ParameterValue
Max connections5 per IP per 5 minutes
Max streams/conn1024 (combined stream)
KeepaliveServer WebSocket-level ping; idle disconnect after 24h
Rate limit10 messages/second

14.3 BingX

Endpoint

wss://open-api-ws.bingx.com/market

Subscribe

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

ParameterValue
Max subscriptions/conn200
CompressionGZIP (all messages)
KeepaliveServer ping/5s, must echo pong

14.4 Bitfinex

Endpoint

wss://api-pub.bitfinex.com/ws/2

Subscribe

{
  "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).

ParameterValue
Max connections20 public/min
Max subscriptions/conn25
KeepaliveServer heartbeat [CHANNEL_ID, "hb"] every 15s

14.5 Bitget

Endpoint

wss://ws.bitget.com/v2/ws/public

Subscribe

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

ParameterValue
Max subscriptions/conn1000
Rate limits240 sub requests/hr, 10 msg/s
KeepaliveClient sends "ping" string every 30s

14.6 BitMart

Endpoint

wss://ws-manager-compress.bitmart.com/api?protocol=1.1

Subscribe

{"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).

ParameterValue
Max connections/IP10
Max subscriptions/conn100
Rate limits30 conn requests/min, 100 sub msg/10s
KeepaliveClient sends text ping, server responds pong

14.7 Bybit

Endpoint

wss://stream.bybit.com/v5/public/spot

Subscribe

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

ParameterValue
Max connections500/5min per IP
Max subscriptions/connVaries by topic
KeepaliveClient sends {"op":"ping"} every 20s

14.8 Coinbase

Endpoint

wss://advanced-trade-ws.coinbase.com

Subscribe

{
  "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).

ParameterValue
Max connections750 per IP for public
Max subscriptions/conn100 product_ids per channel
KeepaliveServer heartbeat channel every ~1s

14.9 CoinEx

Endpoint

wss://socket.coinex.com/v2/spot

Subscribe

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

ParameterValue
Depth levels5, 10, 20, 50
CompressionZIP (all messages)
Keepalive{"method":"server.ping"}, 60s timeout

14.10 Crypto.com

Endpoint

wss://stream.crypto.com/exchange/v1/market

Subscribe

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

ParameterValue
Rate limits100 requests/s (market data)
KeepaliveServer heartbeat every 30s, respond within 5s with respond-heartbeat

14.11 Deribit

Endpoint

wss://www.deribit.com/ws/api/v2

Subscribe

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

ParameterValue
Max connections32 per IP
Rate limits200 msg/s (burst 300), 500 channels/subscription msg
Keepalivepublic/set_heartbeat or public/ping

14.12 Gate.io

Endpoint

wss://api.gateio.ws/ws/v4/

Subscribe

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

ParameterValue
Update intervals100ms, 1000ms
Rate limits120 requests/min per connection
KeepaliveClient sends ping, server pong; 60s idle timeout

14.13 Gemini

Endpoint

wss://api.gemini.com/v2/marketdata

Subscribe

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

ParameterValue
Max connectionsShared with REST rate limits
KeepaliveServer heartbeat every ~5s

14.14 HTX (Huobi)

Endpoints

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)

Subscribe (depth snapshot)

{"sub": "market.btcusdt.depth.step0", "id": "id1"}

Subscribe (MBP incremental)

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

ParameterValue
CompressionGZIP (all market WS data)
KeepaliveServer {"ping": timestamp} every 20s; respond {"pong": timestamp}

14.15 Kraken

Endpoint

wss://ws.kraken.com/v2

Subscribe

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

ParameterValue
Max connections150 per IP
Max subscriptions/connSoft limit; recommended <100
KeepaliveServer ping, client responds with pong

14.16 KuCoin

Endpoint

# Must first obtain token via POST /api/v1/bullet-public
wss://x-push-spot.kucoin.com # Pro API

Subscribe (Pro API)

{
  "id": "1545910660739",
  "action": "SUBSCRIBE",
  "channel": "obu",
  "tradeType": "SPOT",
  "symbol": "BTC-USDT",
  "depth": "5"
}

Subscribe (Classic API)

{"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).

ParameterValue
Max subscriptions/conn300 (Pro API)
Rate limits100 msg/10s per connection
KeepalivePing every 18s, timeout 10s

14.17 LBank

Endpoint

wss://www.lbkex.net/ws/V2/

Subscribe

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

ParameterValue
KeepaliveServer sends {"action":"ping","ping":"<uuid>"}; respond {"action":"pong","pong":"<uuid>"} within 1 min

14.18 MEXC

Endpoint

wss://wbs-api.mexc.com/ws

Subscribe

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

ParameterValue
Max subscriptions/conn30
Rate limits100 msg/s
Connection validity24h max; 60s inactivity disconnect
KeepaliveMust respond to server ping messages

14.19 OKX

Endpoint

wss://ws.okx.com:8443/ws/v5/public

Subscribe

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

ParameterValue
Max connections3 per IP per URL
Max subscriptions/conn240
KeepaliveClient sends "ping" text every 30s

14.20 Phemex

Endpoint

wss://ws.phemex.com

Subscribe

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

ParameterValue
Max connections5 per client
Max subscriptions/conn20
Rate limits20 requests/s per connection
KeepaliveClient ping every <30s (recommended 5s)

14.21 Upbit

Endpoint

wss://api.upbit.com/websocket/v1

Subscribe

[
  {"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).

ParameterValue
Rate limits5 conn/s, 5 msg/s, 100 msg/min
Idle timeout120s (send ping to keep alive)