Betradar - the betting arm of Sportradar
Betradar - the betting arm of Sportradar
- Created by Espen Grinde, last modified on 04/Mar/20
Introduction
CustomBet is an extension for Unified Odds feed customers and provides two additional endpoints. These endpoints allow bettors to create custom tailored bets for a specific match. In CustomBet it is possible to combine a wide range of betting markets into one single odds and probabilities calculation, in much the same was as an accumulator (a single wager made up of multiple selections).
Table of contents
An example of a custom bet could include a combination of the following markets:
- Liverpool to win the match
- Liverpool to score most goals in the first half
- Liverpool to score most goals in the second half
- Liverpool to win corner 1x2
- Total over 2.5
This means that it is possible to combine markets that would previously have been blocked due to related contingencies.
It is important to note that Custombet only exposes API endpoints, the front-end will need to be provided by the customer.
CustomBet is currently only available for Soccer matches, and for pre-match only.
Market overview
Please note: CustomBet uses a limited number of selected markets provided in our Unified odds feed product for each supported sport.
To find a complete list of all available markets and mappings supported in CustomBet, see THIS section.
Availability and environments
CustomBet has a production and integrations environment just like the Unified Odds feed, but no replay server. For more information about API availability, access restrictions and functionality related to these, please see the Unified Odds feed integration documentation.
CustomBet is also supported by our SDK.
Rate limiting
The current rate limit for using the CustomBet is set to:
- Production environment: 100 requests per second
- Other environments: 20 requests per second
CustomBet ladder
The CustomBet ladder will be configurable through Betradar Ctrl (feed options > Custom Bet tab), and three are currently 3 options available.
- Moderate (110)
- Conservative (115)
- Aggressive (105)
Selection validation
There are some rules applied to selections which need to be considered.
Restriction | Details |
---|---|
Only legal market combinations |
|
Amount of selections |
|
Only 1 match |
|
Live documentation
The CustomBet endpoints along with the normal Unified Odds API can be found on our live documentation page HERE.
Settlement implementation guidelines
- Store the final accepted custom bet
- Listen to the feed for settlements of single markets
- A single losing selection means the whole custom bet is losing
- For voided markets, we recommend similar approach to losing markets
- Only in case when all the selections are winning, custom bet is winning as well
- The logic should be similar to handling combination bets on different events
API & endpoints
This section contains information about the different endpoints in the API, and what values to expect from each endpoint.
NOTE: All bet settlements/clearings in CustomBet comes via the Unified Odds Feed, and not directly from the API itself. For more information about the Unified Odds Feed, feel free to consult the integration documentation.
HTTP | Endpoint-path from https://api.betradar.com/v1/ | Description |
---|---|---|
POST |
| Calculate probability (odds) for your selected outcomes. This is the same list as the one from available_selections, excluding the already picked markets. |
GET |
| Returns all available (and allowed) markets for a sport event. |
Response codes
Code | Name | Description |
---|---|---|
200 | Ok | When everything is ok and we return data directly in the http body. |
400 | Bad request | Possible reasons:
|
401 | Unauthorized | Token is missing or invalid |
403 | Forbidden | Access to CustomBet not allowed |
429 | Too many requests | Rate limit was reached |
500 | Internal server error | Unexpected error. Feel free to contact our support if you see this error. Contact support...
Betradar support If you need information outside of what is provided in this document, or something is unclear, please feel free to contact our support team. EMAIL: [email protected] PHONE: +41 71 517 72 00
|
503 | Service unavailable | Returned when the underlying odds producers are temporarily down. Retry again soon. |
Note
Response body should only be parsed in case the server returns 200 (or 400 for specifics about invalid combinations). For any other cases the response body should only serve as a hint during development, as it might be removed later on.
Available selections endpoint
Element | Element Description | Attribute(s) | Attribute Description | Possible values |
---|---|---|---|---|
available_selections | Root element. | xmlns | XML namespace. | |
generated_at | Date and time of generated response in ISO 8601 format | 2019-05-06T12:34:49+00:00 | ||
event Sub-element of <available_selections> | Element containing event-specific attributes | id | This id represents a unique match | sr:match:12345 |
markets Sub-element of <event> | Element containing all markets for a specific event | - | - | - |
market Sub-element of <markets> | Element containing all outcomes for a market. | id | The unique id for a specific market. | Integer value:
|
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 | ||
outcome Sub-element of <market> | Element containing a unique outcome id for a market | id | The identifier of a unique outcome within a specific market. | Integer or string value, depending on a market:
|
Available selection XML response example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <available_selections xmlns="http://schemas.sportradar.com/custombet/v1/endpoints" generated_at="2019-05-06T12:34:49+00:00"> <event id="sr:match:14736961"> <markets> <market id="14" specifiers="hcp=1:0"> <outcome id="1711"/> <outcome id="1712"/> <outcome id="1713"/> </market> <market id="26"> <outcome id="70"/> <outcome id="72"/> </market> <markets> <market id="65" specifiers="hcp=0:1"> <outcome id="1711"/> <outcome id="1712"/> <outcome id="1713"/> </market> <market id="90" specifiers="total=0.5"> <outcome id="12"/> <outcome id="13"/> </market> <market id="91" specifiers="total=1.5"> <outcome id="12"/> <outcome id="13"/> </market> <market id="25" specifiers="variant=sr:goal_range:7+"> <outcome id="sr:goal_range:7+:1344"/> <outcome id="sr:goal_range:7+:1345"/> <outcome id="sr:goal_range:7+:1342"/> <outcome id="sr:goal_range:7+:1343"/> </market> </markets> </event> </available_selections>
Calculation endpoint
This endpoint returns the list of available selections.
Element | Description | Attribute | Description | Possible values |
---|---|---|---|---|
selections | Root element | xmlns | XML namespace. | |
selection Sub-element of <selections> | 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:
| ||
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 | ||
outcome_id | The identifier of a unique outcome within a specific market. | Integer or string value, depending on a market:
|
XML example of making a selection request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <selections xmlns="http://schemas.sportradar.com/custombet/v1/endpoints" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.sportradar.com/custombet/v1/endpoints http://schemas.sportradar.com/custombet/v1/endpoints/Selections.xsd"> <selection id="sr:match:14736961" market_id="14" specifiers="hcp=1:0" outcome_id="1711"/> <selection id="sr:match:14736961" market_id="26" outcome_id="70"/> </selections>
Calculation response
Element | Element Description | Attribute(s) | Attribute Description | Possible values |
---|---|---|---|---|
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. Note: This is affected by the chosen ladder. | Number value:
|
probability | The probability of this outcome returned in decimal | Number value <1:
| ||
available_selections | This child element is identical to the element with the same name described in THIS table found above. | - | - | - |
Calculated response XML example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <calculation_response xmlns="http://schemas.sportradar.com/custombet/v1/endpoints" generated_at="2019-05-06T12:34:49+00:00"> <calculation odds="2.0260542763219798" probability="0.444190623492253"/> <available_selections> <event id="sr:match:14736961"> <markets> <market id="65" specifiers="hcp=0:1"> <outcome id="1711"/> <outcome id="1712"/> <outcome id="1713"/> </market> <market id="90" specifiers="total=0.5"> <outcome id="12"/> <outcome id="13"/> </market> <market id="91" specifiers="total=1.5"> <outcome id="12"/> <outcome id="13"/> </market> <market id="25" specifiers="variant=sr:goal_range:7+"> <outcome id="sr:goal_range:7+:1344"/> <outcome id="sr:goal_range:7+:1345"/> <outcome id="sr:goal_range:7+:1342"/> <outcome id="sr:goal_range:7+:1343"/> </market> </markets> </event> </available_selections> </calculation_response>
Invalid response XML example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://schemas.sportradar.com/custombet/v1/endpoints" response_code="BAD_REQUEST" generated_at="2019-05-06T12:34:49+00:00"> <message>This combination is not possible, contradictory selections</message> </response>
Betradar - the betting arm of Sportradar