Best Practices to when using the api
Get product endpoint
- When calling the get products endpoint check the status of the product and the status of the selection to ensure they are available for betting. See example properties in the get product request below
{
selling {
status
}
legs {
nodes {
selections {
nodes {
status
}
}
}
}
}
- When calling the get product endpoint check the bet type rules, the minimums, maximums and increments for the product. See example properties in the get product request below
betType {
code
id
rules {
bet {
max {
decimalAmount
}
min {
decimalAmount
}
}
line {
increment {
decimalAmount
}
max {
decimalAmount
}
min {
decimalAmount
}
}
}
}
- Use the filters on the get product request to reduce the response to the products you are interested in.
products(
betTypes: [TRIFECTA],
venues: ["KEMPTON PARK"],
sellingStatus: CLOSED,
countryCodes: ["UK"]
date: "2024-10-14"
id: "6c586c32-c87f-4801-a939-72e2d8eb7d31") {
Place bet async endpoint
- After placing a bet on the async endpoint listen to the web socket for result of the bet placement. If the bet is rejected look at the bet rejection reason. If the rejection reason is
Error placing a bet with the bet provider retry the placement of the bet (make sure you change the customer bet id when replacing). See below an example request to get a rejection reason.
query GetBets {
bets(toteId: "8779011e10f4462988f6b9b5364e9a00") {
nodes {
placement {
rejectionReason
}
}
}
}