Connect and Subscribe
{ type: "subscribed", marketIds: ["market-123"] }— confirmation{ type: "orderbook_snapshot", ... }— full book, sent immediately
{ type: "orderbook_delta", ... }— incremental updates as the book changes
Handle Snapshots and Deltas
Delta Application Logic
Deltas tell you which price levels changed. A level withsize: 0 means remove it.
Sequence Gaps
The gateway tracks sequence numbers per client. If your client misses a delta (e.g. due to network lag), the gateway automatically sends a full snapshot instead of the delta. You don’t need to handle sequence gaps — just handle bothorderbook_snapshot and orderbook_delta as shown above.