{
"type": "subscribe",
"channel": "orderbook",
"id": "random string",
"symbol": "WBTCUSDT"
}
{
"type": "unsubscribe",
"channel": "orderbook",
"id": "random string",
"symbol": "WBTCUSDT"
}
{
"type": "update",
"channel": "orderbook",
"symbol": "WBTCUSDT",
"data": {
"bids": [
{
"price": "32680.18",
"volume": "0.09",
"orderCount": "1"
},
{
"price": "32571.69",
"volume": "0.1",
"orderCount": "1"
},
{
"price": "32142.54",
"volume": "0.1",
"orderCount": "1"
}
],
"asks": [
{
"price": "34915.97",
"volume": "0.1",
"orderCount": "1"
}
],
"lastTimestamp": "1700809758368",
"timestamp": "1700809759368"
}
}
"init"
. Buffer and store this data to create your local order book."uptade"
.lastTimestamp
matches the timestamp
in previous message from your local order book to ensure updates are in sequence.