curl --request GET \
--url https://txline.txodds.com/api/scores/stat-validation-v4 \
--header 'Authorization: Bearer <token>' \
--header 'X-Api-Token: <api-key>'import requests
url = "https://txline.txodds.com/api/scores/stat-validation-v4"
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/scores/stat-validation-v4', 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/scores/stat-validation-v4",
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/scores/stat-validation-v4"
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/scores/stat-validation-v4")
.header("Authorization", "Bearer <token>")
.header("X-Api-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://txline.txodds.com/api/scores/stat-validation-v4")
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{
"payload": {
"ts": 123,
"summary": {
"FixtureId": 123,
"UpdateStats": {
"UpdateCount": 123,
"MinTimestamp": 123,
"MaxTimestamp": 123
},
"EventStatsSubTreeRoot": "<string>"
},
"fixtureProof": {},
"mainTreeProof": {},
"eventStatRoot": "<string>",
"multiproofHashes": {},
"leaves": [
{
"stat": {
"Key": 123,
"Value": 123,
"Period": 123
},
"statProof": {}
}
],
"leafIndices": [
123
]
},
"signature": "<string>",
"version": "v1"
}<string><string><string><string><string>Get a polymorphic Merkle multiproof for fixture statistics
This endpoint provides a cryptographic proof for up to 5 statistics within a single scores update. The TxODDS Oracle data is structured in a three-level Merkle hierarchy:
- A main batch contains summaries for multiple fixtures.
- Each fixture summary is the root of a sub-tree of all score update events for that fixture.
- Each score update event combines an R1 Merkle sub-tree of non-zero statistics with an R2 zero-mask branch proving zero-valued statistics.
This endpoint automatically detects the underlying Merkle schema of the published batch and returns the full set of proofs needed to connect the requested stats to the main batch root published on-chain.
Polymorphic Schema Support (V1 and V2)
The response returns a ScoresStatValidationResponseV4 envelope discriminated by schema version:
- V1 (Legacy 32-byte zero-mask): Non-zero stats are proven via
multiproofHashesandleafIndices, while zero-valued stats include per-leaf R2statProofnodes. - V2 (Unified 512-byte zero-mask): Non-zero stats are proven via
multiproofHashesandleafIndices, while each leaf carries anisZeroflag and the payload includes a top-levelrawMask(Somewhen any requested stat is zero, orNonewhen all requested stats are non-zero).
Request Format
The endpoint requires a comma-separated list of 1 to 5 stat keys in the statKeys parameter and returns the matching polymorphic proof payload along with the backend Ed25519 signature over the Borsh-serialized payload hash.
On-Chain Execution
With the returned data, the user initializes a reusable worker ticket via validate_fixture_for_tree and executes validate_stat_v4 (alongside the Ed25519 signature verification instruction) to evaluate an N-dimensional strategy against the verified statistics.
curl --request GET \
--url https://txline.txodds.com/api/scores/stat-validation-v4 \
--header 'Authorization: Bearer <token>' \
--header 'X-Api-Token: <api-key>'import requests
url = "https://txline.txodds.com/api/scores/stat-validation-v4"
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/scores/stat-validation-v4', 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/scores/stat-validation-v4",
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/scores/stat-validation-v4"
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/scores/stat-validation-v4")
.header("Authorization", "Bearer <token>")
.header("X-Api-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://txline.txodds.com/api/scores/stat-validation-v4")
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{
"payload": {
"ts": 123,
"summary": {
"FixtureId": 123,
"UpdateStats": {
"UpdateCount": 123,
"MinTimestamp": 123,
"MaxTimestamp": 123
},
"EventStatsSubTreeRoot": "<string>"
},
"fixtureProof": {},
"mainTreeProof": {},
"eventStatRoot": "<string>",
"multiproofHashes": {},
"leaves": [
{
"stat": {
"Key": 123,
"Value": 123,
"Period": 123
},
"statProof": {}
}
],
"leafIndices": [
123
]
},
"signature": "<string>",
"version": "v1"
}<string><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.
Query Parameters
The ID of the fixture for the scores event.
The sequence number of the specific scores event within the fixture's history.
Comma-separated list of 1 to 5 stat keys for multiproof validation.
Was this page helpful?