Skip to main content
GET
/
api
/
odds
/
snapshot
/
{fixtureId}
Get snapshots of the latest odds for a fixture
curl --request GET \
  --url https://txline.txodds.com/api/odds/snapshot/{fixtureId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Api-Token: <api-key>'
import requests

url = "https://txline.txodds.com/api/odds/snapshot/{fixtureId}"

headers = {
"Authorization": "Bearer <token>",
"X-Api-Token": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-Api-Token': '<api-key>'}
};

fetch('https://txline.txodds.com/api/odds/snapshot/{fixtureId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://txline.txodds.com/api/odds/snapshot/{fixtureId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Api-Token: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://txline.txodds.com/api/odds/snapshot/{fixtureId}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Api-Token", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://txline.txodds.com/api/odds/snapshot/{fixtureId}")
.header("Authorization", "Bearer <token>")
.header("X-Api-Token", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://txline.txodds.com/api/odds/snapshot/{fixtureId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Api-Token"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "FixtureId": 123,
    "MessageId": "<string>",
    "Ts": 123,
    "Bookmaker": "<string>",
    "BookmakerId": 123,
    "SuperOddsType": "<string>",
    "InRunning": true,
    "GameState": "<string>",
    "MarketParameters": "<string>",
    "MarketPeriod": "<string>",
    "PriceNames": [
      "<string>"
    ],
    "Prices": [
      123
    ],
    "Pct": [
      "<string>"
    ]
  }
]
"<string>"
"<string>"
"<string>"
"<string>"

Authorizations

Authorization
string
header
required

User's session JWT.

X-Api-Token
string
header
required

The user's long-lived API token, obtained from the activation endpoint.

Headers

Authorization
string
required

Bearer token for the user's session JWT.

X-Api-Token
string
required

The user's long-lived API token.

Path Parameters

fixtureId
integer<int64>
required

The ID of the fixture

Query Parameters

asOf
integer<int64>

Optional Unix timestamp (ms) for a historical snapshot. If omitted, returns the live snapshot.

Response

FixtureId
integer<int64>
required
MessageId
string
required
Ts
integer<int64>
required
Bookmaker
string
required
BookmakerId
integer<int32>
required
SuperOddsType
string
required
InRunning
boolean
required
GameState
string
MarketParameters
string
MarketPeriod
string
PriceNames
string[]
Prices
integer<int32>[]
Pct
string[]

Strictly formatted to 3 decimal places, or NA for quarter handicap lines

Pattern: ^(NA|\d+\.\d{3})$