{
"type": "subscribe",
"channel": "l2OrderbookUpdates",
"id": "BTC-USD",
"nLevels": 50
}{
"type": "subscribed",
"channel": "l2Orderbook",
"id": "BTC-USD",
"contents": {
"bids": [
[
"94500.0",
"1.5"
],
[
"94499.0",
"2.0"
]
],
"asks": [
[
"94501.0",
"0.8"
],
[
"94502.0",
"3.1"
]
],
"lastSequenceId": 1042,
"globalSequenceId": 880421,
"timestamp": 1780410803123456
}
}{
"type": "channel_data",
"channel": "l2OrderbookUpdates",
"id": "BTC-USD",
"contents": {
"bids": [
[
"94499.0",
"0"
]
],
"asks": [
[
"94503.0",
"1.2"
]
],
"lastSequenceId": 1043,
"globalSequenceId": 880422
}
}L2 orderbook updates
Endpoint:
wss://api.arcus.xyz/v1/ws— one socket multiplexes every channel and RPC request. Click Connect, then send the example subscribe message below to start receiving data.
Full L2 orderbook snapshot followed by event-driven incremental deltas for a single market.
On subscribe: full snapshot up to nLevels per side, then delta updates as orders are placed, modified, or cancelled. Each delta carries a monotonically increasing per-market lastSequenceId.
Reconciliation (splice rule): the snapshot is a periodic generation that lags slightly behind the live delta head, so the first delta after the snapshot may be a few sequences ahead of the snapshot’s lastSequenceId — this small boundary gap is expected and self-heals. Seed from the snapshot, then apply every delta whose lastSequenceId exceeds the snapshot’s; do NOT require the first delta to equal snapshotSeq + 1, and do NOT drop or re-subscribe on the initial boundary gap. Once you are applying deltas, sequences are contiguous; a gap that appears mid-stream indicates a genuine problem — resubscribe then. A single delta frame may list the same price more than once; apply entries in array order, last-write-wins per price.
{
"type": "subscribe",
"channel": "l2OrderbookUpdates",
"id": "BTC-USD",
"nLevels": 50
}{
"type": "subscribed",
"channel": "l2Orderbook",
"id": "BTC-USD",
"contents": {
"bids": [
[
"94500.0",
"1.5"
],
[
"94499.0",
"2.0"
]
],
"asks": [
[
"94501.0",
"0.8"
],
[
"94502.0",
"3.1"
]
],
"lastSequenceId": 1042,
"globalSequenceId": 880421,
"timestamp": 1780410803123456
}
}{
"type": "channel_data",
"channel": "l2OrderbookUpdates",
"id": "BTC-USD",
"contents": {
"bids": [
[
"94499.0",
"0"
]
],
"asks": [
[
"94503.0",
"1.2"
]
],
"lastSequenceId": 1043,
"globalSequenceId": 880422
}
}size: "0" means the level was removed. Apply every delta whose lastSequenceId exceeds the snapshot's; the first delta may be a few sequences ahead of the snapshot (an expected boundary gap that self-heals — do not re-subscribe on it). Once you are applying deltas, sequences are contiguous, so only a mid-stream gap means a missed delta — re-subscribe for a fresh snapshot then.
Was this page helpful?