Skip to main content
API Endpoints: Use https://txline.txodds.com/api/ for mainnet or https://txline-dev.txodds.com/api/ for devnet
Prerequisites: Complete Quickstart activation or World Cup Free Tier activation first. The snippets assume jwt is the guest JWT from /auth/guest/start and apiToken is the value returned by /api/token/activate.

Stream Expectations

An open SSE connection means your credentials and stream request are accepted. It does not guarantee that a covered fixture is producing data at that exact moment. If the stream opens but you only see heartbeats or no data messages for a while:
  • Check Scores Schedule for active or upcoming covered fixtures.
  • Keep the stream open during a covered live fixture window.
  • Use /api/scores/historical/{fixtureId} when you need replay data for a completed fixture within the historical availability window.
  • Confirm you are using the correct network host for your subscription.
If a stream returns 401, renew the guest JWT from the same host and reconnect with the same X-Api-Token. If it returns 403, check that the API token belongs to the same network and subscription bundle.

Runnable Devnet Streams

The repository includes runnable devnet stream scripts that handle activation, API token headers, JWT renewal, and SSE connections: See Runnable Devnet Examples for the required devnet environment variables and Node.js runtime notes.

SSE Parsing Helper

Stream Odds Updates

Connect to the odds stream for real-time updates.
Use https://txline-dev.txodds.com/api/odds/stream for a devnet subscription.

Stream Scores Updates

Connect to the scores stream for real-time updates.
Use https://txline-dev.txodds.com/api/scores/stream for a devnet subscription. Scores stream messages can be used as validation inputs. When a message contains a real sequence field, use its observed Seq or seq value with /api/scores/stat-validation; do not replace it with 0 or a synthetic sequence number.

Historical Scores

Fetch the complete sequence of score updates for a fixture that started between two weeks and six hours ago.
Use the observed sequence from a historical record when requesting a validation proof for that record.
Historical Availability: This endpoint only returns data for fixtures with start times between two weeks and six hours in the past from the current time.
Stream Compression: To reduce bandwidth usage by up to 70-80%, add "Accept-Encoding": "gzip" to your headers. You’ll need to decompress the response chunks using gunzipSync() from Node’s zlib module before decoding.

Troubleshooting

For activation, credential, and stream diagnostics, see Troubleshooting.