Betradar - the betting arm of Sportradar

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt Include
HideElements
HideElements
nopaneltrue
Anchor
topOfPage
topOfPage

Excerpt Include
BetradarLogo
BetradarLogo
nopaneltrue

Panel

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).

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

Table of Contents
minLevel2

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.

RestrictionDetails
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
  • limited to 10 selections
Only 1 match
  • do not allow creating a bet with multiple matches combined

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 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 & endpoints

This 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.

400Bad request

Possible reasons:

  • Contradiction in selected markets
  • Selecting an unavailable market
  • Creating a combination on markets that is not allowed
  • Malformed request body, etc.
401UnauthorizedToken is missing or invalid

403

Forbidden

Access to CustomBet not allowed

429Too many requestsRate limit was reached
500Internal server error

Unexpected error. Feel free to contact our support if you see this error.

Expand
titleContact support...

Excerpt Include
BetradarSupport
BetradarSupport
nopaneltrue

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 endpoint

Element

Element Description

Attribute(s)

Attribute Description

Possible values

available_selections

Root element.

xmlns

XML namespace.

Always http://schemas.sportradar.com/custombet/v1/endpoints

generated_atDate and time of generated response in ISO 8601 format2019-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:

  • 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 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
languagexml
<?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.

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:

  • 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 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
languagexml
<?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.

Always http://schemas.sportradar.com/custombet/v1/endpoints

generated_atDate and time of generated response in ISO 8601 format2019-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

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
languagexml
<?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
languagexml
<?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>