Skip to main content

Connection

  • URL: "wss://v5-test.oddspapi.io"
  • First message must be login

Protocol flow

  1. Client connects
  2. Client sends login
  3. Server sends login_ok (or error)
  4. Server streams UPDATE structures for subscribed channels

Control frames vs stream frames

  • Control frames: login_ok, error, snapshot_required, resume_complete
  • Stream frames: { "channel": "...", "type": "UPDATE", ... }

Message formats

  • receiveType: "json" (default): JSON text frames
  • receiveType: "binary": server is sending msgpack for odds and oddsFutures channels (other channels will still be JSON bytes)

Message structure

All realtime stream messages use a consistent structure:
{
  "channel": "scores",
  "type": "UPDATE",
  "payload": { "..." : "..." },
  "ts": 1765497902846,
  "entryId": "1765497902846-3221"
}