Widgets.us.betting.season.OddsComparison

A us.betting.season.oddsComparison is a bookmakers odds outcomes table. It shows matches and its outcomes from the current season of different bookmakers based on a match status and oddstype. Supports NBA, NHL, MLB and Soccer.

For the widget to render you need to provide uniqueTournamentId, other properties are optional.


new OddsComparison(props)

Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
uniqueTournamentId number

unique tournament id.

matchStatus string <optional>
'pre'

Match status filter. You can choose between pre, live or mixed. If pre or live is used, then the available games are split into two groups, live games and games that haven't started yet, and the displayed group of games can be controlled using a pre-game/live odds switch at the top right corner, whose initial position is specified with this prop. If mixed is used then no such switch is displayed, and both kinds of games are displayed as a single group.

oddsType string <optional>
'spread'

Odds type filter. Choose between spread, moneyline or overunder. In NHL the spread stands for puckline, and in MLB it stands for runline.

bookmakers string <optional>

A comma seperated string with bookmaker keys in it. List of valid bookmakers keys.

selectedDate string <optional>

Selects particular day (supports yyyy-mm-dd).

onItemClick function <optional>

Function/event handler. Emits matchId on match click or touch.

border boolean <optional>

If true, draws a border around the widget.

enableLimit boolean <optional>
true

If true, enables 5 games limit on a table. If more games are available, more button appears and after clicking it, 5 more games could be seen.

disableOddsColor boolean <optional>

if true, disables odds colors on live games.

disableOddsHighlighting boolean <optional>

if true, disables odds highlighting when odd improves or gets worse.

disableHeader boolean <optional>

if true, disables season info header.

enableDeeplink boolean <optional>

if true, bookmaker column headings become clickable, opening the corresponding bookmaker's website in a new browser tab.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.betting.season.oddsComparison" data-sr-unique-tournament-id="132"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/uscommon/widgetloader" data-sr-language="en_us" async></script>

JS/Programmatic

<script>
    (function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
    g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
    )})(window,document,"script","https://widgets.media.sportradar.com/uscommon/widgetloader","USW", {
        language: 'en_us'
    });
    USW('addWidget', '#sr-widget', 'us.betting.season.oddsComparison', {uniqueTournamentId: 132});
</script>
<div id="sr-widget"></div>

JS/Example of using Event Handlers

<script>
    (function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
    g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
    )})(window,document,"script","https://widgets.media.sportradar.com/uscommon/widgetloader","USW", {
        language: 'en_us'
    });
    USW('addWidget', '#sr-widget', 'us.betting.season.oddsComparison', {uniqueTournamentId: 132, onItemClick: function(type, obj){alert(JSON.stringify(obj));}});
</script>
<div id="sr-widget"></div>