{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"book.BTC-PERPETUAL.100ms"
]
}
}{
"data": {
"type": "snapshot",
"timestamp": 1554373962454,
"instrument_name": "BTC-PERPETUAL",
"change_id": 297217,
"bids": [
[
"new",
5042.34,
30
],
[
"new",
5041.94,
20
]
],
"asks": [
[
"new",
5042.64,
40
],
[
"new",
5043.3,
40
]
]
}
}book.(instrument_name).(interval)
Real-time order book updates for a specific instrument.
- The first notification contains a full snapshot of the book (bids and asks for all price levels — no depth limit).
- Subsequent notifications contain only incremental changes to individual price levels.
- Updates are tuples in the form
[action, price, amount], whereactionis one of:new,change,delete.
Each notification includes a change_id. Every message except the first also contains prev_change_id. If prev_change_id equals the change_id of the previous message, it indicates that no messages were missed.
For Starbase-routed instruments, the published price levels include accepted mass-quote liquidity.
Depth: This channel delivers the complete order book with no depth restriction. If you need a depth-limited, price-grouped snapshot, use book.{instrument_name}.{group}.{depth}.{interval} instead.
Units: For perpetuals and futures, amount is in USD units. For options, amount is in the corresponding cryptocurrency contracts (e.g., BTC or ETH).
{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"book.BTC-PERPETUAL.100ms"
]
}
}{
"data": {
"type": "snapshot",
"timestamp": 1554373962454,
"instrument_name": "BTC-PERPETUAL",
"change_id": 297217,
"bids": [
[
"new",
5042.34,
30
],
[
"new",
5041.94,
20
]
],
"asks": [
[
"new",
5042.64,
40
],
[
"new",
5043.3,
40
]
]
}
}The name of the instrument
Frequency of notifications. Events will be aggregated over this interval. The value raw selects the finest granularity - events are aggregated over a 1 millisecond interval (Please note that raw interval is only available to authorized users)
Allowed values: raw, 100ms, agg2
raw, 100ms, agg2Client sends subscription request to subscribe to notification channel. Please refer to Notification page for more information.
Server sends subscription notification data
Unique instrument identifier
Identifier of the notification
Identifier of the previous notification (it's not included for the first notification)
The timestamp of last change (milliseconds since the Unix epoch)
Type of notification: snapshot for initial, change for others
snapshot, changeRelated topics
NotificationsOptions Data CollectionJSON-RPC API Changelogbook.(instrument_name).(group).(depth).(interval) ticker.(instrument_name).(interval)Was this page helpful?