Calculate-filter
Used this endpoint to get the odds and fair probabilities of the Custom Bet, and determine which Custom Bet combinations are viable.
Market and outcome elements will contain an extra "conflict" attribute, which will indicate whether specific markets and outcomes conflict with the current selections or not. The endpoint will return a response that contains the new "conflict" attribute in all the available selections for the selected markets.
Best Practice:
Conflict Handling: Use the "conflict" attribute to filter out or visually distinguish conflicting selections in the UI. This helps prevent users from creating invalid bet combinations.
Selected Items: Any selections already made will be marked as conflict=false. These should remain interactive in the UI. If a user clicks on a selection that is already chosen and marked as conflict=false, treat this as a deselection action, not a new selection.
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.
Always http://schemas.sportradar.com/custombet/v1/endpoints
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. Note: This is affected by the chosen ladder.
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.
conflict
Indicates whether the selection conflicts with the currently selected combo.
True/False
Calculate probability and odds for your selected outcomes and filter out conflicting outcomes.
Note: Try it out is disabled for this endpoint in Swagger UI.
Defines the media type of the request body. Must be application/xml.
application/xmlPossible values: Successful calculation with filtered conflicting outcomes
Invalid XML request.
Unauthorized. Token is missing or invalid.
Forbidden. Access to Custom Bet not allowed.
Custom Bet API unavailable or betting not allowed.
Too many requests. Rate limit reached.
Internal Server Error. Retry or contact support.
Last updated
Was this helpful?