Skip to main content

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:
Authentication:
  • API key passed as query parameter
  • One connection per API key
  • New connections automatically close older ones
Pricing: 2x the REST API price Bookmakers: The WebSocket automatically sends updates for all bookmakers you have selected in your account. Manage your bookmakers via the /bookmakers/selected/select endpoint.

Filter Parameters

The markets parameter is required for the odds channel (the default). It is not needed if you subscribe only to scores/status.
Using leagues or eventIds is recommended to reduce bandwidth. You cannot use both together.

Channels

Use channels 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.
channels is an allowlist - you receive only the channels you list. If you want odds, you must include odds (e.g. channels=odds,scores,status); connecting with channels=scores,status stops odds delivery. Omitting channels entirely keeps the default odds-only stream.
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 a seq 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.
See the Live Events guide for the full 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 leagues or eventIds filters when you only need specific data. This reduces bandwidth and improves performance.
Always implement exponential backoff for reconnections to handle network issues gracefully.
Handle welcome, created, updated, deleted, no_markets, and resync_required to keep your data in sync.
New connections automatically close older ones. Don’t create multiple connections with the same API key.
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

WebSocket Guide

Detailed guide with advanced examples

Fetching Odds

Learn about REST API odds fetching