Skip to main content
GET
/
odds
/
stream
Get a real-time Server-Sent Events stream of odds updates
curl --request GET \
  --url https://api.example.com/odds/stream
{
  "FixtureId": {},
  "MessageId": "<string>",
  "Ts": {},
  "Bookmaker": "<string>",
  "BookmakerId": {},
  "SuperOddsType": "<string>",
  "InRunning": true,
  "PriceNames": [
    "<string>"
  ],
  "Prices": [
    {}
  ]
}

Documentation Index

Fetch the complete documentation index at: https://txline-docs.txodds.com/llms.txt

Use this file to discover all available pages before exploring further.

A long-lived stream of odds updates. The stream consists of two types of events:
  1. Data messages: These have an id in the format timestamp:index and data containing a JSON object for a single Odds record.
  2. Heartbeats: These have an event field set to heartbeat and may have data like {"Ts": 12345}.

Query Parameters

fixtureId
int64
Optional. Filter the event stream for a single fixture ID.

Headers

Last-Event-ID
string
Optional. The ID of the last event received, to resume the stream.

Response

Returns a Server-Sent Events (SSE) stream with content type text/event-stream.

Data Events

Each data event contains:
  • id: Event identifier in format timestamp:index
  • data: JSON object containing an Odds record

Odds Object Structure

FixtureId
int64
required
Fixture identifier
MessageId
string
required
Unique message identifier for the odds update
Ts
int64
required
Timestamp of the odds update
Bookmaker
string
required
Bookmaker name
BookmakerId
int32
required
Bookmaker identifier
SuperOddsType
string
required
Type of odds market
InRunning
boolean
required
Indicates if the fixture is currently in play
PriceNames
array<string>
Names of the prices/outcomes
Prices
array<int32>
Odds values for each outcome

Heartbeat Events

Heartbeat events keep the connection alive and contain:
  • event: Set to heartbeat
  • data: JSON object like {"Ts": 12345}
id: 1704067200000:0
data: {"FixtureId":1001,"MessageId":"msg_12345","Ts":1704067200000,"Bookmaker":"BetMGM","BookmakerId":5,"SuperOddsType":"Moneyline","InRunning":false,"PriceNames":["Alabama","Georgia"],"Prices":[150,200]}

event: heartbeat
data: {"Ts": 1704067260000}