Skip to main content
The AGG WebSocket delivers a full aggregated orderbook snapshot on subscribe, then incremental deltas as the book changes. Each outcome has its own orderbook — there is no complement derivation. Each level includes per-venue attribution so you can render both the aggregated depth and the venue breakdown from the same stream.
Orderbook subscriptions are keyed by venueMarketOutcomeId — the outcomes[].id on REST market responses — not by venueMarketId. Subscribing with a venueMarketId never resolves a book and the gateway replies with a Snapshot unavailable error. (Only the REST GET /orderbooks endpoint and the arb streams use market-level ids.)
Full control over the WebSocket connection and local orderbook state.

1. Connect and subscribe

The SDK applies snapshots and deltas for you, tracks seq, validates checksum (XOR of per-level CRC32), drops stale deltas where seq <= current.seq, and requests a fresh snapshot when integrity checks fail. The gateway is a stateless fan-out — all orderbook recovery is handled client-side by the SDK.

2. Read the orderbook

The OrderbookState passed to callbacks uses object-shaped levels:

3. Per-venue orderbooks

Per-venue depth is available on the same object:

4. REST fallback

For one-time fetches without a live socket:

Integrity

The SDK verifies seq and checksum automatically and requests a fresh snapshot when the local book drifts. If you are implementing the wire protocol yourself, use the WebSocket Protocol page for the snapshot/delta formats and resnapshot flow.

WebSocket Protocol

Wire format, sequencing, resnapshot requests, and heartbeat behavior.

Real-Time Charts

Build live candles from the same orderbook and trade streams.

User Notifications

Authenticated order and balance events on the same WebSocket connection.