Orderbook Incremental Updates
WSProduction
wss://ws.btse.com/ws/oss/futuresTestnetwss://testws.btse.io/ws/oss/futuresSubscribe to full orderbook updates with delta streaming.
Topic format: update:<symbol>_<grouping> (e.g. update:BTC-PERP_0)
On successful subscribe, the server pushes one snapshot message (up to 50 levels)
followed by delta updates. The snapshot is delivered without grouping (raw book);
only delta updates respect the subscribed <grouping> value. If the market is
idle, the snapshot still arrives but no deltas follow until book activity resumes.
Applying deltas:
[price, size]tuple: ifsizeis"0", remove the price level; otherwise update itseqNummust equalprevSeqNum + 1. On gap, unsubscribe and re-subscribe- On crossed orderbook (best bid >= best ask), unsubscribe and re-subscribe
Response Contentβ
| Name | Type | Required | Description |
|---|---|---|---|
| topic | String | Yes | WebSocket topic |
| data | Object | Yes | Data object |
Data Object:
| Name | Type | Required | Description |
|---|---|---|---|
| bids | String[][] | Yes | Bid updates [price, size] |
| asks | String[][] | Yes | Ask updates [price, size] |
| seqNum | Integer | Yes | Current sequence number |
| prevSeqNum | Integer | Yes | Previous sequence number |
| type | String | Yes | snapshot (first) or delta (updates) |
| timestamp | Long | Yes | Orderbook timestamp |
| symbol | String | Yes | Market symbol |
example
Response
{
"topic": "update:BTC-PERP_0",
"data": {
"bids": [
[
"122160.1",
"69350"
],
[
"122159.9",
"226150"
]
],
"asks": [
[
"122133.3",
"1000"
],
[
"122124.0",
"343410"
]
],
"seqNum": 628282,
"prevSeqNum": 628281,
"type": "snapshot",
"timestamp": 1565135165600,
"symbol": "BTC-PERP"
}
}