Get a Merkle proof for a specific fixture update
curl --request GET \
--url https://txline.txodds.com/api/fixtures/validation \
--header 'Authorization: Bearer <token>' \
--header 'X-Api-Token: <api-key>'import requests
url = "https://txline.txodds.com/api/fixtures/validation"
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/fixtures/validation', 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/fixtures/validation",
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/fixtures/validation"
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/fixtures/validation")
.header("Authorization", "Bearer <token>")
.header("X-Api-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://txline.txodds.com/api/fixtures/validation")
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{
"snapshot": {
"Ts": 123,
"StartTime": 123,
"Competition": "<string>",
"CompetitionId": 123,
"FixtureGroupId": 123,
"Participant1Id": 123,
"Participant1": "<string>",
"Participant2Id": 123,
"Participant2": "<string>",
"FixtureId": 123,
"Participant1IsHome": true
},
"summary": {
"fixtureId": 123,
"competitionId": 123,
"competition": "<string>",
"updateStats": {
"updateCount": 123,
"minTimestamp": 123,
"maxTimestamp": 123
},
"updateSubTreeRoot": "<string>"
},
"subTreeProof": {},
"mainTreeProof": {}
}<string><string><string><string>Fixtures
Get a Merkle proof for a specific fixture update
Each fixture returned or referenced in the TxODDS Oracle API is part of an hourly batch of fixture updates. Blockchain holds the Merkle root (ultimate cryptographic containment proof) of each fixture belonging to that batch. This endpoint returns the Merkle proof, i.e., the hashes along the branch of the Merkle tree for the batch up to but not inclusive of that Merkle root. The user can then call on-chain validation directly to get a cryptographic validation that a given fixture update was published by TxODDS as confirmed by the published Merkle root. This on-chain transaction requires the fixture record and the Merkle proof returned here.
GET
/
api
/
fixtures
/
validation
Get a Merkle proof for a specific fixture update
curl --request GET \
--url https://txline.txodds.com/api/fixtures/validation \
--header 'Authorization: Bearer <token>' \
--header 'X-Api-Token: <api-key>'import requests
url = "https://txline.txodds.com/api/fixtures/validation"
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/fixtures/validation', 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/fixtures/validation",
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/fixtures/validation"
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/fixtures/validation")
.header("Authorization", "Bearer <token>")
.header("X-Api-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://txline.txodds.com/api/fixtures/validation")
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{
"snapshot": {
"Ts": 123,
"StartTime": 123,
"Competition": "<string>",
"CompetitionId": 123,
"FixtureGroupId": 123,
"Participant1Id": 123,
"Participant1": "<string>",
"Participant2Id": 123,
"Participant2": "<string>",
"FixtureId": 123,
"Participant1IsHome": true
},
"summary": {
"fixtureId": 123,
"competitionId": 123,
"competition": "<string>",
"updateStats": {
"updateCount": 123,
"minTimestamp": 123,
"maxTimestamp": 123
},
"updateSubTreeRoot": "<string>"
},
"subTreeProof": {},
"mainTreeProof": {}
}<string><string><string><string>Authorizations
Headers
Query Parameters
Was this page helpful?