{
"asset_id": "example",
"book": {
"asks": [
null
],
"asset_id": "example",
"bids": [
null
],
"hash": "example",
"last_update_id": 0,
"timestamp": "2026-01-01T00:00:00Z"
},
"exchange_ts": 0,
"kind": "Snapshot",
"local_ts_ms": 0,
"market_id": "example",
"seq": 0
}{
"asset_id": "example",
"changes": [
{
"price": null,
"side": null,
"size": 0.5
}
],
"exchange_ts": 0,
"kind": "Delta",
"local_ts_ms": 0,
"market_id": "example",
"seq": 0
}{
"asset_id": "example",
"kind": "Clear",
"local_ts_ms": 0,
"market_id": "example",
"reason": null,
"seq": 0
}{
"kind": "Connected"
}{
"gap_ms": 0,
"kind": "Reconnected"
}{
"dropped": 0,
"first_seq": 0,
"kind": "Lagged",
"last_seq": 0
}{
"kind": "BookInvalidated",
"market_id": "example",
"reason": null
}{
"kind": "Error",
"message": "example"
}{
"market_id": "example",
"outcome": "example"
}{
"market_id": "example",
"outcome": "example"
}Per-market L2 orderbook stream — Snapshot on subscribe, then Delta updates.
Per-market L2 orderbook stream —Documentation Index
Fetch the complete documentation index at: https://docs.openpx.trade/llms.txt
Use this file to discover all available pages before exploring further.
Snapshot on subscribe, then Delta updates.{
"asset_id": "example",
"book": {
"asks": [
null
],
"asset_id": "example",
"bids": [
null
],
"hash": "example",
"last_update_id": 0,
"timestamp": "2026-01-01T00:00:00Z"
},
"exchange_ts": 0,
"kind": "Snapshot",
"local_ts_ms": 0,
"market_id": "example",
"seq": 0
}{
"asset_id": "example",
"changes": [
{
"price": null,
"side": null,
"size": 0.5
}
],
"exchange_ts": 0,
"kind": "Delta",
"local_ts_ms": 0,
"market_id": "example",
"seq": 0
}{
"asset_id": "example",
"kind": "Clear",
"local_ts_ms": 0,
"market_id": "example",
"reason": null,
"seq": 0
}{
"kind": "Connected"
}{
"gap_ms": 0,
"kind": "Reconnected"
}{
"dropped": 0,
"first_seq": 0,
"kind": "Lagged",
"last_seq": 0
}{
"kind": "BookInvalidated",
"market_id": "example",
"reason": null
}{
"kind": "Error",
"message": "example"
}{
"market_id": "example",
"outcome": "example"
}{
"market_id": "example",
"outcome": "example"
}Full orderbook snapshot — replace any cached book for (market_id, asset_id).
Incremental change to an existing book — apply in-place.
Book invalidation — drop the cached book and wait for the next Snapshot.
Initial socket establishment.
Socket re-established after an outage — gap_ms is the wall-clock interval since the last received message.
Slow consumer dropped messages — every affected book is invalidated and must be rebuilt from the next Snapshot.
A specific market's book is no longer trustworthy — drop cache and wait for next Snapshot (reasons: Reconnect, Lag, SequenceGap, ExchangeReset).
A non-fatal error observed on the connection (session continues).
Add to the active orderbook subscription set
Remove from the active orderbook subscription set