---
title: "API Reference"
canonical_url: "https://docs.sportradar.com/resources/widgets/docs/custom-bet/api"
markdown_url: "https://docs.sportradar.com/resources/widgets/docs/custom-bet/api.md"
last_updated: "2026-10-22T13:00:29Z"
---

# API Reference

This page provides the API specification for the Custom Bet widget: [Stock Provider](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/stock.md) (recommended), and deprecated [UOF Proxy](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md) and [Data Adapter](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/data-adapter.md) integrations, plus examples.

## API Specification

### Core Parameters

| Property             | Type                                                                                                                                                                                         | Required                         | Default      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `matchId`            | `string` \| `number`                                                                                                                                                                         | **Yes**                          | -            | Sportradar match identifier for the event. See [Getting Identifiers](https://docs.sportradar.com/resources/widgets/docs/tutorials/getting-identifiers.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `dataProviderConfig` | [`StockDataProviderConfig`](#stock-data-provider) \| [`UOFDataProviderConfig`](#uof-proxy-data-provider-deprecated) \| [`DataAdapterProviderConfig`](#data-adapter-data-provider-deprecated) | **Yes**                          | -            | Configuration object for the data provider. See [Data Provider Configuration](#data-provider-configuration)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `dataProvider`       | `'stock'` \| `'uofProxy'` \| `'custom'`                                                                                                                                                      | No                               | `'uofProxy'` | Data source for offering and calculation. <ul><li>`'stock'`: Widget loads offering and calculation from Sportradar ([Stock Provider](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/stock.md)) — **use for new integrations**</li><li>`'uofProxy'`: **Deprecated.** Forward UOF custom bet APIs from your proxy ([UOF Proxy](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md))</li><li>`'custom'`: **Deprecated.** Client-supplied offering and calculation ([Data Adapter](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/data-adapter.md))</li></ul> |
| `jwt`                | `string`                                                                                                                                                                                     | When `dataProvider` is `'stock'` | -            | RS256 JWT for the logged-in user. Required for `dataProvider: 'stock'`. Sign on your backend — see [JWT authentication](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/jwt.md).                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `sportId`            | `string` \| `number`                                                                                                                                                                         | No                               | -            | [Sport ID](https://docs.sportradar.com/resources/widgets/docs/tutorials/references/sports.md). If not provided we will call match info feed to get sport id.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

### Display Configuration

| Property               | Type                   | Required | Default         | Description                                                                                                                                                                 |
| ---------------------- | ---------------------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `isInline`             | `boolean`              | No       | `false`         | Display mode for the widget. <ul><li>`false`: Renders as button that opens overlay modal</li><li>`true`: Renders inline without button or overlay</li></ul>                 |
| `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`. |

### Market Configuration

| 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](https://docs.sportradar.com/resources/widgets/docs/custom-bet/market-names.md).                                                      |
| `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:total=5.5"]. See [available market names](https://docs.sportradar.com/resources/widgets/docs/custom-bet/market-names.md). |
| `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](https://docs.sportradar.com/resources/widgets/docs/custom-bet/market-names.md).                                                                                                                                                                                                                   |
| `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](https://docs.sportradar.com/resources/widgets/docs/custom-bet/market-names.md) and the [example](#market-order).                                                                                            |
| `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.                                                                                                                                                                                                                                                                                                                                               |

### Behavior Configuration

| 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[]`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/overview.md#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                                             |

### Theming Configuration

| 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](https://docs.sportradar.com/resources/widgets/docs/tutorials/theming-widgets.md) for implementation details |

### Development and Debug

| Property | Type      | Required | Default | Description                                                                          |
| -------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------ |
| `dbg`    | `boolean` | No       | `false` | Enable debug mode with verbose console logging. Use only in development environments |

## Data Provider Configuration

The `dataProviderConfig` object supplies callbacks for the selected `dataProvider`. See [Integration overview](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/overview.md). New integrations should use `dataProvider: 'stock'` ([Stock Provider](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/stock.md)).

### Stock Data Provider

When using `dataProvider: 'stock'`, the widget loads offering and calculation from Sportradar. Implement only bet slip handling:

| Property       | Type                                                                                                                 | Description                                                |
| -------------- | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| `addToBetSlip` | [`addToBetSlip`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/overview.md#addtobetslip) | Called when the user clicks **Add to bet slip**. Required. |

You must also pass a valid `jwt` prop. See [Stock Provider](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/stock.md) for prerequisites and examples.

### UOF Proxy Data Provider (Deprecated)

**Deprecated.** `dataProvider: 'uofProxy'` is not offered for new Custom Bet integrations. The UOF Proxy path 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`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md#getfixture)                   | Function called by custom bet widget to get UOF API data from [Fixture API](https://iodocs.betradar.com/#/Static%20sport%20event%20information/fixturesForEvent).  |
| `getMarkets`          | [`getMarkets`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md#getmarkets)                   | Function called by custom bet widget to get UOF API data from [Markets API](https://iodocs.betradar.com/#/Betting%20descriptions/markets).                         |
| `calculate`           | [`calculate`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md#calculate)                     | Function called by custom bet widget to get UOF API data from [Calculate API](https://iodocs.betradar.com/#/CustomBet%20API/calculateProbability).                 |
| `getAvailableMarkets` | [`getAvailableMarkets`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md#getavailablemarkets) | Function called by custom bet widget to get UOF API data from [Available Selections API](https://iodocs.betradar.com/#/CustomBet%20API/availableSelections).       |
| `getProfile`          | [`getProfile`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md#getprofile)                   | Function called by custom bet widget to get UOF API data from [Competitor Profile API](https://iodocs.betradar.com/#/Entity%20descriptions/competitorInformation). |
| `addToBetSlip`        | [`addToBetSlip`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/overview.md#addtobetslip)                | This function is called when the user clicks "Add to bet slip" button.                                                                                             |

See [UOF Proxy](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/uof-proxy.md) for prerequisites and examples.

### Data Adapter Data Provider (Deprecated)

**Deprecated.** `dataProvider: 'custom'` is not offered for new Custom Bet integrations. When using `dataProvider: 'custom'`, implement the following interface:

| Method         | Parameters                                                                                                             | Callback Signature    | Description                                                                                                                                                                          |
| -------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `getOffering`  | [`MatchArgs`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/overview.md#matchargs)         | `(err, data) => void` | Fetch complete offering including all markets and outcomes. Data must conform to the Custom Bet offering schema. The widget calls `getOffering` about every 30s to refresh offering. |
| `calculate`    | [`CalculateArgs`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/overview.md#calculateargs) | `(err, data) => void` | Calculate odds for the selected outcome combination. The widget calls `calculate` when the user changes selections.                                                                  |
| `addToBetSlip` | [`addToBetSlip`](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/overview.md#addtobetslip)   | `(result) => void`    | Called when the user clicks **Add to bet slip**.                                                                                                                                     |

See [Data Adapter](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/data-adapter.md) for schemas, examples, and [Creating Custom Views](https://docs.sportradar.com/resources/widgets/docs/custom-bet/integration/custom-views/overview.md) for layout options on existing integrations.

## Market Order

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](https://docs.sportradar.com/resources/widgets/docs/custom-bet/market-names.md) 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.

### Examples

```js
// 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']
}
```
