Skip to main content
Logo
Explore APIsContact Us
  • Home
  • Match Preview
  • Tournament Preview
  • Virtual Stadium
  1. Resources
  2. Widgets
  3. Adapter API Reference

Adapter API Reference

#Adapter Object

PropertyTypeRequiredDescription
configConfigObjectAdapter configuration settings
endpointsEndpointsObjectyesAdapter endpoint implementations

#Config Object

The config object controls adapter behavior and widget-specific configurations.

PropertyTypeRequiredDescription
widgetWidgetConfigWidget-specific configurations

#WidgetConfig

PropertyTypeRequiredDescription
'betRecommendation.eventList'BrEventListConfigConfiguration for bet recommendation event list widget

#Endpoints Object

The endpoints object contains all adapter endpoint implementations.

tip

The market and eventMarkets endpoints are mutually exclusive – you only need to implement ONE of these two. Choose based on your API capabilities:

  • Implement market if your API can fetch a specific market for an event efficiently
  • Implement eventMarkets if your API can fetch all markets for an event in a single call
  • If implementing market, you can optionally add availableMarketsForEvent to list available markets first

Shared Endpoints Across Widgets: All widgets use the same adapter endpoints. When a specific widget needs to limit returned data, the request args will include a widget property containing the widget name (the same value used in SIR('addWidget', widgetName, ...)). Use this to conditionally filter or modify your response per widget if needed.

PropertyTypeDescription
availableMarketsForEventAvailableMarketsForEventRetrieves all available markets selections for a specific event. Use with market endpoint to discover available markets.
marketMarketImplement either this OR eventMarkets – Retrieves a specific market data for a specific event.
eventMarketsEventMarketsImplement either this OR market – Retrieves all markets data for a specific event in one call. Use if your API provides all markets on one endpoint.
eventEventRetrieves detailed event data including event start time, scores, team names, tournament name, and more.
filterMarketsFilterMarketsFilters available markets based on widget requirements and provided selections, returning all or a subset.
betSlipSelectionBetSlipSelectionSubscribes to the current punter's bet slip selections (their betting cart)
cashBackSelectionsCashBackSelectionsRetrieves selections eligible for cash back promotions.
ticketsTicketsRetrieves the punter's placed bets (tickets)
matchEventSuggestedSelectionMatchEventSuggestedSelectionRetrieves suggested selections for a specific match event (incident).
recommendedSelectionsRecommendedSelectionsRetrieves recommended selections for a given event.
calculateCustomBetXMLCalculateCustomBetXMLCalculates custom bet XML for given markets and match.
javascript
// Example adapter implementation
const adapter = {
  config: {
    widget: {
      'betRecommendation.eventList': {
        layout: { /* EventListMarketsConfig */ },
        allowedMarkets: { /* SportMarketsMap */ }
      }
    }
  },
  endpoints: {
    event: (args, callback) => {
      // Fetch and return event data
      // Return optional unsubscribe function
    },
    eventMarkets: (args, callback) => {
      // Fetch and return markets for event
    },
    market: (args, callback) => {
      // Fetch and return specific market
    }
    // ... other endpoints
  }
};

#Widget Usage

EndpointWidgets
availableMarketsForEventbetRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge
marketbetRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge
eventMarketsbetRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge
eventbetRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge
filterMarketsbetRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets
betSlipSelectionbetRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge
cashBackSelectionsbetRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets
ticketsvirtualStadium
matchEventSuggestedSelectionvirtualStadium
recommendedSelectionsbetConcierge
calculateCustomBetXMLbetConcierge

#Adapter Endpoints

#Market Function

Retrieves data for a specific market of a specific event.

tip

The market and eventMarkets endpoints are mutually exclusive – you only need to implement ONE. If your API does not support fetching individual markets, consider using the eventMarkets endpoint instead.

warning

Names such as market names, outcome names, and other text content should be provided in the language specified by args.language to ensure proper localization for users.

The oddsType parameter specifies the current format of odds set for the widget. If you provide odds in a different format, consider updating the odds type in the widget loader configuration. See the Widget Loader documentation for details on configuring odds formats.

Used by: betRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge

ArgumentTypeRequiredDescription
argsMarketRequestyesRequest parameters including market/outcome selection, language, and odds type
callbackCallback<MarketResponse>yesFunction to receive market data or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.market = (args, callback) => {
  // args example:
  // {
  //   selection: { event: "sr:match:123", market: "18", specifiers: "total=2.5", type: 'uf' },
  //   language: "en",
  //   oddsType: "decimal"
  // }

  // Your implementation here - fetch specific market data based on args
  // Then call callback with the result
  callback(undefined, {
    market: {
    id: "1",
    name: "Match Winner (1X2)",
    outcomes: [
      { id: "1", name: "Home", status: "active", odds: { type: "decimal", value: "2.10" } },
      { id: "X", name: "Draw", status: "active", odds: { type: "decimal", value: "3.40" } },
      { id: "2", name: "Away", status: "active", odds: { type: "decimal", value: "3.50" } }
    ],
    status: "active"
  },
    event: { id: "sr:match:12345", type: "uf" }
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#EventMarkets Function

Retrieves data for all markets of a specific event.

tip

The eventMarkets and market endpoints are mutually exclusive – you only need to implement ONE. If your API does not support fetching all markets for requested event, consider using the market endpoint instead.

warning

Names such as market names, outcome names, and other text content should be provided in the language specified by args.language to ensure proper localization for users.

The oddsType parameter specifies the current format of odds set for the widget. If you provide odds in a different format, consider updating the odds type in the widget loader configuration. See the Widget Loader documentation for details on configuring odds formats.

Used by: betRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge

ArgumentTypeRequiredDescription
argsEventMarketsRequestyesRequest parameters including event selection, language, and odds type
callbackCallback<EventMarketsResponse>yesFunction to receive markets data or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.eventMarkets = (args, callback) => {
  // args example:
  // {
  //   selection: { event: "sr:match:12345", type: "uf" },
  //   language: "en",
  //   oddsType: "decimal"
  // }

  // Your implementation here - fetch markets data based on args
  // Then call callback with the result
  callback(undefined, {
    markets: [
       {
        id: "18",
        name: "Total Goals",
        specifiers: "total=2.5",
        outcomes: [
          { id: "12", name: "Over 2.5", status: "active", odds: { type: "decimal", value: "1.85" } },
          { id: "13", name: "Under 2.5", status: "active", odds: { type: "decimal", value: "2.05" } }
        ],
        status: "active"
      },
      // ... other of market objects ofr this event
    ],
    event: args.selection.id
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#Event Function

Retrieves detailed event data including event start time, scores, team names, tournament name, and more.

warning

Names such as team names, tournament names, and other text content should be provided in the language specified by args.language. Event times should be converted and displayed in the timezone specified by args.displayedTimezone to ensure proper localization for users.

Used by: betRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge

ArgumentTypeRequiredDescription
argsEventRequestyesRequest parameters including event selection and display preferences
callbackCallback<EventResponse>>yesFunction to receive event data or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.event = (args, callback) => {
  // args example:
  // {
  //   selection: { event: "sr:match:12345", type: "uf" },
  //   language: "en",
  //   displayedTimezone: "Europe:Berlin"
  // }

  // Your implementation here - fetch event data based on args
  // Then call callback with the result
  callback(undefined, {
    event: {
      id: args.selection.id,
      // ... other event properties
    }
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#AvailableMarketsForEvent Function

Retrieves all available market offering in Selection format for a requested event. Only called when implementing the market endpoint (not used with eventMarkets).

Used by: betRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge

ArgumentTypeRequiredDescription
argsAvailableMarketsForEventRequestyesRequest parameters including event selection
callbackCallback<AvailableMarketsForEventResponse>yesFunction to receive available markets or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.availableMarketsForEvent = (args, callback) => {
  // args example:
  // {
  //   selection: { event: "sr:match:12345", type: "uf" }
  // }

  // Your implementation here - fetch available markets for the event
  // Then call callback with the result
  callback(undefined, {
    selection: [
      { event: "sr:match:12345", market: "1", type: "uf" },
      { event: "sr:match:12345", market: "18", specifiers: "total=1.5" type: "uf" },
      { event: "sr:match:12345", market: "18", specifiers: "total=2.5" type: "uf" },
      // ... other market offering selections
    ]
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#FilterMarkets Function

This endpoint is called to perform additional filtering based on widget-specific requirements or other parameters. The widget property in the request arguments identifies which widget is requesting the filtering, allowing you to customize market filtering logic per widget. If no filtering is required, you can simply return the input selections unchanged. Example: For Swipe Bet you only want to use market 1x2 out of all available.

Used by: betRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets

The widget argument value passed by each widget:

  • betRecommendation.highlights and betRecommendation.similarBets → "betRecommendation"
  • betRecommendation.eventList → "betRecommendation.eventList"
  • betRecommendation.swipeBet → "betRecommendation.swipeBet"
ArgumentTypeRequiredDescription
argsFilterMarketsRequestyesRequest parameters including widget name and optional event selections
callbackCallback<FilterMarketsResponse>yesFunction to receive filtered markets or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.filterMarkets = (args, callback) => {
  // args example:
  // {
  //   widget: "swipeBet",
  //   selection: [
  //     { event: "sr:match:12345", type: "uf", market: "1" },
  //     { event: "sr:match:12345", type: "uf", market: "18", specifiers: "total=2.5" }
  //   ]
  // }

  // Your implementation here - filter markets based on widget and selections
  // Then call callback with the result
  // callback(undefined, {
  //   selection: [
  //     { market: "sr:match:12345", type: "uf", market: "1" },
  //     // ... filtered selections
  //   ]
  // });

  // Or just return the selection if you don't wish to filter
  callback(undefined, {
    selection: args.selection
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#BetSlipSelection Function

Subscribes to the current punter's bet slip selections (their betting cart). Widgets use this data to display selections as selected or, depending on the widget, may hide certain selections.

Used by: betRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets, betRecommendation.markets, betRecommendation.myCombo, betInsights, betConcierge

ArgumentTypeRequiredDescription
argsundefinedNo arguments
callbackCallback<BetSlipSelectionResponse>yesFunction to receive bet slip selections or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.betSlipSelection = (args, callback) => {
  // args is undefined for this endpoint

  // Your implementation here - subscribe to bet slip changes
  // Call callback whenever bet slip changes
  callback(undefined, {
    selection: [
      { event: "sr:match:12345", market: "1", outcome: "2", odds: { type: "decimal", value: "1.95" } },
      // ... current bet slip selections
    ]
  });

  // Return unsubscribe function to stop receiving updates
  return () => {
    // Cleanup bet slip subscription
  };
};

#CashBackSelections Function

Retrieves selections eligible for cash back promotions.

Used by: betRecommendation.highlights, betRecommendation.eventList, betRecommendation.swipeBet, betRecommendation.similarBets

ArgumentTypeRequiredDescription
argsCashBackSelectionsRequestyesRequest parameters including widget name and event selections
callbackCallback<CashBackSelectionsResponse>yesFunction to receive cash back selections or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.cashBackSelections = (args, callback) => {
  // args example:
  // {
  //   widget: "cashBack",
  //   selection: [
  //     { event: "sr:match:12345", type: "uf" },
  //     { event: "sr:match:67890", type: "uf" }
  //   ]
  // }

  // Your implementation here - fetch cash back eligible events
  // Then call callback with the result
  callback(undefined, {
    events: [
      { event: "sr:match:12345", type: "uf" },
      // ... events eligible for cash back
    ]
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#Tickets Function

Retrieves the punter's placed bets (tickets).

Used by: virtualStadium

ArgumentTypeRequiredDescription
argsTicketsRequestyesRequest parameters including operator ID, customer ID, and optional filters
callbackCallback<TicketsResponse>yesFunction to receive tickets or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.tickets = (args, callback) => {
  // args example:
  // {
  //   operatorId: "operator123",
  //   endCustomerId: "customer456",
  //   events: [
  //     { id: "sr:match:12345", type: "uf" }
  //   ],
  //   channelId: "web",
  //   page: 1
  // }

  // Your implementation here - fetch user tickets based on args
  // Then call callback with the result
  callback(undefined, {
    tickets: [
      // array of ticket objects
    ]
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#MatchEventSuggestedSelection Function

Retrieves suggested selections for a specific match event (incident).

Used by: virtualStadium

ArgumentTypeRequiredDescription
argsMatchEventSuggestedSelectionRequestyesRequest parameters including match event, event selection, and optional suggestion hint
callbackCallback<MatchEventSuggestedSelectionResponse>yesFunction to receive suggested selections or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.matchEventSuggestedSelection = (args, callback) => {
  // args example:
  // {
  //   matchEvent: { type: "GOAL", metadata: { goal_number: "2" } },
  //   event: { event: "sr:match:12345", type: "uf" },
  //   widget: "liveMatchTracker",
  //   suggestion: {
  //     type: "Outcome",
  //     selections: [
  //       { event: "sr:match:12345", market: "1", outcome: "1", type: "uf" }
  //     ]
  //   },
  //   channelId: "euro-league",
  //   channelOriginId: "channel-child-id"
  // }

  // Your implementation here - fetch suggested selections for the match event
  // Then call callback with the result
  callback(undefined, {
    selections: [
      { event: "sr:match:12345", market: "1", outcome: "1", type: "uf" }
    ]
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#RecommendedSelections Function

Retrieves recommended selections for a given event.

Used by: betConcierge

ArgumentTypeRequiredDescription
argsRecommendedSelectionsRequestyesRequest parameters including event selections
callbackCallback<RecommendedSelectionsResponse>yesFunction to receive recommended selections or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.recommendedSelections = (args, callback) => {
  // args example:
  // {
  //   events: [
  //     { event: "sr:match:12345", type: "uf" }
  //   ]
  // }

  // Your implementation here - fetch recommended selections for the given events
  // Then call callback with the result
  callback(undefined, {
    selection: [
      { event: "sr:match:12345", market: "1", outcome: "1", type: "uf" }
    ]
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#CalculateCustomBetXML Function

Calculates custom bet XML for given markets and match.

Used by: betConcierge

ArgumentTypeRequiredDescription
argsCalculateCustomBetXmlRequestyesRequest parameters containing the calculate payload
callbackCallback<CalculateCustomBetXmlResponse>yesFunction to receive the resulting payload or error

Returns: UnsubscribeFunction - Optional cleanup function to stop receiving updates

javascript
// Example implementation
adapter.endpoints.calculateCustomBetXML = (args, callback) => {
  // args example:
  // {
  //   calculatePayload: "<CustomBet>...</CustomBet>"
  // }

  // Your implementation here - calculate custom bet XML and return result
  // Then call callback with the result
  callback(undefined, {
    payload: "<CustomBetResponse>...</CustomBetResponse>"
  });

  // Return optional unsubscribe function
  return () => {
    // Cleanup subscriptions if needed
  };
};

#Utility Types

#Callback<T>

Error-first callback function pattern used by all adapter endpoints.

PropertyTypeRequiredDescription
errorError | undefinedyesError object if the operation failed, or undefined if successful
dataT | undefinedResponse data if successful, or undefined if an error occurred

Type Parameters:

  • T - The type of data returned on success
javascript
// Type-specific example with BetSlipSelectionResponse
betSlipSelection(args, callback) {
  // other code

  if (error) {
    // something went wrong, return error
    callback(error)
    return;
  }
  // Operation successful, return BetSlipSelectionResponse
  callback(undefined, { selection: { event: "sr:match:12345", market: "18", outcome: "1", odds: { type: "fractional", value: "3.2", numerator: "6", denominator: "4" }} })

  // rest of code
}

#UnsubscribeFunction

Optional cleanup function returned by adapter endpoints to stop receiving updates.

Type: (() => void) | undefined

When an adapter endpoint returns an UnsubscribeFunction, you can call it to stop receiving further callback invocations. This is useful for:

  • Cleaning up subscriptions when a component unmounts
  • Stopping live data updates when they are no longer needed
  • Managing memory and preventing memory leaks
javascript
endpoint(args, callback) {
  // code
  return () => {
    // Implement unsubscribe logic, e.g., remove event listener, cancel subscription
    subscription.unsubscribe();
  }
}

See Also: Callback<T>

#Request Types

#EventRequest

Request parameters for fetching event data.

PropertyTypeRequiredDescription
selectionSelectionEventyesEvent identifier in UF or external format
languagestringLanguage code for localized content (e.g., "en", "de")
displayedTimezonestringTimezone for displaying event times (e.g., "Europe
", "Europe/London")
javascript
// Example usage
const eventRequest = {
  selection: { event: "sr:match:12345", type: "uf" },
  language: "en",
  displayedTimezone: "Europe:Berlin"
};

// With minimal properties
const minimalRequest = {
  selection: { event: "sr:match:67890", type: "uf" }
};

#EventMarketsRequest

Request parameters for fetching all markets data for a specific event.

PropertyTypeRequiredDescription
selectionSelectionEventyesEvent identifier in UF or external format
languagestringLanguage code for localized content (e.g., "en", "de")
oddsTypestringType of odds to display. Valid values: 'decimal', 'fractional', 'moneyline', 'hong-kong', 'indonesian', 'malay'
javascript
// Example usage
const eventMarketsRequest = {
  selection: { id: "sr:match:12345", type: "uf" },
  language: "en",
  oddsType: "decimal"
};

// With minimal properties
const minimalRequest = {
  selection: { id: "sr:match:67890", type: "uf" }
};

#MarketRequest

Request parameters for fetching a specific market data for an event.

PropertyTypeRequiredDescription
selectionSelectionMarket | SelectionOutcomeyesMarket or outcome identifier to fetch
languagestringyesLanguage code for localized content (e.g., "en", "de")
oddsTypestringyesType of odds to display. Valid values: 'decimal', 'fractional', 'moneyline', 'hong-kong', 'indonesian', 'malay'
javascript
// Example usage with market selection
const marketRequest = {
  selection: { id: "sr:market:123", marketId: 1 },
  language: "en",
  oddsType: "decimal"
};

// Example with outcome selection
const outcomeRequest = {
  selection: { id: "sr:outcome:456", outcomeId: "1" },
  language: "en",
  oddsType: "moneyline"
};

#AvailableMarketsForEventRequest

Request parameters for fetching all available markets for a specific event.

PropertyTypeRequiredDescription
selectionSelectionEventyesEvent identifier in UF or external format
javascript
// Example usage
const availableMarketsRequest = {
  selection: { event: "sr:match:12345", type: "uf" }
};

#FilterMarketsRequest

Request parameters for filtering markets based on widget configuration.

PropertyTypeRequiredDescription
widgetstringyesWidget identifier to determine which markets to filter (e.g., "swipeBet", "betRecommendation")
selectionSelectionMarket[]Optional array of market identifiers to filter markets
javascript
// Example usage with events
const filterMarketsRequest = {
  widget: "swipeBet",
  selection: [
    { id: "sr:match:12345", type: "uf", market: "1" },
    { id: "sr:match:67890", type: "uf", market: "18", specifiers: "total=2.5" }
  ]
};

// Example with widget only
const simpleRequest = {
  widget: "betRecommendation"
};

#TicketsRequest

Request parameters for fetching tickets.

PropertyTypeRequiredDescription
operatorIdstringyesClient/operator identifier
endCustomerIdstringyesEnd user/customer identifier
eventsSelectionEvent[]Optional array of event identifiers to filter tickets by specific events
channelIdstringOptional channel identifier to filter tickets by virtual stadium chat channel
pagenumberOptional page number for pagination
javascript
// Example usage with all properties
const ticketsRequest = {
  operatorId: "operator123",
  endCustomerId: "customer456",
  events: [
    { id: "sr:match:12345", type: "uf" }
  ],
  channelId: "euro-league",
  page: 1
};

// Example with minimal properties
const minimalRequest = {
  operatorId: "operator123",
  endCustomerId: "customer456"
};

#MatchEventSuggestedSelectionRequest

Request parameters for fetching suggested selections for a specific match event (incident).

PropertyTypeRequiredDescription
matchEventMatchEventyesMatch event (incident) information
eventSelectionEventyesEvent identifier in UF or external format
widgetstringyesWidget making this request
type'outcome' | 'market'Optional instruction indicating the selection form the client expects. When provided, the adapter is expected to return selections of the requested form (see details below).
suggestedSelectionsSelectionOutcome[] | SelectionMarket[]Optional suggested selections for the match event. Use outcome array when type is 'outcome', market array when type is 'market'.
channelIdstringCurrent viewing channel identifier
channelOriginIdstringChannel from which the match event originated (e.g., when the widget is opened on a tournament channel that received the event from a child channel)

#type and suggestedSelections

The type field is an optional instruction indicating which selection form the client expects. When provided, the adapter is expected to return selections matching that form:

  • 'outcome': response should contain outcome-level selections (SelectionOutcome[]).
  • 'market': response should contain market-level selections (SelectionMarket[]).

The suggestedSelections property carries the actual suggested selections and should match the type when both are provided.

javascript
// Example usage preferring outcome-level selections
const requestWithOutcomeSuggestion = {
  matchEvent: { type: "GOAL", metadata: { goal_number: "2" } },
  event: { event: "sr:match:12345", type: "uf" },
  widget: "flashBet",
  type: "outcome",
  suggestedSelections: [
    { event: "sr:match:12345", market: "1", outcome: "1", type: "uf" }
  ],
  channelId: "euro-league",
  channelOriginId: "channel-child-id"
};

// Example usage preferring market-level selections
const requestWithMarketSuggestion = {
  matchEvent: { type: "GOAL", metadata: { goal_number: "2" } },
  event: { event: "sr:match:12345", type: "uf" },
  widget: "flashBet",
  type: "market",
  suggestedSelections: [
    { event: "sr:match:12345", market: "1", type: "uf" }
  ]
};

// Example with minimal properties (no suggestion)
const minimalRequest = {
  matchEvent: { type: "GOAL" },
  event: { event: "sr:match:12345", type: "uf" },
  widget: "flashBet"
};

#RecommendedSelectionsRequest

Request parameters for fetching recommended selections for given events.

PropertyTypeRequiredDescription
eventsSelectionEvent[]yesArray of event identifiers for which to retrieve recommended selections
javascript
// Example usage
const recommendedSelectionsRequest = {
  events: [
    { event: "sr:match:12345", type: "uf" },
    { event: "sr:match:67890", type: "uf" }
  ]
};

#CalculateCustomBetXmlRequest

Request parameters for calculating custom bet XML.

PropertyTypeRequiredDescription
calculatePayloadstringyesXML payload string used as input for the custom bet calculation
javascript
// Example usage
const calculateCustomBetXmlRequest = {
  calculatePayload: "<CustomBet>...</CustomBet>"
};

#Response Types

#EventResponse

Response data containing event information.

PropertyTypeRequiredDescription
eventEventyesComplete event data including details, status, participants, and metadata
javascript
// Example response structure
const eventResponse = {
  event: {
    id: "sr:match:12345",
    sport: { id: "1", name: "Soccer" },
    category: { id: "1", name: "England" },
    tournament: { id: "17", name: "Premier League" },
    teams: [
      { id: "sr:team:1", name: "Manchester United" },
      { id: "sr:team:2", name: "Liverpool" }
    ],
    isLive: false,
    // ... additional event properties
  }
};

#EventMarketsResponse

Response data containing all markets for an event.

PropertyTypeRequiredDescription
marketsMarket[]yesArray of market data for the event
eventstringyesEvent identifier string (e.g., "sr:match
")
javascript
// Example response structure
const eventMarketsResponse = {
  markets: [
     {
      id: "18",
      name: "Total Goals",
      specifiers: "total=2.5",
      outcomes: [
        { id: "12", name: "Over 2.5", status: "active", odds: { type: "decimal", value: "1.85" } },
        { id: "13", name: "Under 2.5", status: "active", odds: { type: "decimal", value: "2.05" } }
      ],
      status: "active"
    },
    // ... additional markets
  ],
  event: { id: "sr:match:12345", type: "uf" }
};

#MarketResponse

Response data containing a specific market and event information.

PropertyTypeRequiredDescription
marketMarketyesMarket data including outcomes and odds
eventstringyesEvent identifier string (e.g., "sr:match
")
javascript
// Example response structure
const marketResponse = {
  market: {
    id: "sr:market:1",
    name: "Match Winner",
    outcomes: [
      { id: "1", name: "Home", odds: 2.5 },
      { id: "X", name: "Draw", odds: 3.0 },
      { id: "2", name: "Away", odds: 3.2 }
    ]
  },
  event: { id: "sr:match:12345", type: "uf" }
};

#AvailableMarketsForEventResponse

Response data containing all available market offering as selections for an event.

PropertyTypeRequiredDescription
selectionSelectionMarket[]yesArray of market selection identifiers available for the event
javascript
// Example response structure
const availableMarketsResponse = {
  selection: [
    { event: "sr:event:1", market: "1" },
    { event: "sr:event:2", market: "18", specifiers: "total=2.5" },
    { event: "sr:event:3", market: "10" }
  ]
};

#FilterMarketsResponse

Response data containing filtered market selections based on the widget identifier and input selections.

PropertyTypeRequiredDescription
selectionSelectionMarket[]yesArray of event or market selections that match the filter criteria
javascript
// Example response structure
const filterMarketsResponse = {
  selection: [
    { event: "sr:match:12345", type: "uf", market: "1" },
    { event: "sr:match:12345", type: "uf", market: "18", specifiers: "total=2.5" }
  ]
};

#BetSlipSelectionResponse

Response data containing currently selected outcomes in the bet slip.

PropertyTypeRequiredDescription
selectionSelectionOutcome[]yesArray of outcome selections currently in the bet slip
javascript
// Example response structure
const betSlipSelectionResponse = {
  selection: [
    { event: "sr:match:12345", market: "1", outcome: "2", odds: { type: "decimal", value: "1.95" } },
      { event: "sr:match:12345", market: "18", outcome: "1", odds: { type: "fractional", value: "3.2", numerator: "6", denominator: "4" }}
  ]
};

#CashBackSelectionsRequest

Request parameters for fetching cash back selections.

PropertyTypeRequiredDescription
widgetstringyesWidget identifier to determine the context of the cash back request
selectionSelectionEvent[]yesArray of event selections to check for cash back eligibility
javascript
// Example usage
const cashBackSelectionsRequest = {
  widget: "cashBack",
  selection: [
    { event: "sr:match:12345", type: "uf" },
    { event: "sr:match:67890", type: "uf" }
  ]
};

#CashBackSelectionsResponse

Response data containing events eligible for cash back.

PropertyTypeRequiredDescription
eventsSelectionEvent[]yesArray of event selections that are eligible for cash back promotions
javascript
// Example response structure
const cashBackSelectionsResponse = {
  events: [
    { id: "sr:match:12345", type: "uf" },
    { id: "sr:match:67890", type: "uf" }
  ]
};

#TicketsResponse

Response data containing user tickets.

PropertyTypeRequiredDescription
ticketsTicket[]yesArray of ticket objects containing bet information, status, and outcomes
javascript
// Example response structure
const ticketsResponse = {
  tickets: [
    {
      ticketId: "ticket_123456",
      bets: [
        {
          betId: "bet_001",
          selections: [
            {
              type: "uf",
              event: "sr:match:12345",
              market: "1",
              outcome: "1",
              odds: { type: "decimal", value: "2.10" }
            }
          ],
          stake: [{
            type: "cash",
            currency: "USD",
            amount: "10.00",
            mode: "total"
          }]
        }
      ],
      version: "1.0"
    }
    // ... additional tickets
  ]
};

#Version 1.0 (Deprecated) Ticket response, used by virtual stadium.

PropertyTypeRequiredDescription
betsBetSlip[]yesArray of ticket objects containing bet information, status, and outcomes
javascript
// Example response structure
const ticketsResponse = {
  bets: [
    // One ticket
    {
      id: 'ticket_123456';
      betSlipId: '654321';
      betType: 'single' ;
      currency: 'USD';
      combinedOdds: {
        decimalValue: 4.33
        displayValue: '10/3'
      };
      stake: {
          value: '50.00'
      },
      payout: {
          value: '127.50'
      },
      bets: {
        id: 'bet_001',
        betType: '',
        markets: [
            {
                id: '1',
                name: subTitle,
                outcomes: [
                    {
                        id: '1',
                        name: title,
                        odds: 4.33
                    }
                ]
            }
        ],
        odds: {
            decimalValue: 4.33,
            displayValue: '10/3'
        },
        event: {
            id: 'sr:match:12356',
            name: 'Liga La Liga Match 1'
        }
      };
    }
    // ... additional tickets
  ]
};

#MatchEventSuggestedSelectionResponse

Response data containing suggested selections for the match event.

PropertyTypeRequiredDescription
selections(SelectionMarket | SelectionOutcome)[]yesArray of suggested market or outcome selections for the match event
javascript
// Example response structure
const matchEventSuggestedSelectionResponse = {
  selections: [
    { event: "sr:match:12345", market: "1", outcome: "1", type: "uf" },
    { event: "sr:match:12345", market: "18", specifiers: "total=2.5", type: "uf" }
  ]
};

#RecommendedSelectionsResponse

Response data containing recommended selections for the requested events.

PropertyTypeRequiredDescription
selectionSelectionOutcome[]yesArray of recommended outcome selections
javascript
// Example response structure
const recommendedSelectionsResponse = {
  selection: [
    { event: "sr:match:12345", market: "1", outcome: "1", type: "uf" },
    { event: "sr:match:67890", market: "18", specifiers: "total=2.5", outcome: "13", type: "uf" }
  ]
};

#CalculateCustomBetXmlResponse

Response data containing the calculated custom bet XML payload.

PropertyTypeRequiredDescription
payloadstringyesResulting XML payload string from the custom bet calculation
javascript
// Example response structure
const calculateCustomBetXmlResponse = {
  payload: "<CustomBetResponse>...</CustomBetResponse>"
};

#Adapter Data Types

#SelectionEvent

Discriminated union type for identifying betting events. The type field discriminates between UF (Unified Feed) and external formats.

#When type: 'uf'

Use this format when referencing events from the Sportradar Unified Feed (UOF).

PropertyTypeRequiredDescription
type'uf'yesIndicates Unified Feed format
eventstringyesSR entity identifier following UOF schema (e.g., "sr:match:12345", "sr:stage:67890")

#When type: 'external'

Use this format when referencing events using your own client-defined identifiers.

PropertyTypeRequiredDescription
type'external'yesIndicates external client-defined format
eventstringyesClient-defined unique event identifier. Format is determined by your system (e.g., "736977", "event_12345")
javascript
// UF format - referencing a Sportradar match
const ufSelection = {
  type: "uf",
  event: "sr:match:12345"
};

// External format - referencing a client-defined event
const externalSelection = {
  type: "external",
  event: "ext:match:736977"
};

See Also: SelectionMarket, SelectionOutcome

#SelectionMarket

Discriminated union type for identifying betting markets within events. Extends SelectionEvent with market-specific properties. The type field discriminates between UF (Unified Feed) and external formats.

#When type: 'uf'

Use this format when referencing markets from the Sportradar Unified Feed (UOF).

PropertyTypeRequiredDescription
type'uf'yesIndicates Unified Feed format
eventstringyesSR entity identifier following UOF schema (e.g., "sr:match:12345")
marketstringyesBetting market identifier as defined by UOF. Retrieved from the UOF feed (e.g., "1" for 1x2)
specifiersstringAdditional market data as defined by UOF. Although optional in schema, must be provided when the UOF market requires specifiers (e.g., for "Total 1.5" vs "Total 2.5", specifiers would be "total=1.5")

#When type: 'external'

Use this format when referencing markets using your own client-defined identifiers.

PropertyTypeRequiredDescription
type'external'yesIndicates external client-defined format
eventstringyesClient-defined unique event identifier
marketstringyesClient-defined market identifier. If not available in your system, use the outcome identifier
javascript
// UF format - referencing a Sportradar market
const ufMarket = {
  type: "uf",
  event: "sr:match:12345",
  market: "1"
};

// UF format with specifiers - market with line (e.g., Total goals)
const ufMarketWithSpecifiers = {
  type: "uf",
  event: "sr:match:12345",
  market: "18",
  specifiers: "total=2.5"
};

// External format - client-defined market
const externalMarket = {
  type: "external",
  event: "event_12345",
  market: "match_winner"
};

See Also: SelectionEvent, SelectionOutcome

#SelectionOutcome

Discriminated union type for identifying specific betting outcomes within markets. Extends SelectionMarket with outcome-specific properties. The type field discriminates between UF (Unified Feed) and external formats.

#When type: 'uf'

Use this format when referencing outcomes from the Sportradar Unified Feed (UOF).

PropertyTypeRequiredDescription
type'uf'yesIndicates Unified Feed format
eventstringyesSR entity identifier following UOF schema (e.g., "sr:match:12345")
marketstringyesBetting market identifier as defined by UOF
specifiersstringAdditional market data as defined by UOF. Required when market uses specifiers
outcomestringyesMarket outcome identifier as defined by UOF. Retrieved from the UOF feed (e.g., "1" for home win in 1x2 market)
oddsOddsOdds information for this outcome

#When type: 'external'

Use this format when referencing outcomes using your own client-defined identifiers.

PropertyTypeRequiredDescription
type'external'yesIndicates external client-defined format
eventstringyesClient-defined unique event identifier
marketstringyesClient-defined market identifier
outcomestringyesClient-defined unique market outcome identifier
oddsOddsyesOdds information for this outcome (required for external format)
javascript
// UF format - referencing a Sportradar outcome
const ufOutcome = {
  type: "uf",
  event: "sr:match:12345",
  market: "1",
  outcome: "1",
  odds: {
    type: "decimal",
    value: "2.50"
  }
};

// UF format with specifiers
const ufOutcomeWithSpecifiers = {
  type: "uf",
  event: "sr:match:12345",
  market: "18",
  specifiers: "total=2.5",
  outcome: "12",
  odds: {
    type: "decimal",
    value: "1.85"
  }
};

// External format - client-defined outcome
const externalOutcome = {
  type: "external",
  event: "event_12345",
  market: "match_winner",
  outcome: "home",
  odds: {
    type: "decimal",
    value: "2.10"
  }
};

See Also: SelectionEvent, SelectionMarket, Odds

#Odds

Represents betting odds in various formats with optional custom display values.

PropertyTypeRequiredDescription
typestringyesOdds format. Valid values: 'decimal' (European/Decimal), 'fractional' (Fractional), 'moneyline' (American)
valuestringyesOdds value submitted by the client. Pattern: 1-8 digits (first cannot be 0), optionally followed by decimal point and 1-8 digits. Regex: ^[1-9]\d{0,7}(\.\d{1,8})?$
numeratorstringNumerator of fractional odds. Only present when type is 'fractional'. Regex: ^[1-9]\d{0,7}$
denominatorstringDenominator of fractional odds. Only present when type is 'fractional'. Regex: ^[1-9]\d{0,7}$
customDisplayValuestringCustom display value for odds, used as-is for display purposes. Only provide if you want to handle custom formatting
javascript
// European (decimal) odds
const decimalOdds = {
  type: "decimal",
  value: "2.50"
};

// Fractional odds (UK-style representation)
const fractionalOdds = {
  type: "fractional",
  value: "3.2",
  numerator: "6",
  denominator: "4"
};

// American (moneyline) odds
const americanOdds = {
  type: "moneyline",
  value: "150"
};

// With custom display value
const customOdds = {
  type: "decimal",
  value: "2.50",
  customDisplayValue: "5/2"
};

#Outcome

Represents a single betting outcome within a market.

PropertyTypeRequiredDescription
idstringyesUnique identifier for the outcome, used to reference it in bets
namestringyesTranslated name of the outcome, used for display purposes
competitorstringName or identifier of the team or player associated with this outcome. Useful for markets where each outcome is tied to a specific competitor (e.g., for 1x2 market, outcome: 1, competitor: "FC Barca")
oddsOddsOdds information for this outcome
statusstringyesOutcome status. Valid values: 'active', 'inactive'
javascript
// Active outcome with odds
const outcome = {
  id: "1",
  name: "Home Win",
  competitor: "FC Barcelona",
  odds: {
    type: "decimal",
    value: "2.50"
  },
  status: "active"
};

// Inactive outcome
const inactiveOutcome = {
  id: "X",
  name: "Draw",
  status: "inactive"
};

See Also: Market, Odds

#Market

Represents a betting market with multiple outcomes.

PropertyTypeRequiredDescription
idstringyesUnique identifier for the market, used to reference it in bets
namestringyesTranslated name of the market, used for display purposes
outcomesOutcome[]yesAll outcomes associated with this market
statusstringyesMarket status. Valid values: 'active', 'deactivated', 'suspended', 'settled', 'cancelled'
specifiersstringAdditional market data as defined by UOF (e.g., for markets with lines like Total 1.5 vs Total 2.5). Although optional in schema, must be provided when the UOF market requires specifiers

Market Status Values:

  • active: Odds are provided and you can accept bets on the market
  • deactivated: Odds are no longer provided for this market. Can go back to active (e.g., when a different total line becomes most balanced)
  • suspended: Odds continue to be provided but you should not accept bets temporarily (e.g., "bet stop" before/during goal confirmation)
  • settled: Bet settlement messages have been sent for this market, no further odds will be provided. In rare cases, settled markets may be moved to cancelled
  • cancelled: This market has been cancelled. No further odds will be provided
javascript
// Active market with outcomes
const market = {
  id: "1",
  name: "Match Winner (1X2)",
  outcomes: [
    { id: "1", name: "Home", status: "active", odds: { type: "decimal", value: "2.10" } },
    { id: "X", name: "Draw", status: "active", odds: { type: "decimal", value: "3.40" } },
    { id: "2", name: "Away", status: "active", odds: { type: "decimal", value: "3.50" } }
  ],
  status: "active"
};

// Market with specifiers (Total goals)
const totalMarket = {
  id: "18",
  name: "Total Goals",
  specifiers: "total=2.5",
  outcomes: [
    { id: "12", name: "Over 2.5", status: "active", odds: { type: "decimal", value: "1.85" } },
    { id: "13", name: "Under 2.5", status: "active", odds: { type: "decimal", value: "2.05" } }
  ],
  status: "active"
};

See Also: Outcome, Event

#Event

Represents a sporting event with teams, tournament information, and match details.

PropertyTypeRequiredDescription
idstringyesEvent identifier as defined by UOF. Retrieved from the MAPI feed
sportSportyesSport information (imported from adapter types)
categoryCategoryyesCategory information (e.g., country, region)
tournamentTournamentyesTournament information
teams[Team, Team]yesArray of exactly two teams (home and away)
isLivebooleanyesIndicates whether the event is currently live
dateEventDateDate information for the event
date.displayValuestringFormatted date string for display
date.startTimestringEvent start time (ISO format)
liveCurrentTimestringCurrent match time for live events (e.g., "45
", "HT")
result1ResultPrimary result/score information
result2ResultSecondary result information (e.g., half-time score)
result3ResultTertiary result information (e.g., period scores)
javascript
// Pre-match event
const prematchEvent = {
  id: "sr:match:12345",
  sport: { id: "1", name: "Soccer" },
  category: { id: "1", name: "England" },
  tournament: { id: "17", name: "Premier League" },
  teams: [
    { id: "sr:team:1", name: "Manchester United" },
    { id: "sr:team:2", name: "Liverpool" }
  ],
  isLive: false,
  date: {
    displayValue: "Jan 7, 2026",
    startTime: "2026-01-07T20:00:00Z"
  }
};

// Live event with score
const liveEvent = {
  id: "sr:match:67890",
  sport: { id: "1", name: "Soccer" },
  category: { id: "1", name: "England" },
  tournament: { id: "17", name: "Premier League" },
  teams: [
    { id: "sr:team:3", name: "Chelsea" },
    { id: "sr:team:4", name: "Arsenal" }
  ],
  isLive: true,
  liveCurrentTime: "72:15",
  result1: { home: 2, away: 1 }
};

See Also: Market, SelectionEvent

#EventDate

Represents date and time information for an event.

PropertyTypeRequiredDescription
displayValuestringFormatted date string for display purposes
startTimestringEvent start time in ISO format (e.g., "2026-01-07T20:00
")
javascript
// Example date object
const eventDate = {
  displayValue: "Jan 7, 2026",
  startTime: "2026-01-07T20:00:00Z"
};

See Also: Event

#Ticket

Represents a betting ticket containing one or more bets.

PropertyTypeRequiredDescription
ticketIdstringyesClient defined string to identify the ticket (unique in the client's system),
minimal string length = 1,
maximum string length = 128
betsBet[]yesArray of bets included in this ticket
version1.0yesTicket format version
javascript
const ticket = {
  ticketId: "ticket_123456",
  bets: [
    {
      betId: "bet_001",
      selections: [
        {
          type: "uf",
          event: "sr:match:12345",
          market: "1",
          outcome: "1",
          odds: { type: "decimal", value: "2.10" }
        }
      ],
      stake: [{
        type: "cash",
        currency: "USD",
        amount: "10.00",
        mode: "total"
      }]
    }
  ],
  version: "1.0"
};

See Also: Bet, TicketsResponse

#Bet

Represents a single bet within a ticket, containing selections and stake information.

PropertyTypeRequiredDescription
betIdstringyesUnique bet id (in the client's system),
minimal string length = 1,
maximum length = 128
selectionsArray<TicketSelection | SelectionOutcome>yesArray of bet selections, included in this bet. Can include custom bets (TicketSelection) or standard outcomes (SelectionOutcome)
minimal number of selections per bet = 1,
maximum number = 100
stakeArray<Stake>yesArray of bet stakes,
minimal number of stake per bet = 1,
maximum number = 5
oddsOddsThe odds for this bet
javascript
// Single bet
const singleBet = {
  betId: "bet_001",
  selections: [
    {
      type: "uf",
      event: "sr:match:12345",
      market: "1",
      outcome: "1",
      odds: { type: "decimal", value: "2.10" }
    }
  ],
  stake: [{
    type: "cash",
    currency: "USD",
    amount: "10.00"
  }]
};

// Accumulator bet
const accumulatorBet = {
  betId: "bet_002",
  selections: [
    {
      type: "uf",
      event: "sr:match:12345",
      market: "1",
      outcome: "1",
      odds: { type: "decimal", value: "2.10" }
    },
    {
      type: "uf",
      event: "sr:match:67890",
      market: "1",
      outcome: "1",
      odds: { type: "decimal", value: "1.85" }
    }
  ],
  stake: [{
    type: "cash",
    currency: "USD",
    amount: "5.00"
  }],
  odds: { type: "decimal", value: "3.89" }
};

// Custom bet using TicketSelection
const customBet = {
  betId: "bet_003",
  selections: [
    {
      type: "custom-bet",
      betId: "custom_001",
      selections: [
        {
          type: "uf",
          event: "sr:match:12345",
          market: "1",
          outcome: "1",
          odds: { type: "decimal", value: "2.10" }
        },
        {
          type: "uf",
          event: "sr:match:12345",
          market: "18",
          specifiers: "total=2.5",
          outcome: "12",
          odds: { type: "decimal", value: "1.85" }
        }
      ],
      odds: { type: "decimal", value: "3.89" }
    }
  ],
  stake: [{
    type: "cash",
    currency: "EUR",
    amount: "10.00"
  }]
};

See Also: Ticket, SelectionOutcome, TicketSelection, Stake

#Stake

Represents stake information for a bet.

PropertyTypeRequiredDescription
typestringyesStake type. Valid values: 'cash' (used for stake and payout), 'bonus' (amount added on top of winnings if bet is won)
currencystringyesCurrency code (e.g., "USD", "EUR", "GBP")
amountstringyesStake amount as a string to allow for decimal values
modestringStake mode (default: 'total'). Valid values: 'unit' (stake relates to each sub-bet in system bets), 'total' (stake relates to all sub-bets, each receives a portion)
javascript
// Cash stake with total mode
const cashStake = {
  type: "cash",
  currency: "USD",
  amount: "10.00",
  mode: "total"
};

// Bonus stake
const bonusStake = {
  type: "bonus",
  currency: "EUR",
  amount: "5.00"
};

// Unit stake for system bet
const unitStake = {
  type: "cash",
  currency: "GBP",
  amount: "2.00",
  mode: "unit"
};

See Also: Bet

#TicketSelection

Represents a custom bet selection within a ticket.

PropertyTypeRequiredDescription
type'custom-bet'yesType identifier, always 'custom-bet'
betIdstringOptional unique identifier for this custom bet
selectionsSelectionOutcome[]yesArray of outcome selections included in this custom bet
oddsOddsyesOdds information for this custom bet
javascript
const customBetSelection = {
  type: "custom-bet",
  betId: "custom_001",
  selections: [
    {
      type: "uf",
      event: "sr:match:12345",
      market: "1",
      outcome: "1",
      odds: { type: "decimal", value: "2.10" }
    },
    {
      type: "uf",
      event: "sr:match:67890",
      market: "1",
      outcome: "2",
      odds: { type: "decimal", value: "1.85" }
    }
  ],
  odds: { type: "decimal", value: "3.89" }
};

See Also: Bet, SelectionOutcome

#Sport

Represents information about a sport.

PropertyTypeRequiredDescription
idstringThe unique SR identifier for the sport
namestringThe name of the sport
iconstringURL where the sport icon is located
javascript
const soccer = {
  id: "1",
  name: "Soccer",
  icon: "https://example.com/icons/soccer.png"
};

const basketball = {
  id: "2",
  name: "Basketball"
};

See Also: Event, Category

#Category

Represents information about a category (e.g., country, region).

PropertyTypeRequiredDescription
idstringThe unique identifier assigned to the category
namestringThe name of the category
ccobjectCountry code information
cc.a2stringyesCountry code in A2 format (if cc object is present)
javascript
const england = {
  id: "1",
  name: "England",
  cc: {
    a2: "GB"
  }
};

const spain = {
  id: "32",
  name: "Spain"
};

See Also: Event, Sport

#Tournament

Represents information about a tournament.

PropertyTypeRequiredDescription
idstringThe unique identifier assigned to the tournament
externalIdstring | numberYour unique identifier for the tournament
namestringThe name of the tournament
javascript
const premierLeague = {
  id: "17",
  externalId: "PL2025",
  name: "Premier League"
};

const championsLeague = {
  id: "7",
  name: "UEFA Champions League"
};

See Also: Event, Category

#Team

Represents information about a team participating in an event.

PropertyTypeRequiredDescription
idstringThe unique SR identifier assigned to the team
namestringyesThe name of the team
javascript
const manchesterUnited = {
  id: "sr:team:1",
  name: "Manchester United"
};

const liverpool = {
  name: "Liverpool FC"
};

See Also: Event

#Result

Represents result/score information for an event.

PropertyTypeRequiredDescription
resultArray<number | string>yesThe result of the event (e.g., scores, statistics)
labelstringOptional label describing what this result represents
javascript
// Match score
const finalScore = {
  result: [2, 1],
  label: "Final Score"
};

// Half-time score
const halftimeScore = {
  result: [1, 0],
  label: "Half-time"
};

// Period scores
const periodScores = {
  result: [25, 20, 30, 18],
  label: "Quarter Scores"
};

See Also: Event

#BetSlip (Deprecated)

Represents a betting ticket containing one or more bets.

PropertyTypeRequiredDescription
idstringyesClient defined string to identify the ticket (unique in the client's system)
betSlipIdstringClient defined string to identify the bet slip (unique in the client's system)
betType'single' | 'multibet' | 'sameGameMulti'yes'single''multibet''sameGameMulti'
currencystringyesCurrency as displayed
stakeBetSlipOddsObjectStake for ticket
stakeValueObjectStake for ticket
payoutValueObjectPayout for ticket
betsBetSlipBetObjectyesBets for ticket
javascript
const betSlip = {
  id: 'ticket_123456';
  betSlipId: '654321';
  betType: 'single' ;
  currency: 'USD';
  combinedOdds: {
    decimalValue: 4.33
    displayValue: '10/3'
  };
  stake: {
      value: '50.00'
  },
  payout: {
      value: '127.50'
  },
  bets: {
    id: 'bet_001',
    betType: '',
    markets: [
        {
            id: '1',
            name: subTitle,
            outcomes: [
                {
                    id: '1',
                    name: title,
                    odds: 4.33
                }
            ]
        }
    ],
    odds: {
        decimalValue: 4.33,
        displayValue: '10/3'
    },
    event: {
        id: 'sr:match:12356',
        name: 'Liga La Liga Match 1'
    }
  }
};

#ValueObject

PropertyTypeRequiredDescription
valuestringyesDisplayed representation of value
javascript
const stake = {
      value: '50.00'
  };

#BetSlipOddsObject

PropertyTypeRequiredDescription
decimalValuenumberyesDecimal representation of odds used to display change indicators
displayValuestringyesDisplayed as is, representation of value
javascript
const combinedOdds: {
    decimalValue: 4.33
    displayValue: '10/3'
  };

#BetSlipBetObject

PropertyTypeRequiredDescription
idstringyesClient defined string to identify the bet (unique in the client's system)
betType'betBuilder' | '''betBuilder' for bet builder bet
eventBetSlipEventObjectyesClient defined string to identify the bet (unique in the client's system)
marketsBetSlipMarketObjectyesClient defined string to identify the bet (unique in the client's system)
oddsBetSlipOddsObjectOdds for bet
javascript
const bet = {
    id: 'bet_001',
    betType: '',
    markets: [
        {
            id: '1',
            name: subTitle,
            outcomes: [
                {
                    id: '1',
                    name: title,
                    odds: 4.33
                }
            ]
        }
    ],
    odds: {
        decimalValue: 4.33,
        displayValue: '10/3'
    },
    event: {
        id: 'sr:match:12356',
        name: 'Liga La Liga Match 1'
    }
  };

#BetSlipMarketObject

PropertyTypeRequiredDescription
idstring | numberyesThe unique identifier of the market
namestringyesThe name of the market
outcomesBetSlipOutcomeObject[]yesArray of outcomes for this market
statusobjectMarket status
status.isActivebooleanDeprecated. Whether the market is active
status.status'active' | 'deactivated' | 'suspended' | 'settled' | 'cancelled'Market status string (preferred over status.isActive)
specifierobjectMarket specifier information
specifier.valuestring | numberSpecifier value (e.g., "2.5" for a Total market)
oddsobjectCombined odds for the market
odds.decimalValuenumberNumeric decimal representation of odds, used for displaying change indicators
odds.displayValuestringString representation of odds, displayed as-is with no formatting
javascript
const market = {
  id: "sr:market:321",
  name: "Moneyline",
  outcomes: [
    {
      id: "sr:outcome:101",
      name: "PSG",
      odds: "1.48",
      status: { isActive: true }
    },
    {
      id: "sr:outcome:102",
      name: "Draw",
      odds: "4.83",
      status: { isActive: true }
    },
    {
      id: "sr:outcome:103",
      name: "Monaco",
      odds: "2.47",
      status: { isActive: true }
    }
  ],
  status: { status: "active" }
};

#BetSlipOutcomeObject

PropertyTypeRequiredDescription
idstring | numberyesThe unique identifier assigned to the market outcome
namestringyesThe name of the market outcome
oddsnumber | stringOdds value displayed as-is — no formatting is applied
oddsDecimalnumberNumeric decimal representation of odds, used for displaying change indicators
competitorstringName or identifier of the competitor associated with this outcome
statusobjectOutcome status
status.isActivebooleanWhether the outcome is available for betting
javascript
const outcome = {
  id: "sr:outcome:67898",
  name: "Denver Nuggets",
  oddsDecimal: 2.55,
  status: { isActive: true }
};

#BetSlipEventObject

PropertyTypeRequiredDescription
idstringyesThe unique identifier assigned to the event
externalIdstring | numberYour unique identifier for the event
namestringMatch name. If not provided, it is aggregated from teams as "{teams[0].name} vs {teams[1].name}". If teams are also absent, the match name will be empty
teamsArray<{ id?: string; name: string }>Array of exactly two teams (home and away)
datestringEvent date
sportSportSport information
categoryCategoryCategory information (e.g., country, region)
tournamentTournamentTournament information
isLivebooleanWhether the event is currently live
liveCurrentTimestring | numberCurrent match time for live events (e.g., "45:00", "HT")
result1ResultPrimary result/score information
result2ResultSecondary result information (e.g., half-time score)
result3ResultTertiary result information (e.g., period scores)
javascript
const event = {
  id: "sr:event:98765",
  externalId: "123456",
  name: "Heat VS Nuggets",
  teams: [
    { id: "sr:team:113", name: "Miami Heat" },
    { id: "sr:team:118", name: "Denver Nuggets" }
  ]
};

#MatchEvent

Represents a match event (incident) that occurred during a sporting event, such as a goal, red card, or substitution.

PropertyTypeRequiredDescription
typestringyesUPPER_CASE event type identifier (see Type Values below)
metadataobject | nullAdditional data whose shape depends on type (see Metadata by Type below)
tagstringDeprecated. Channel identifier from which this match event originated. Prefer using channelId/channelOriginId passed separately in the request

#Type Values

Soccer

ValueDescription
GOALA goal was scored
YELLOW_CARDA yellow card was issued
RED_CARDA red card (or second yellow / direct red) was issued
CORNERA corner kick was awarded
PENALTY_KICKA penalty kick was awarded
PENALTY_SHOOTOUTA penalty shoot-out event occurred
OFFSIDEAn offside was called
SECOND_HALF_STARTEDThe second half began
OVERTIME_STARTEDOvertime began
PENALTY_SHOOTOUT_STARTEDThe penalty shoot-out phase began

Basketball

ValueDescription
ONE_POINT_SCOREDA free throw (1-point score) was made
TWO_POINT_SCOREDA 2-point basket was scored
THREE_POINT_SCOREDA 3-point basket was scored
TIMEOUTA timeout was called
PLAYER_EJECTEDA player was ejected (disqualified)
QUARTER_STARTEDA new quarter began

Tennis

ValueDescription
GAME_WONA game was won
BREAK_WONA break of serve was won
SET_WONA set was won
SET_STARTEDA new set began (set 2 onward)
FIRST_SET_STARTEDThe first set began

Cross-sport

ValueDescription
MATCH_STARTEDThe match began
MATCH_ENDEDThe match ended
TOURNAMENT_MATCH_START_IN_ONE_DAYScheduled match starts in 1 day
TOURNAMENT_MATCH_START_IN_ONE_HOURScheduled match starts in 1 hour
TOURNAMENT_MATCH_START_IN_FIVE_MINUTESScheduled match starts in 5 minutes

#Metadata by Type

typemetadata shapeNotes
GOAL{ goal_number: string }Total goals scored (home + away) at the time of the event
PENALTY_KICK{ team: "home" | "away" } or nullnull when the team cannot be identified from the feed
TIMEOUT{ quarter_number: string }Period number as a string; "OT" when in overtime (period > 4)
QUARTER_STARTED{ quarter_number: string }Period number as a string; "OT" when in overtime (period > 4)
GAME_WON{ set_number: string }Current set number
BREAK_WON{ set_number: string }Current set number
SET_STARTED{ set_number: string }Current set number
(all others)null—
javascript
// Soccer: 2nd goal scored
const goalEvent = {
  type: "GOAL",
  metadata: { goal_number: "2" }
};

// Soccer: penalty kick awarded to the home team
const penaltyEvent = {
  type: "PENALTY_KICK",
  metadata: { team: "home" }
};

// Basketball: timeout called in the 3rd quarter
const timeoutEvent = {
  type: "TIMEOUT",
  metadata: { quarter_number: "3" }
};

// Tennis: game won in the 2nd set
const gameWonEvent = {
  type: "GAME_WON",
  metadata: { set_number: "2" }
};

// Events with no metadata
const yellowCardEvent = { type: "YELLOW_CARD" };
const matchStartedEvent = { type: "MATCH_STARTED" };

#Adapter Config

#BrEventListConfig

Configuration for the bet recommendation event list widget. Note: The allowedMarkets and blockedMarkets properties are only applicable when using hosted Sportradar type with UOF (Unified Odds Feed) IDs.

PropertyTypeRequiredDescription
layoutEventListMarketsConfigyesMarket layout configuration per sport
allowedMarketsSportMarketsMapMarkets allowed for this widget, keyed by sport ID
blockedMarketsSportMarketsMapMarkets blocked for this widget, keyed by sport ID
javascript
const brEventListConfig = {
  layout: {
    "1": {  // Soccer
      sportId: 1,
      markets: [
        {
          title: "1X2",
          preMatchMarketId: 1,
          liveMarketId: 1,
          columns: ["1", "X", "2"]
        },
        {
          title: "Total",
          preMatchMarketId: 18,
          liveMarketId: 18,
          showSpecifier: true,
          columns: ["Over", "Under"]
        }
      ]
    }
  },
  allowedMarkets: {
    "1": {
      "1": true,     // Allow 1X2 market with all specifiers
      "18": ["2.5"]  // Allow Total market only with 2.5 specifier
    }
  }
};

See Also: EventListMarketsConfig, SportMarketsMap

#SportMarketsMap

A map of sport IDs to their market configurations with specifier filtering. Only applicable when using hosted Sportradar type with UOF (Unified Odds Feed) IDs.

PropertyTypeRequiredDescription
[sportId]Record<string, Specifiers>yesMarket configurations for a sport, where keys are market IDs and values are specifier filters

Specifiers Type:

  • true - Allow/block market with all specifiers
  • string[] - Allow/block market only with specific specifiers (e.g., ["2.5", "3.5"] for Total markets)
javascript
const sportMarketsMap = {
  "1": {                    // Soccer (sport ID 1)
    "1": true,              // 1X2 market - all specifiers
    "18": ["2.5", "3.5"],   // Total market - only 2.5 and 3.5 lines
    "16": ["0:1", "1:0"]    // Handicap - only specific lines
  },
  "2": {                    // Basketball (sport ID 2)
    "219": true,            // Money Line
    "225": ["180.5", "200.5"]  // Total Points - specific lines
  }
};

#EventListMarketsConfig

Configuration for market layout display in event lists. This is a Record<string, SportLayoutConfig> where keys are sport IDs and values are layout configurations.

Type: Record<string, SportLayoutConfig>

#SportLayoutConfig

PropertyTypeRequiredDescription
sportIdstring | numberyesSport identifier
marketsMarketLayoutConfig[]yesArray of market layout configurations

#MarketLayoutConfig

PropertyTypeRequiredDescription
titlestringDisplay title for the market column
preMatchMarketIdstring | numberMarket ID to use for pre-match events
liveMarketIdstring | numberMarket ID to use for live events
showSpecifierbooleanWhether to display the market specifier (e.g., "2.5" for Total)
columnsArray<string | ColumnConfig>Column definitions for outcome display

#ColumnConfig

PropertyTypeRequiredDescription
idstringyesOutcome ID to display in this column
titlestringCustom column title
tKeystringTranslation key for the column title
javascript
const eventListMarketsConfig = {
  "1": {  // Soccer
    sportId: 1,
    markets: [
      {
        title: "1X2",
        preMatchMarketId: 1,
        liveMarketId: 1,
        columns: ["1", "X", "2"]
      },
      {
        title: "Total",
        preMatchMarketId: 18,
        liveMarketId: 18,
        showSpecifier: true,
        columns: [
          { id: "12", title: "Over" },
          { id: "13", title: "Under" }
        ]
      }
    ]
  },
  "2": {  // Basketball
    sportId: 2,
    markets: [
      {
        title: "Money Line",
        preMatchMarketId: 219,
        liveMarketId: 219,
        columns: ["1", "2"]
      }
    ]
  }
};

See Also: BrEventListConfig

Last updated 6 days ago
Is this site helpful?
Widgets, Engagement Tools
Self-Service AdapterBet Assist
On this page
  • Adapter Object
  • Config Object
  • Endpoints Object
  • Adapter Endpoints
  • Market Function
  • EventMarkets Function
  • Event Function
  • AvailableMarketsForEvent Function
  • FilterMarkets Function
  • BetSlipSelection Function
  • CashBackSelections Function
  • Tickets Function
  • MatchEventSuggestedSelection Function
  • RecommendedSelections Function
  • CalculateCustomBetXML Function
  • Utility Types
  • Callback<T>
  • UnsubscribeFunction
  • Request Types
  • EventRequest
  • EventMarketsRequest
  • MarketRequest
  • AvailableMarketsForEventRequest
  • FilterMarketsRequest
  • TicketsRequest
  • MatchEventSuggestedSelectionRequest
  • RecommendedSelectionsRequest
  • CalculateCustomBetXmlRequest
  • Response Types
  • EventResponse
  • EventMarketsResponse
  • MarketResponse
  • AvailableMarketsForEventResponse
  • FilterMarketsResponse
  • BetSlipSelectionResponse
  • CashBackSelectionsRequest
  • CashBackSelectionsResponse
  • TicketsResponse
  • MatchEventSuggestedSelectionResponse
  • RecommendedSelectionsResponse
  • CalculateCustomBetXmlResponse
  • Adapter Data Types
  • SelectionEvent
  • SelectionMarket
  • SelectionOutcome
  • Odds
  • Outcome
  • Market
  • Event
  • EventDate
  • Ticket
  • Bet
  • Stake
  • TicketSelection
  • Sport
  • Category
  • Tournament
  • Team
  • Result
  • BetSlip (Deprecated)
  • MatchEvent
  • Adapter Config
  • BrEventListConfig
  • SportMarketsMap
  • EventListMarketsConfig