{
"type": "order_submitted",
"venue": "polymarket",
"orderId": "ord_abc123",
"side": "buy",
"price": 0.55,
"size": 100,
"outcomeId": "clv2abc123def456",
"marketId": "mkt_abc123",
"timestamp": 1710000000000,
"userId": "usr_xyz789",
"eventId": "string",
"stream": "user",
"replayed": true
}{
"type": "balance_update",
"venue": "polymarket",
"tradingBalanceCents": 94500,
"walletBalanceCents": 100000,
"timestamp": 1710000000000,
"userId": "usr_xyz789",
"eventId": "string",
"stream": "user",
"replayed": true
}{
"type": "order_event",
"event": "cancelled",
"userId": "usr_xyz789",
"orderId": "ord_abc123",
"venue": "polymarket",
"filledAmountRaw": "string",
"remainingAmountRaw": "string",
"errorReason": "string",
"dagRunId": "string",
"stepId": "string",
"stepType": "string",
"waitingFor": {
"topic": "string",
"filterValue": "string"
},
"templateName": "string",
"attempt": 0,
"externalId": "string",
"timestamp": 1710000000000,
"eventId": "string",
"stream": "user",
"replayed": true
}User events
User-specific events (requires user-level auth via authenticate action or token query param). Streams order confirmations, balance updates, and a venue-agnostic order lifecycle event (order_event) covering execution-plan steps and terminal fill / failure status across all venues.
{
"type": "order_submitted",
"venue": "polymarket",
"orderId": "ord_abc123",
"side": "buy",
"price": 0.55,
"size": 100,
"outcomeId": "clv2abc123def456",
"marketId": "mkt_abc123",
"timestamp": 1710000000000,
"userId": "usr_xyz789",
"eventId": "string",
"stream": "user",
"replayed": true
}{
"type": "balance_update",
"venue": "polymarket",
"tradingBalanceCents": 94500,
"walletBalanceCents": 100000,
"timestamp": 1710000000000,
"userId": "usr_xyz789",
"eventId": "string",
"stream": "user",
"replayed": true
}{
"type": "order_event",
"event": "cancelled",
"userId": "usr_xyz789",
"orderId": "ord_abc123",
"venue": "polymarket",
"filledAmountRaw": "string",
"remainingAmountRaw": "string",
"errorReason": "string",
"dagRunId": "string",
"stepId": "string",
"stepType": "string",
"waitingFor": {
"topic": "string",
"filterValue": "string"
},
"templateName": "string",
"attempt": 0,
"externalId": "string",
"timestamp": 1710000000000,
"eventId": "string",
"stream": "user",
"replayed": true
}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.
Order confirmation after trade execution (user-level auth required)
Balance update after execution (user-level auth required)
Venue-agnostic DAG and order lifecycle stream. Discriminate on the event field. Emitted for every venue automatically.