Book subscription
REQUEST wss://ws-mdpro.bitvavo.com/v2 book
Subscribes to events that return data when there is a change in the order book.
Request
- Schema
- Example (body)
Body
- Array [
- ]
Set to subscribe to start or to unsubscribe to stop the subscription.
Possible values: [subscribe, unsubscribe]
channels object[]required
The events you want to subscribe to.
The channel to which you want to subscribe.
bookThe markets for which you want stream the data.
["BTC-EUR"]{
"action": "subscribe",
"channels": [
{
"name": "book",
"markets": [
"BTC-EUR"
]
}
]
}
Response
- Book confirmation
- Book event
- Schema
- Example (body)
Schema
The returned event.
booksubscriptions object
The object with all currently active subscriptions.
The markets for which to stream order book data.
["BTC-EUR"]{
"event": "book",
"subscriptions": {
"book": [
"BTC-EUR"
]
}
}
- Schema
- Example (body)
Schema
The returned event.
bookThe market to which you subscribed.
BTC-EURUnique identifier of the market data snapshot. Increments by 1 with each order book update.
WS Market Data Pro
noncevalues cannot be used with standard WebSocket or REST APIs.
438524All bids with the price and the size. Bids with size 0 are no longer available at that price.
[["9209.3","0.015"]]All asks with the price and the size. Asks with size 0 are no longer available at that price.
[["9220.2","0.015"]]The Unix timestamp in nanoseconds of the last transaction event.
1542967486256Sequence number identifying the start of the range of events that the order book update includes. To learn more, see Sync your local order book.
438524Sequence number identifying the end of the range of events that the order book update includes. To learn more, see Sync your local order book.
438524The type of order book update. Currently, only update is supported.
Possible values: [update]
update{
"event": "book",
"market": "BTC-EUR",
"nonce": 438524,
"bids": [
[
"9209.3",
"0.015"
]
],
"asks": [
[
"9220.2",
"0.015"
]
],
"timestamp": 1542967486256,
"startMdSeqNo": 438524,
"endMdSeqNo": 438524,
"type": "update"
}