Markets Leaderboard
Golf Event Centre now supports the integration of bookmaker markets within the leaderboard. Operators can transmit market data to the Event Centre using the FRS.js message bus functionality outlined below.
The UI dynamically updates markets in real time and when a customer selects an option, the Event Centre emits an event, which the operator can listen to for processing into their betslip.

Emitting
The emit method is available on the return value from the eventCentre initialiser, it is used to send messages to the Event Centre. Only supported message topics will be passed to the Event Centre.
Message Types for Golf Event Centre
Markets Update
ec.emit(markets-update, messageData)
Initial Market Load:
On the first load, send us all available markets along with their player options. This ensures we have a complete starting dataset.
Handling Updates:
Future updates can either include the entire dataset (full payload) or only the updates.
Updates are applied by matching the market ID first, then the player ID within that market. If an existing market or player option is found, it will be overwritten with the new data.
Adding New Markets or Players:
If a market ID or player ID doesn’t already exist in our system, it will be added automatically.
Suspending/Unsuspending Markets:
You can suspend or unsuspend an entire market or specific player option within a market at any time.
UI Behavior for Multiple Markets:
If multiple markets are provided, a dropdown menu will be displayed, allowing users to switch between them. The first market in the list will be selected by default.
If only one market is provided, its title will simply be displayed in the leaderboard header without a dropdown.
Market Object:
id
unique identifier for a market - used to add/apply updates
title
Name of Market that will be shown on GEC UI
suspended
true/false
suspends all players options within this market
Options array:
id
unique to operator - we will emit this upon any user clicks
playerId
used to add/apply updates (this is the DDE playerId)
title
Market Title
odds
fractional
decimal
american
you can specify the odds format to display in the I via the existing FRS.js option (oddsFormat)
suspended
true/false
suspend individual player option
marketDirection
default lengthening shortening
if 'lengthening' or 'shortening' are provided as values then we will animate the odds button accordingly. If this field is omitted the GEC will take responsibility for calculating the animation.
Sample code:
Market Suspend
This update allows you to suspend markets or specific player options within markets. You can choose to suspend entire markets (including all associated player options) or target specific player options within a market for suspension.
Suspending Entire Markets
If you provide only market IDs, the system will suspend those markets along with all their player options.
Suspending Specific Player Options
If you include player IDs alongside market IDs, the system will locate the specified markets and suspend only the player options that match the given player IDs.
marketIds
suspends entire market.
playerIds
suspends an individual player option in market id.
Sample code:
Remove Markets
ec.emit(markets-remove, messageData)
This update allows you to remove markets or specific player options within markets. You can choose to remove entire markets (including all associated player options) or target specific players within a market for removal.
Removing Entire Markets
If you provide only market IDs, the system will remove those markets along with all their player options.
Removing Specific Player Options
If you include player IDs alongside market IDs, the system will locate the specified markets and remove only the player options that match the given player IDs.
marketIds
removes entire market
playerIds
removes an individual player option from market id '1'.
Sample code:
Bet Placement Event
This event notifies the operator when a user selects an odds option. The operator must listen for it and use the provided payload to handle the selection on their betslip.
Triggering the Event
When a user clicks on an odds button, the Event Centre will emit this event.
Operator Responsibility
The operator must listen for this event to process the selection.
Payload Handling
The emitted event includes a payload (detailed below) that the operator can use to add the selection to their betslip.
Sample code:
Last updated
Was this helpful?