Overview
The WebSocket feed delivers real-time odds updates with the same response format as the REST API/odds endpoint. Instead of polling, you receive instant updates whenever odds change.
Add-on Feature: WebSocket access is available as an add-on. Subscribe through odds-api.io to enable it for your account.
Connection
Endpoint:- API key passed as query parameter
- One connection per API key
- New connections automatically close older ones
/bookmakers/selected/select endpoint.
Filter Parameters
Using
leagues or eventIds is recommended to reduce bandwidth. You cannot use both together.Channels
Usechannels to choose which streams you receive. Omitting it keeps the default odds stream, so existing connections are unaffected. Subscribe to any combination - for example a scoreboard app can use channels=scores,status with no odds traffic.
sport, leagues, eventIds and status filters apply to score/status messages too. These messages are event-level (no bookie, no markets) and are best-effort live state - they carry no seq and are not replayed on reconnect; fetch the current value from GET /events after reconnecting.
Example URLs
Error Responses (400 Bad Request)
Message Types
deleted and no_markets carry an empty markets array and are always delivered, even when a markets= filter is set.
Welcome Message
Sent immediately after connection:Message Format
Each update includes aseq field - a globally unique, monotonically increasing sequence number. Track this value for gap-free reconnection via lastSeq.
Score & Status Messages
score (scores channel) and status (status channel) messages describe the event itself - no bookie, no markets. A score message carries only scores - it is sent on every score change and does not include a status field. A status message is sent once per status transition (a new match appearing as pending, kickoff to live, settled, cancelled) and includes the current scores, so a status-only subscriber gets the final result on settle. The scores object matches the GET /events shape.
Live score and live-status messages also include a clock snapshot (same shape as the clock field on GET /events/live) when clock data is available, so you can re-anchor a client-side ticker on every real event. It is omitted on pending/settled/cancelled messages and on sports without a clock.
The
clock arrives only with an event (a score change or status transition). A match sitting at 0-0, or one you start watching mid-half, sends no message until the next event, so the WebSocket clock alone can be silent for minutes. Seed the initial clock with one GET /events/live call when you connect, then let these messages re-anchor it. The WebSocket keeps the clock in sync; it is not the source of the first value.clock field reference and the client-side ticker recipe.
The top-level scores.home/away is the OT/penalty-inclusive result. The periods map may contain:
score/status messages are best-effort live state: they carry no seq and are not replayed on reconnect. After reconnecting, fetch the current value from GET /events. The full-time key is ft (the legacy feed used fulltime).Quick Start
Handling Message Types
Best Practices
Use Filters to Reduce Bandwidth
Use Filters to Reduce Bandwidth
Use
leagues or eventIds filters when you only need specific data. This reduces bandwidth and improves performance.Implement Reconnection Logic
Implement Reconnection Logic
Always implement exponential backoff for reconnections to handle network issues gracefully.
Handle All Message Types
Handle All Message Types
Handle
welcome, created, updated, deleted, no_markets, and resync_required to keep your data in sync.One Connection Per API Key
One Connection Per API Key
New connections automatically close older ones. Don’t create multiple connections with the same API key.
Process Updates Asynchronously
Process Updates Asynchronously
If receiving many updates, process them asynchronously to avoid blocking your main thread.
Benefits Over REST API
Get Access
Enable WebSocket Access
Subscribe to WebSocket as an add-on through your odds-api.io account
Related Guides
WebSocket Guide
Detailed guide with advanced examples
Fetching Odds
Learn about REST API odds fetching