Skip to main content
Type: BLOCK_BOOK_SNAPSHOT Subscribe to live orderbook snapshots bucketed by price level. The server reconstructs the full book from exchange updates and streams aggregated depth at your chosen frequency and resolution.

Type-specific parameters

These parameters are in addition to the common channel parameters.
ParameterTypeRequiredDescription
blockSizestringYesPrice bucket size. Use the value from GET /v1/block-sizes.
maxDepthstringNoMaximum number of price levels per side.
groupByTypestringNoSet to "1" to aggregate across symbols for the same coin. When enabled, keep using symbol, but pass the coin identifier (for example BTC). Default: "0" (no grouping).
updateFrequencystringNoMinimum time between snapshots (e.g., 500ms, 1s, 5s).

Subscribe

Per-symbol orderbook

{
  "jsonrpc": "2.0",
  "id": 0,
  "method": "public/subscribe",
  "params": {
    "channels": [
      {
        "type": "BLOCK_BOOK_SNAPSHOT",
        "category": "*",
        "exchange": "BINANCE_FUTURES",
        "symbol": "BTCUSDT",
        "blockSize": "25",
        "maxDepth": "500",
        "quote": "COIN",
        "updateFrequency": "1s"
      }
    ],
    "compression": "brotli",
    "version": "v2"
  }
}

Coin-aggregated orderbook

Set groupByType to "1" to aggregate matching orderbook depth across symbols for the same coin into a single stream. For this mode, keep the symbol field and pass the coin identifier, for example BTC.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "public/subscribe",
  "params": {
    "channels": [
      {
        "type": "BLOCK_BOOK_SNAPSHOT",
        "category": "*",
        "exchange": "BINANCE_FUTURES",
        "symbol": "BTC",
        "blockSize": "25",
        "maxDepth": "500",
        "quote": "COIN",
        "groupByType": "1",
        "updateFrequency": "1s"
      }
    ],
    "compression": "brotli",
    "version": "v2"
  }
}

Response

Each message contains one or more orderbook snapshots:
{
  "points": [
    {
      "series": {
        "type": "BLOCK_BOOK_SNAPSHOT",
        "symbol": "BTCUSDT",
        "exchange": "BINANCE_FUTURES",
        "normalizedSymbol": "BTC-USDT",
        "coin": "BTC",
        "blockSize": 25,
        "inverse": false
      },
      "blockBookSnapshot": {
        "bids": [90000, 3.55, 89975, 12.81, 89950, 8.42],
        "asks": [90025, 5.67, 90050, 14.23, 90075, 9.11],
        "timestamp": {
          "seconds": 1769058600
        }
      }
    }
  ]
}
For grouped subscriptions, the response is keyed by series.coin. In the live grouped BTC stream, series.symbol and series.groupByType were not present.
FieldTypeDescription
series.coinstringCoin identifier for the stream. Grouped subscriptions are keyed by this field.
series.blockSizedoublePrice bucket size used for this snapshot
blockBookSnapshot.bidsdouble[]Bid levels as alternating [price, volume, price, volume, ...], closest to mid price first
blockBookSnapshot.asksdouble[]Ask levels as alternating [price, volume, price, volume, ...], closest to mid price first
blockBookSnapshot.timestampTimestampSnapshot time