Custom Bet has one recommended integration path and two deprecated legacy paths. All paths share the same widget UI and theming; they differ in how offering and calculation data reach the widget.
New integrations: use Stock Provider (dataProvider: 'stock').
Existing integrations only: UOF Proxy (dataProvider: 'uofProxy') and Data Adapter (dataProvider: 'custom') remain documented for maintenance and migration.
The stock provider loads offering and calculation from Sportradar and applies match and market translations like other widgets. You supply a jwt and implement addToBetSlip only — no UOF proxy callbacks.
Smaller surface area: No getAvailableMarkets, calculate, or other UOF forwarding functions in your page.
Requirements: Custom bet must be enabled for your bookmaker; a backend-issued jwt with your public key published for JWT validation — see JWT authentication.
For setup, examples, and troubleshooting, see the Stock Provider documentation.
Deprecated. dataProvider: 'uofProxy' forwards Unified Odds Feed (UOF) custom bet API responses from your proxy without modification. It remains documented for existing integrations only. To move to stock, see Migrating from UOF Proxy to Stock.
Simplicity: Responses from the UOF are passed through without modification; the widget handles XML validation and parsing.
Optimization: The widget manages caching and request volume toward your proxy.
Considerations: Market offering follows UOF custom bet rules, and you may need a proxy server on your side to serve front-end requests.
For legacy setup details, see the UOF Proxy documentation.
Deprecated. dataProvider: 'custom' lets you supply offering and calculation through getOffering and calculate callbacks with full control over data shape and custom views. It remains documented for existing integrations only.
Flexibility: You control how data is fetched, transformed, and presented, including custom market layouts via the Custom Views tutorials.
Responsibility: You must return data that conforms to the Data Adapter schemas documented on the Data Adapter page.
Not for new work: New Custom Bet integrations should use Stock Provider instead of building or extending a Data Adapter integration.
For legacy API types and examples, see Data Adapter. For custom view layouts on existing Data Adapter integrations, see Creating Custom Views.
Object to be passed into addToBetSlip
| Name | Type | Required | Description |
|---|---|---|---|
succeeded | boolean | Yes | True if outcomes were successfully validated and added to bet slip. |
reason | string | No | Reason for failed action, if present it will be displayed in the widget. |
Error object used to display the correct error state in the widget.
| Name | Type | Description |
|---|---|---|
type | number | Error type: • 1 - General: Blocks all actions except removing outcomes from bet slip in custom bet widget.• 2 - BetStop: Blocks all actions in custom bet widget.• 3 - Calculation: Blocks adding outcomes to bet slip |
message | string | Text that will be displayed for error, localization required. |
callback({ type: 1, message: "Something went wrong" });Arguments passed to the calculate function.
| Name | Type | Description |
|---|---|---|
matchId | string | Sportradar match ID. See Getting Identifiers |
selectedOutcomes | UniqueOutcome[] | Array of all the selected outcomes in the widget. |
| Name | Type | Description |
|---|---|---|
matchId | string | Sportradar match ID. See Getting Identifiers |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Sportradar market ID. |
specifiers | string | No | For markets that have same id but different specficer. |
| Name | Type | Required | Description |
|---|---|---|---|
isActive | boolean | Yes |
{
isActive: false;
}| Name | Type | Description |
|---|---|---|
teamId | string |
Represents a single selected outcome in the widget.
Example:
{
matchId: "22223333",
marketId: "oneXtwo",
outcomeId: "x",
srMarket: { id: "1" },
srOutcome: "1"
}This function is called when the user clicks "Add to bet slip" button. Here you receive selected outcomes and validate them before adding them to your bet slip or reject them.
For the shared selection flow — snapshot odds in displayedOdds, re-pricing, validation at add and at placement, and returning localized rejection reasons — see Handling Selections and Odds.
Upon succesfull validation your call callback parameter and pass in AddToBetSlipHandleResult object.
function betslipCallback(args, callback) {
if (validation(args) is succesfull) {
callback({
succeeded: true
})
} else {
callback({
succeeded: false,
reason: 'Reason why it failed'
})
}
}| Property | Type | Required | Description |
|---|---|---|---|
matchId | string | Yes | Sportradar match ID. See Getting Identifiers |
marketId | number | string | Yes | Market identifier |
outcomeId | number | string | Yes | Outcome identifier |
srMarket | SRMarket | No | Sportradar market reference |
srOutcome | string | No | Sportradar outcome identifier |
| Method | Parameters | Returns | Description |
|---|---|---|---|
equals | UniqueOutcome | boolean | Returns true if the outcome is equal to the given UniqueOutcome. |
isSameMarket | UniqueOutcome | boolean | Returns true if the outcome belongs to the same market as the given UniqueOutcome |
getSelection | — | string | Returns XML string representation of the outcome as needed by UOF calculation endpoint |
toString | — | string | Returns string representation of the outcome |
| Name | Type | Required | Description |
|---|---|---|---|
args | Object | Yes | Object with data. |
args.matchId | string | Yes | Match id of match that outcomes belong to. |
args.selectedOutcomes | UniqueOutcome[] | Yes | Array of outcomes that were selected in the widget. |
args.displayedOdds | string | No | Snapshot of odds returned by last calculation, CAUTION: ODDS ARE NOT UP TO DATE |
callback | AddToBetSlipHandleResult | boolean | Yes | To accept or reject call this function. If data is not received in time set by addToBetslipTimeoutMs widget prop or by defalt in 10000ms. |