{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"book.BTC-PERPETUAL.(group).(depth).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.(group).(depth).100ms"
]
}
}{
"data": {
"timestamp": 1554375447971,
"instrument_name": "ETH-PERPETUAL",
"change_id": 109615,
"bids": [
[
160,
40
]
],
"asks": [
[
161,
20
]
]
}
}The name of the instrument
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
Allowed values: none, 1, 2, 5, 10, 25, 100, 250
none, 1, 2, 5, 10, 25, 100, 250Number of price levels to be included
Allowed values: 1, 10, 20
1, 10, 20Frequency 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
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)
Related topics
book.(instrument_name).(interval) Options Data CollectionNotificationsJSON-RPC API Changelogquote.(instrument_name)Was this page helpful?