Skip to content

Sportsbook widget

The widget is a strip of match cards for your lobby, home page or a game page: competition, live clock and score (or kick-off time), team crests and the main market’s prices, all updated live. It is a separate page of the sportsbook (/widget), framed like the sportsbook, with the same parameters plus a few of its own.

A click never places a bet inside the widget. As with the widgets of the large sportsbook suppliers, it takes the player to your sportsbook page with the event open and, for a price, that selection already on the slip. The player confirms the stake there, logged in through your usual launch.

The player clicks The sportsbook opens at On the slip
A price (1, X, 2) /event/{eventId} That selection
The match or More bets /event/{eventId} Nothing new
See all /live, /live/{sport}, /sport/{sport}, /competition/{id} or / (from the widget’s filters) Nothing new
<div id="live-strip"></div>
<script src="https://api.orbisportbook.com/embed/v1.js"></script>
<script>
OrbiSportbook.mountWidget('#live-strip', {
url: 'https://api.orbisportbook.com',
tenant: 'your-tenant',
type: 'live',
sport: ['football', 'basketball'],
locale: 'pt-BR',
link: '/esportes', // your sportsbook page
});
</script>

The widget grows to its content (height: 'auto', no inner scrollbar): about 220 px for a carousel with the title row, 180 px without it.

On your sportsbook page, mount() needs nothing new: it reads ob_path and ob_select from the page’s address, where the click lands (see the click).

// https://www.your-casino.example/esportes?ob_path=%2Fevent%2Fev_123&ob_select=ev_123%2F1x2%2Fhome
OrbiSportbook.mount('#sportsbook', { url, tenant, launchToken }); // opens /event/ev_123 with the home win on the slip

mountWidget(target, options) returns the same instance as mount() (setLocale, setOverrides, on, destroy…).

Option Type
url, tenant string As in mount(). Required.
type 'top' | 'live' | 'upcoming' | 'featured' live: matches in play. upcoming: the next 48 hours, ranked leagues first. featured: your featured coupons (Back office › Content). top (default): live first, then featured, then upcoming, so the widget is never empty while there is anything to bet on.
sport string[] Sport ids, in your order, e.g. ['football', 'basketball']. Default every sport.
competition string[] Competition ids, e.g. ['br-serie-a'].
event string[] Exactly these events, in this order (type is ignored). Finished ones drop out.
limit number 1 to 30 cards. Default 10.
layout 'carousel' | 'list' | 'grid' carousel (default): one row that scrolls sideways (swipe; arrows on desktop). list: one card per row, for a side column. grid: as many columns as fit.
header boolean false hides the widget’s title row (title, arrows, See all) when your page has its own heading.
heading string Text of the title row, at most 60 characters. Default by type and language: Live, Upcoming, Featured.
link string Your sportsbook page, absolute or relative to your page, e.g. '/esportes'. It must be on your page’s origin or one of your allowed origins; anything else is ignored. Default: the page of your Share URL (Back office › Integration › Share link) without its {code} parameter.
scheme 'light' | 'dark' The brand’s light or dark palette, for brands that have both, to match your page.
background boolean true paints the brand background. Default transparent: your page shows through and the title becomes a chip, readable on any background.
locale, currency, overrides, displayCurrency, title As in mount(). overrides can restyle the widget (theme tokens).
height 'auto' | 'fill' Default auto. With fill the widget fills its container and a list scrolls inside it.
minHeight number auto mode: height until the first resize. Default 220.
onOpenSportsbook function You open the sportsbook yourself, see the click. Given, the widget never navigates.
onWidgetCount function { count }: how many matches it shows, on load and on every change. Hide your section on 0.
onReady, onResize, onError, onEvent function As in mount().

Frame /widget with the same parameters as the sportsbook’s raw iframe (tenant, locale or lang, currency, height, origin) plus the widget’s:

<iframe title="Live matches" style="width: 100%; height: 220px; border: 0"
src="https://api.orbisportbook.com/widget?tenant=your-tenant&type=live&sport=football,basketball&locale=pt-BR&link=https%3A%2F%2Fwww.your-casino.example%2Fesportes"></iframe>
Parameter
type top (default), live, upcoming or featured.
sport, competition, event Comma-separated ids.
limit 1 to 30. Default 10.
layout carousel (default), list or grid.
header 0 hides the title row.
title Text of the title row.
link Your sportsbook page (URL-encoded), on your page’s origin or an allowed origin.
open host: your page handles open_sportsbook and the widget never navigates.
scheme light or dark.
bg brand paints the brand background. Default transparent.

Invalid values fall back to the defaults: the widget always shows something. A fixed height works best with a carousel (220 px with the title row, 180 px without); with height=auto set the iframe’s height from the resize event, as the SDK does.

On your sportsbook page, pass ob_path and ob_select from your page’s address to the sportsbook iframe as path and select:

const q = new URLSearchParams(location.search);
const src = new URL('https://api.orbisportbook.com/');
src.searchParams.set('tenant', 'your-tenant');
src.searchParams.set('launch', launchToken);
if (q.get('ob_path')) src.searchParams.set('path', q.get('ob_path'));
if (q.get('ob_select')) src.searchParams.set('select', q.get('ob_select'));
document.getElementById('sb').src = src.href;

By default the widget takes the whole tab to your sportsbook page (link, or your Share URL’s page) with two query parameters:

Parameter
ob_path The deep link to open, e.g. /event/ev_oo_123.
ob_select Outcome ids to put on the slip (a price click: one), comma separated.

It also sends open_sportsbook to your page:

{ path: '/event/ev_oo_123', selections: ['ev_oo_123/1x2/home'], eventId: 'ev_oo_123', odds: 2.15,
url: 'https://www.your-casino.example/esportes?ob_path=%2Fevent%2Fev_oo_123&ob_select=ev_oo_123%2F1x2%2Fhome' }

To open the sportsbook yourself (a single-page app that changes view without a reload, a modal, analytics before leaving), pass onOpenSportsbook (or open=host on a raw iframe). The widget then only sends the event:

OrbiSportbook.mountWidget('#live-strip', {
url, tenant,
onOpenSportsbook: ({ path, selections }) => {
router.push('/esportes');
sportsbook.destroy?.();
sportsbook = OrbiSportbook.mount('#sportsbook', { url, tenant, launchToken, path, selections });
},
});

mount() takes selections (outcome ids, at most 10) next to path. The sportsbook loads each selection’s event, adds the ones still open to the slip and opens it; a price that moved meanwhile is re-priced by the slip as usual (the price on the card is indicative). A suspended or closed selection is skipped.

The widget needs no launch token and shows no balance: it is the same for every visitor. Do not pass it the player’s launch token (tokens are single use: the sportsbook iframe needs its own). The player logs in where they bet, in the sportsbook, as today.

The widget uses your brand’s theme (Back office › Branding): brand and accent colours, odds buttons, radius and font, so it matches your sportsbook. Its background is transparent by default. To restyle it for one page, pass theme tokens in overrides, as for the sportsbook (launch overrides).

Besides ready, resize and error, a widget sends:

Event Payload When
open_sportsbook { path, selections, eventId?, odds?, url? } The player clicked a price, a match, More bets or See all. url is your page with ob_path and ob_select when the widget knows it.
widget_count { count } How many matches it shows: once loaded, then on every change.

See the postMessage reference.