IntroductionCustomBet 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). Note |
---|
Info XSD files for CustomBet can be found HERE. The market overview for CustomBet and Unified Odds Feed can be found HERE. |
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 overviewPlease 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 environmentsCustomBet 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 limitingThe current rate limit for using the CustomBet is set to: - Production environment: 100 requests per second
- Other environments: 20 requests per second
CustomBet ladderThe 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 validationThere are some rules applied to selections which need to be considered. Restriction | Details |
---|
Only legal market combinations | - team to score ({!goalnr} goal) market cannot be combined with 1st or 2nd half version of the same market
- any of the above cannot be combined with player goalscorer markets
- cannot select multiple player goalscorer markets
| Amount of selections | | Only 1 match | - do not allow creating a bet with multiple matches combined
|
Live documentationThe 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 loosing losing selection means the whole custom bet is loosinglosing
- For voided markets, we recommend similar approach to loosing 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 & endpointsThis section contains information about the different endpoints in the API, and what values to expect from each endpoint. Note |
---|
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 | /custombet/calculate
| Calculate probability (odds) for your selected outcomes. This is the same list as the one from available_selections, excluding the already picked markets. | GET | /custombet/:eventURN:/available_selections
| 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: - Contradiction in selected markets
- Selecting an unavailable market
- Creating a combination on markets that is not allowed
- Malformed request body, etc.
| 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. Expand |
---|
| Excerpt Include |
---|
| BetradarSupport |
---|
| BetradarSupport |
---|
nopanel | true |
---|
|
|
| 503 | Service unavailable | Returned when the underlying odds producers are temporarily down. Retry again soon. |
Note |
---|
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. |
Anchor |
---|
| anchor_AvailableSelectionsEndpoint |
---|
| anchor_AvailableSelectionsEndpoint |
---|
|
Available selections endpointElement | Element Description | Attribute(s) | Attribute Description | Possible values |
---|
available_selections | 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 | 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 specifiers="total=1.5" , and the different outcomes would be “under 1.5” or “over 1.5”. | 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: - 12
- 70
- sr:goal_range:7+:1343
- sr:player:123456
|
Available selection XML response example: Code Block |
---|
| <?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 endpointThis endpoint returns the list of available selections. Element | Description | Attribute | Description | Possible values |
---|
selections | Root element | xmlns | XML namespace. | Always http://schemas.sportradar.com/custombet/v1/endpoints | 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 specifiers="total=1.5" , and the different outcomes would be “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
|
XML example of making a selection request: Code Block |
---|
| <?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 responseElement | Element Description | Attribute(s) | Attribute Description | Possible values |
---|
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: | 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 THIStable found above. | - | - | - |
Calculated response XML example: Code Block |
---|
| <?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: Code Block |
---|
| <?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> |
|