Calculate
Calculates the probability and odds for the selected CustomBet outcomes.
Defines the media type of the request body. Must be application/xml.
application/xmlPossible values: Probability and odds successfully calculated.
Invalid XML request.
Unauthorized. Token is missing or invalid.
Forbidden. Access is not allowed.
CustomBet API unavailable or betting is not allowed.
Too many requests. Rate limit exceeded.
Internal Server Error. Retry the request or contact Sportradar support.
POST /v1/custombet/calculate HTTP/1.1
Host: global.stgapi.betradar.com
Content-Type: application/xml
Accept: */*
Content-Length: 384
"<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<selections xmlns="http://schemas.sportradar.com/custombet/v1/endpoints">
<selection id="sr:match:53452525" market_id="1" outcome_id="1" specifiers="" odds="1.56"/>
<selection id="sr:match:53452525" market_id="8" outcome_id="8" specifiers="goalnr=1" odds="3.029157596030749"/>
</selections>"<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<selections xmlns="http://schemas.sportradar.com/custombet/v1/endpoints">
<selection id="sr:match:53452525" market_id="1" outcome_id="1" specifiers="" odds="1.56"/>
<selection id="sr:match:53452525" market_id="8" outcome_id="8" specifiers="goalnr=1" odds="3.029157596030749"/>
</selections>Request Parameters
filterselections
Root element
xmlns
XML namespace.
Always http://schemas.sportradar.com/custombet/v1/endpoints
selection
Element containing all the information about a certain selection of markets and outcomes.
id
This id represents a unique match.
sr:match:123456
market_id
The unique id for a specific market.
Integer value: • 18 • 26 • 551
specifiers (optional)
Specifiers are a way to uniquely identify a market with additional parameters together with the market id.
Example:
In a total market, the specifier could be seen as specifiers="total=1.5", and the different outcomes as "under 1.5" or "over 1.5".
outcome_id
The identifier of a unique outcome within a specific market.
Integer or string value, depending on a market:
• 12
• 70
• sr:goal_range:7+-1343
• sr:player:123456
odds
The odds price (odds with key) that you want to use for this selection. If provided, this odds will be used to calculate the Custom Bet odds. You can use any odds sources. Check this page for more #.
1.32
Response
calculation_response
Root element
xmlns
XML namespace.
generated_at
Date and time of generated response in ISO 8601 format.
2019-05-06T12:34:49+00:00
calculation
Element for calculation requests.
odds
Total calculated odds for the selected custom bet, returned in EU odds format.
Number value: • 1.34 • 2.23 • 0.22
probability
The probability of this outcome returned in decimal.
Number value < 1: • 0.34 • 0.22 • 0.12
harmonization
The result of using the harmonization calculation approach.
True/False
available_selections
This child element is identical to the available selection endpoint’s response.
-
-
-
Multi-match Request Example
Multi-match combos allow users to make combinations across up to 5 different matches, all whilst taking into account the correlation of selections in the same match. You can use this for ACCA bets.
If the sport is not supported, you want to combine more matches, or you want to combine multi-sports, you are welcome to create your own accumulators on your end by making separate Custom Bet requests per match and then multiplying the odds together.
Last updated
Was this helpful?