UOF proxy integration requires and expects responses from the unified odds feeds. So a working integration of the UOF is required. See UOF for more information.
The following UOF's are required to process over UOF infrastructure:

UOFDataProviderConfig parameter. Widget will then update accordingly upon receiving necessary data by callback parameters. Detailed flow of data can be seen in chart below.
<script>
(function (a, b, c, d, e, f, g, h, i) {
/* SIR function code */
})(
window,
document,
"script",
"https://widgets.sir.sportradar.com/betradar/widgetloader"
Collection of functions used for communication between the widget and client code. The widget calls these functions every 30 seconds to refresh data.
Callback function shared by all data provider functions. Pass UOF XML response as a string.
| Parameter | Type | Description |
|---|---|---|
error | CBError | string | undefined | Error object, or false on success |
data | string | Forwarded UOF XML data as string |
Example:
// Success
callback(false, xmlString);
// Error
callback({ type: 1, message: "Could not fetch data" });getFixtureFetches fixture data for a given match. It is given matchId and expects callback function UOFDataProviderCallback to be executed with UOF data.
| Parameter | Type | Description |
|---|---|---|
args | MatchArgs | Match identifier |
callback | UOFDataProviderCallback | Callback with UOF XML response |
function getFixture(args, callback) {
fetch(`${apiUrl}/v1/sports/${lang}/sport_events/${args.matchId}/fixture.xml`)
.then((res) => (res.ok ? res.text() : Promise.reject(res)))
getMarketsFetches all market descriptions. No arguments are required. Expects callback function UOFDataProviderCallback to be executed with UOF data.
| Parameter | Type | Description |
|---|---|---|
args | - | No arguments required |
callback | UOFDataProviderCallback | Callback with UOF XML response |
function getMarkets(args, callback) {
fetch(`${apiUrl}/v1/descriptions/${lang}/markets.xml?include_mappings=true`)
.then((res) => (res.ok ? res.text() : Promise.reject(res)))
.then((xml)
calculateCalculates probability (odds) for selected outcomes. It is given matchId and selectedOutcomes, and expects callback function UOFDataProviderCallback to be executed with UOF data. Sends selections as XML via POST.
| Parameter | Type | Description |
|---|---|---|
args | CalculateArgs | Match ID and array of selected outcome objects |
callback | UOFDataProviderCallback | Callback with UOF XML response |
function calculate(args, callback) {
var body = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<filterSelections xmlns="http://schemas.sportradar.com/custombet/v1/endpoints">
<selection id="${args.matchId}">
${args.selectedOutcomes.map((o) => o.getSelection())
Each UniqueOutcome object exposes helper methods — getSelection() builds the XML element for the UOF endpoint, equals() and isSameMarket() compare outcomes, and toString() returns a string representation. See UniqueOutcome Methods for details.
getAvailableMarketsFetches all available (and allowed) markets for a match. It is given matchId and expects callback function UOFDataProviderCallback to be executed with UOF data.
| Parameter | Type | Description |
|---|---|---|
args | MatchArgs | Match identifier |
callback | UOFDataProviderCallback | Callback with UOF XML response |
function getAvailableMarkets(args, callback) {
fetch(`${apiUrl}/v1/custombet/${args.matchId}/available_selections`)
.then((res) => (res.ok ? res.text() : Promise.reject(res)))
.then(
getProfileFetches competitor (team/player) profile data. It is given teamId and expects callback function UOFDataProviderCallback to be executed with UOF data.
| Parameter | Type | Description |
|---|---|---|
args | TeamArgs | Competitor identifier |
callback | UOFDataProviderCallback | Callback with UOF XML response |
function getProfile(args, callback) {
fetch(`${apiUrl}/v1/sports/${lang}/competitors/${args.teamId}/profile.xml`)
.then((res) => (res.ok ? res.text() : Promise.reject(res)))
| Property | Type | Description |
|---|---|---|
getFixture | getFixture | Fetches fixture data from Fixture API |
getMarkets | getMarkets | Fetches market descriptions from Markets API |
calculate | calculate | Calculates odds from Calculate API |
getAvailableMarkets | getAvailableMarkets | Fetches available selections from Available Selections API |
getProfile | getProfile | Fetches competitor profile from Competitor Profile API |
addToBetSlip | addToBetSlip | Called when the user clicks "Add to bet slip" button |