Get a signed quote for booking a fixture
curl --request GET \
--url https://txline.txodds.com/api/quotes/book-fixture \
--header 'Authorization: Bearer <token>' \
--header 'X-Api-Token: <api-key>'import requests
url = "https://txline.txodds.com/api/quotes/book-fixture"
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/quotes/book-fixture', 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/quotes/book-fixture",
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/quotes/book-fixture"
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/quotes/book-fixture")
.header("Authorization", "Bearer <token>")
.header("X-Api-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://txline.txodds.com/api/quotes/book-fixture")
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": {
"User": "<string>",
"FixtureId": 123,
"Price": 123,
"Ts": 123,
"Validity": 123
},
"Signature": "<string>"
}<string><string><string><string>Fixtures
Get a signed quote for booking a fixture
Returns a backend-signed quote to submit to the on-chain book_fixture instruction.
Booking creates a fixture_ticket for the (wallet, fixtureId) pair and transfers the quoted price, in TxL base units, from the wallet’s token account.
Once booked, validate_stat_v4 calls for that fixture are unlimited and cost no further TxL. Scores and odds data for the fixture also become accessible, whether or not the subscription bundle covers it.
To book:
- Call this endpoint with the
fixtureIdand the walletpubkey. - Compute the SHA-256 hash of the IDL-encoded
BookFixturePayloadbuilt from the returnedpayload. - Build an Ed25519 verify instruction from the backend admin key, using the returned
signatureover that hash, and place it immediately beforebook_fixturein the same transaction. - Submit the transaction before the quote’s
validitywindow expires.
Returns 404 Not Found if the fixture doesn’t exist or is not bookable.
Requires book-fixture permission. Use GET /api/fixtures-schedule to list bookable fixtures.
GET
/
api
/
quotes
/
book-fixture
Get a signed quote for booking a fixture
curl --request GET \
--url https://txline.txodds.com/api/quotes/book-fixture \
--header 'Authorization: Bearer <token>' \
--header 'X-Api-Token: <api-key>'import requests
url = "https://txline.txodds.com/api/quotes/book-fixture"
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/quotes/book-fixture', 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/quotes/book-fixture",
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/quotes/book-fixture"
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/quotes/book-fixture")
.header("Authorization", "Bearer <token>")
.header("X-Api-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://txline.txodds.com/api/quotes/book-fixture")
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": {
"User": "<string>",
"FixtureId": 123,
"Price": 123,
"Ts": 123,
"Validity": 123
},
"Signature": "<string>"
}<string><string><string><string>Authorizations
Headers
Query Parameters
Was this page helpful?