AGG is currently in alpha. APIs, components, and docs may change.
{
"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"
],
"channel": "orderbook"
}{
"type": "unsubscribed",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"channel": "orderbook"
}{
"type": "market_resolved",
"outcomeId": "clv2abc123def456",
"status": "resolved",
"result": "Yes",
"outcomes": [
{
"label": "Yes",
"winner": true,
"externalIdentifier": "0xabc123"
}
],
"timestamp": 1710000000000
}{
"action": "subscribe",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
]
}{
"action": "unsubscribe",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
]
}{
"action": "resnapshot",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
]
}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.
Documentation Index
Fetch the complete documentation index at: https://docs.agg.market/llms.txt
Use this file to discover all available pages before exploring further.
{
"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"
],
"channel": "orderbook"
}{
"type": "unsubscribed",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
],
"channel": "orderbook"
}{
"type": "market_resolved",
"outcomeId": "clv2abc123def456",
"status": "resolved",
"result": "Yes",
"outcomes": [
{
"label": "Yes",
"winner": true,
"externalIdentifier": "0xabc123"
}
],
"timestamp": 1710000000000
}{
"action": "subscribe",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
]
}{
"action": "unsubscribe",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
]
}{
"action": "resnapshot",
"channel": "orderbook",
"outcomeIds": [
"clv2abc123def456",
"clv2xyz789ghi012"
]
}App-level auth: pass appId as a query parameter on connect. Required for all connections. The appId must belong to an active app with matching allowed origins.
User-level auth: pass JWT as token query param on connect, or send { action: 'authenticate', token } mid-session. 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