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.
| Parameter | Type | Required | Description |
|---|---|---|---|
blockSize | string | Yes | Price bucket size. Use the value from GET /v1/block-sizes. |
maxDepth | string | No | Maximum number of price levels per side. |
groupByType | string | No | Set 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). |
updateFrequency | string | No | Minimum time between snapshots (e.g., 500ms, 1s, 5s). |
Subscribe
Per-symbol orderbook
JSON
{
"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.
JSON
{
"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:
JSON
{
"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.
Response fields
| Field | Type | Description |
|---|---|---|
series.coin | string | Coin identifier for the stream. Grouped subscriptions are keyed by this field. |
series.blockSize | double | Price bucket size used for this snapshot |
blockBookSnapshot.bids | double[] | Bid levels as alternating [price, volume, price, volume, ...], closest to mid price first |
blockBookSnapshot.asks | double[] | Ask levels as alternating [price, volume, price, volume, ...], closest to mid price first |
blockBookSnapshot.timestamp | Timestamp | Snapshot time |