{
"type": "orderbook_snapshot",
"outcomeId": "clv2abc123def456",
"channel": "orderbook",
"seq": 1710000001,
"checksum": 2918476531,
"bids": [
{
"price": 0.55,
"totalSize": 1500,
"venues": {}
}
],
"asks": [
{
"price": 0.55,
"totalSize": 1500,
"venues": {}
}
],
"venueOrderbooks": {},
"venues": {},
"midpoint": 0.55,
"spread": 0.01,
"timestamp": 1710000000000,
"tick": 0,
"markSource": "local"
}{
"type": "orderbook_delta",
"outcomeId": "clv2abc123def456",
"channel": "orderbook",
"seq": 1710000001,
"checksum": 2918476531,
"bidChanges": [
{
"price": 0.55,
"totalSize": 1500,
"venues": {}
}
],
"askChanges": [
{
"price": 0.55,
"totalSize": 1500,
"venues": {}
}
],
"venueDeltaBooks": {},
"venues": {},
"midpoint": 0.55,
"spread": 0.01,
"tick": 0,
"markSource": "local",
"timestamp": 1710000000000
}{
"type": "subscribed",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"marketIds": [
"string"
],
"channel": "orderbook",
"id": "string"
}{
"type": "unsubscribed",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"marketIds": [
"string"
],
"channel": "orderbook",
"id": "string"
}{
"type": "market_resolved",
"outcomeId": "clv2abc123def456",
"status": "resolved",
"result": "Yes",
"outcomes": [
{
"label": "Yes",
"winner": true,
"externalIdentifier": "0xabc123",
"payoutPerShare": 0,
"refundAtCost": true,
"winnerSource": "venue"
}
],
"timestamp": 1710000000000
}{
"action": "subscribe",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"id": "string"
}{
"action": "unsubscribe",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"id": "string"
}{
"action": "resnapshot",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"id": "string"
}{
"action": "subscribe",
"channel": "orderbook",
"outcomeIds": [
"vmo_1"
],
"latency": "realtime"
}Orderbook
Subscribe to aggregated orderbook updates for canonical markets. Receive an initial snapshot, then incremental deltas with sequencing and checksums. Client maintains a local book by applying deltas. Request a resnapshot if your local state drifts.
Sequencing: seq increments between consecutive messages for a given market. If you receive a seq that is not your expected next value, request a new snapshot via resnapshot.
Orderbook socket: the same channel is served on wss://ob.agg.market/ws with identical snapshot and delta objects. There, the optional latency subscribe field selects the default 100 ms conflated tier or "realtime". seq is counted separately on each tier; checksum is the same for the same book state. resnapshot stays on the tier the subscribe chose. See Orderbook streams.
{
"type": "orderbook_snapshot",
"outcomeId": "clv2abc123def456",
"channel": "orderbook",
"seq": 1710000001,
"checksum": 2918476531,
"bids": [
{
"price": 0.55,
"totalSize": 1500,
"venues": {}
}
],
"asks": [
{
"price": 0.55,
"totalSize": 1500,
"venues": {}
}
],
"venueOrderbooks": {},
"venues": {},
"midpoint": 0.55,
"spread": 0.01,
"timestamp": 1710000000000,
"tick": 0,
"markSource": "local"
}{
"type": "orderbook_delta",
"outcomeId": "clv2abc123def456",
"channel": "orderbook",
"seq": 1710000001,
"checksum": 2918476531,
"bidChanges": [
{
"price": 0.55,
"totalSize": 1500,
"venues": {}
}
],
"askChanges": [
{
"price": 0.55,
"totalSize": 1500,
"venues": {}
}
],
"venueDeltaBooks": {},
"venues": {},
"midpoint": 0.55,
"spread": 0.01,
"tick": 0,
"markSource": "local",
"timestamp": 1710000000000
}{
"type": "subscribed",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"marketIds": [
"string"
],
"channel": "orderbook",
"id": "string"
}{
"type": "unsubscribed",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"marketIds": [
"string"
],
"channel": "orderbook",
"id": "string"
}{
"type": "market_resolved",
"outcomeId": "clv2abc123def456",
"status": "resolved",
"result": "Yes",
"outcomes": [
{
"label": "Yes",
"winner": true,
"externalIdentifier": "0xabc123",
"payoutPerShare": 0,
"refundAtCost": true,
"winnerSource": "venue"
}
],
"timestamp": 1710000000000
}{
"action": "subscribe",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"id": "string"
}{
"action": "unsubscribe",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"id": "string"
}{
"action": "resnapshot",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"id": "string"
}{
"action": "subscribe",
"channel": "orderbook",
"outcomeIds": [
"vmo_1"
],
"latency": "realtime"
}App-level auth: pass appId as a query parameter on connect. Required for all connections. Browsers are admitted by an Origin on the app's allowed origins; servers by the apiKey scheme instead.
Optional server-to-server auth on the handshake; any supplied key must be valid and replaces the Origin check. Without a key, an allowed Origin is required even when the app has requireApiKey for REST. WebSocket key enforcement is currently deferred. Needed for the app-events channel and for the firehose channel on the orderbook socket. Never send from a browser.
User-level auth: send { action: 'authenticate', token } after connected (a token query param still works but is deprecated). Required for user-specific events (orders, balances). Same JWT as the REST API.
Full aggregated orderbook state with venue attribution
Incremental update — only changed levels. size=0 means level removed.
Terminal resolution event for a subscribed outcome. Delivered once per outcome subscription; after delivery, the gateway closes out the orderbook channel for that outcome.
Subscribe to aggregated orderbook updates for markets
Request a fresh snapshot for the current market state
Orderbook socket only. Adds the optional latency field; the default is the 100 ms conflated tier.