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": [
52.632
]
}
]"<string>""<string>""<string>""<string>"Odds
Get snapshots of the latest odds for a fixture
Return the latest odds for each unique market line for a given fixture. If the ‘asOf’ parameter is provided, the snapshots are taken at that point in time from historical data. Otherwise, it returns the current live snapshot if it exists within the current 5-minutes interval.
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": [
52.632
]
}
]"<string>""<string>""<string>""<string>"Authorizations
User's session JWT.
The user's long-lived API token, obtained from the activation endpoint.
Headers
Bearer token for the user's session JWT.
The user's long-lived API token.
Path Parameters
The ID of the fixture
Query Parameters
Optional Unix timestamp (ms) for a historical snapshot. If omitted, returns the live snapshot.
Response
Strictly formatted to 3 decimal places, or NA for quarter handicap lines
Pattern:
^(NA|\d+\.\d{3})$Was this page helpful?