{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"book.BTC-PERPETUAL.10.20.100ms"
]
}
}{
"data": {
"timestamp": 1554375447971,
"instrument_name": "ETH-PERPETUAL",
"change_id": 109615,
"bids": [
[
160,
40
]
],
"asks": [
[
161,
20
]
]
}
}book.(instrument_name).(group).(depth).(interval)
Aggregated order book updates for a specific instrument.
Notifications are sent once per specified interval, with prices grouped (rounded) according to group, and the book truncated to the specified depth (number of price levels).
The asks and bids fields are both lists of [price, amount] pairs.
price: price level, rounded according togroup(USD per BTC)amount: total amount at that price level
For Starbase-routed instruments, the published price levels include accepted mass-quote liquidity.
Units: For perpetual and inverse futures the amount is in USD units. For options and linear futures it is in the underlying base currency coin.
📖 Related Article: Options Data Collection Best Practices
{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"book.BTC-PERPETUAL.10.20.100ms"
]
}
}{
"data": {
"timestamp": 1554375447971,
"instrument_name": "ETH-PERPETUAL",
"change_id": 109615,
"bids": [
[
160,
40
]
],
"asks": [
[
161,
20
]
]
}
}Instrument name
Group prices (by rounding). Use none for no grouping.
For ETH cryptocurrency, the real group is divided by 100.0. Example: a value of 5 means using 0.05.
Allowed values:
- BTC:
none,1,2,5,10 - ETH:
none,5,10,25,100,250
none, 1, 2, 5, 10, 25, 100, 250Number of price levels to be included.
1, 10, 20Frequency of notifications. Events will be aggregated over this interval.
Allowed values: 100ms, agg2. The raw interval is not supported on this channel. For raw order book updates, use book.{instrument_name}.raw instead.
100ms, agg2Client sends subscription request to subscribe to notification channel. Please refer to Notification page for more information.
2.0
public/subscribe, private/subscribeServer sends subscription notification data
Unique instrument identifier
id of the notification
List of bids (price-amount pairs)
List of asks (price-amount pairs)
The timestamp of last change (milliseconds since the Unix epoch)
Was this page helpful?