Skip to main content
GET
/
scores
/
stream
Get a real-time Server-Sent Events stream of scores updates
curl --request GET \
  --url https://api.example.com/scores/stream
{
  "FixtureId": {},
  "Seq": {},
  "Ts": {},
  "Stats": {},
  "Sport": "<string>"
}

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 scores 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 Scores 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 a Scores record

Scores Object Structure

FixtureId
int64
Fixture identifier
Seq
int32
Sequence number of the score event
Ts
int64
Timestamp of the score event
Stats
object
Map of statistical keys to their values
Sport
string
Sport type (Basketball, UsFootball, etc.)

Heartbeat Events

Heartbeat events keep the connection alive and contain:
  • event: Set to heartbeat
  • data: JSON object like {"Ts": 12345}