This page provides complete API specification for the Custom Bet widget, including two main types of integration methods, and integration examples.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
matchId | string | number | Yes | - | Sportradar match identifier for the event. See Getting Identifiers |
dataProviderConfig | UOFDataProviderConfig | DataAdapterProviderConfig | Yes | - | Configuration object for the data provider. See Data Provider Configuration |
dataProvider | 'uofProxy' | 'custom' | No | 'uofProxy' | Selection of the type of data provider you are going to use. Options:
|
sportId | string | number | No | - | Sport ID. If not provided we will call match info feed to get sport id. |
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
isInline | boolean | No | false | Display mode for the widget.
|
buttonTitle | string | No | 'Custom Bet' | Text displayed on the button in overlay mode. Ignored when isInline is true |
buttonIcon | string | No | - | URL of icon image to display next to button text. Ignored when isInline is true |
productTitle | string | No | 'Custom Bet' | Title displayed in widget header. Customizes the branding of the bet builder |
overlayWidth | number | No | 720 | Width of overlay modal in pixels when isInline is false. |
overlayParent | string | function | No | document.body | Parent container for overlay modal. Can be CSS selector string or function returning HTMLElement. Useful for containing overlay within specific page sections |
isDialogInFullScreen | boolean | No | false | CustomBet widget overlay takes up full viewport width and height. Enable full-screen mode for overlay on mobile devices. Only to be used when isInline is set to false. |
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
validMarketIds | string[] | No | - | Whitelist of allowed market IDs. When set, only these markets appear in the widget. Array of Sportradar market identifiers. Mutually exclusive with blockedMarketIds. Must be used on widget initialization, changed dynamically will reset the state of the widget. See available market names. |
blockedMarketIds | string[] | No | - | Blacklist of excluded market IDs and markets with specifiers. These markets will not appear in the widget. Array of Sportradar market identifiers. Mutually exclusive with validMarketIds Must be used on widget initialization, changed dynamically will reset the state of the widget. Example: ["30", "18=5.5"]. See available market names. |
mainMarkets | string[] | No | - | Array of market IDs to feature in the main category. If not specified, the default markets will be used. YSee available market names. |
categoryFeaturedItems | Record<categoryId, marketId[]> | No | - | Custom configuration for featured items in each category (excluding the main category). It's an object where the category ID is the key and an array of market IDs is the value. See available categories and market names and the example. |
showExpandOnItems | number | No | 3 | Number of outcomes that is shown in the bet builder before collapsing into 1 item. This is shown only on Mobile size (width < 670px) |
minNumberOfSelections | number | No | 1 | Minimum number of outcome selections in the bet builder required before bet can be placed. |
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
useSessionStorage | boolean | No | false | Persist user selections in browser session storage. When true, selections are restored if user navigates away and returns during the same session |
selectedOutcomes | UniqueOutcome[] | No | - | Array of pre-selected outcomes to load on widget initialization. |
addToBetslipTimeoutMs | number | No | 10000 | Timeout in milliseconds for add-to-betslip operation. The widget will wait for the onAddToBetslip callback response for addToBetslipTimeoutMs time before displaying a timeout/error. |
hideBetAssist | boolean | No | false | Hide Bet Assist feature. When true, removes bet assist feature from the interface. |
disableCache | boolean | No | false | Disable internal caching of market data. When true, forces fresh data fetch on every request. Use only for debugging; impacts performance |
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
useClientTheming | boolean | No | false | Enable integration with client CSS theming system. When true, widget inherits CSS custom properties from page. See Theming Guide for implementation details |
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
dbg | boolean | No | false | Enable debug mode with verbose console logging. Use only in development environments |
The dataProviderConfig object implements the Custom Bet interface. We offer two main types of integration methods, each with distinct advantages depending on the level of control and customization you need.
The UOF Proxy integration enables direct data handling from the Unified Odds Feed (UOF), forwarding responses directly without modification. When using dataProvider: 'uofProxy', implement the following interface:
| Property | Type | Description |
|---|---|---|
getFixture | getFixture | Function called by custom bet widget to get UOF API data from Fixture API. |
getMarkets | getMarkets | Function called by custom bet widget to get UOF API data from Markets API. |
calculate | calculate | Function called by custom bet widget to get UOF API data from Calculate API. |
getAvailableMarkets | getAvailableMarkets | Function called by custom bet widget to get UOF API data from Available Selections API. |
getProfile | getProfile | Function called by custom bet widget to get UOF API data from Competitor Profile API. |
addToBetSlip | addToBetSlip | This function is called when the user clicks "Add to bet slip" button. |
The Data Adapter approach allows for a fully customized integration, giving you complete control over how data is fetched, transformed, and displayed. When using dataProvider: 'custom', implement the following interface:
| Method | Parameters | Callback Signature | Description |
|---|---|---|---|
getOffering | MatchArgs | (err, data) => void | Fetch complete offering including all markets and outcomes. Data must conform to Custom Bet offering schema. Widget will call getOffering function every 30s to update the offering. |
calculate | CalculateArgs | (err, data) => void | Calculate odds for selected outcome combination. Widget will call calculate function whenever selection within widget is updated. |
addToBetSlip | addToBetSlip | (result) => void | This function is called when the user clicks "Add to bet slip" button. |
The Custom Bet widget comes with a default market order for each sport.
You can adjust which markets appear in the main category and their order, as well as promote featured items in other categories by pinning them to the top.
See available markets for a complete list.
When adding the widget to a page, two optional props are available for customization:
mainMarkets: An array of market IDs to display in the main category.categoryFeaturedItems: An object mapping category IDs to arrays of market IDs that should appear first in their respective categories.// Display specific markets in the 'main' category.
mainMarkets: ['30', 'awayTotalCorners', '47']
// Pin specific markets to the top of the 'match' and 'teams' categories.
categoryFeaturedItems: {
match: ['46', 'cornerRange', 'oneXtwo'],
teams: ['homeTotalCorners', '30']
}