Skip to main content

Endpoint

The websocket streams aggregate live-state changes keyed by game_id. It does not stream raw upstream provider messages by default.

Authentication

Pass your data key in the websocket URL:
On successful connection:

Subscribe

Subscribe to all matched sports games Predexon currently covers:
Subscribe by league:
Subscribe by game IDs:
Filters: Exactly one of game_ids, leagues, or sports is required. game_ids: ["*"] is the all-games subscription.

Unsubscribe

Server Messages

ack

event

error

Heartbeats

The gateway uses websocket ping/pong frames for connection liveness. Clients should respond to ping frames according to their websocket library’s normal behavior.

Reconnect Behavior

If the connection drops, reconnect and resubscribe. Use REST to rehydrate current state after reconnect:
The websocket contract does not require replay cursors. A later version may add a since_sequence field.

Update Policy

The websocket emits an update when the aggregate changes materially:
  • Score changed
  • Period changed
  • Clock changed
  • Key incidents changed
  • live or ended changed
  • Winner changed
  • Reliability changed
  • Source conflict appeared or resolved
  • Stale state appeared or resolved
It does not emit every upstream heartbeat or duplicate source message.

Identifier Rules

Websocket updates are keyed by game_id. Trading and routing still use canonical outcome-level predexon_id.