Skip to main content

Orderbook Incremental Updates

WSProductionwss://ws.btse.com/ws/oss/spotTestnetwss://testws.btse.io/ws/oss/spot

Subscribe to full orderbook updates with delta streaming. Topic format: update:<symbol>_<grouping> (e.g. update:BTC-USD_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: if size is "0", remove the price level; otherwise update it
  • seqNum must equal prevSeqNum + 1. On gap, unsubscribe and re-subscribe
  • On crossed orderbook (best bid >= best ask), unsubscribe and re-subscribe

Response Content​

NameTypeRequiredDescription
topicStringYesWebSocket topic
dataObjectYesData object

Data Object:

NameTypeRequiredDescription
bidsString[][]YesBid updates [price, size]
asksString[][]YesAsk updates [price, size]
seqNumIntegerYesCurrent sequence number
prevSeqNumIntegerYesPrevious sequence number
typeStringYessnapshot (first) or delta (updates)
timestampLongYesOrderbook timestamp
symbolStringYesMarket symbol
example

Response

{
"topic": "update:BTC-USD_0",
"data": {
"bids": [
[
"59252.5",
"0.06865"
]
],
"asks": [
[
"59292.0",
"0.50000"
]
],
"seqNum": 628282,
"prevSeqNum": 628281,
"type": "snapshot",
"timestamp": 1565135165600,
"symbol": "BTC-USD"
}
}