Skip to main content

3.4 Events

This is the endpoint that publishes your events, and the one MollyBet calls most often. Everything we can bet on comes from here.

3.4.1 List events and offers

Method and URL:

GET /events?type=<type>&limit=<limit>

Request Parameters:

type [ string ] (required):

One of live, today or early. Each is polled at a different rate.

limit [ integer ] (optional, default: 1000):

How many results to return per page.

The three types partition your events by when they take place:

TypeMeaning
liveEvents currently in-play.
todayEvents happening today, but not in-play.
earlyEvents happening tomorrow onwards.

Return Data: a paginated envelope whose results array contains events. Each event is either a normal event or a special event.

3.4.2 Normal events

A normal event is a two-sided contest with a home and an away side.

sport [ string ]:

One of the supported sports.

league [ object ]:

An object with a name and an id. See Names and IDs.

start_time [ string ]:

The start time of the event, in UTC ISO 8601.

home [ object ]:

An object with a name and an id, describing the home side. In tennis, player 1. See Names and IDs.

away [ object ]:

An object with a name and an id, describing the away side. In tennis, player 2. See Names and IDs.

offers [ array ]:

The markets and prices available on this event. See Offers.

Example:

{
"sport": "fb",
"league": {"name": "Spain | La Liga", "id": 16},
"start_time": "2024-04-13T16:30:00+00:00",
"home": {"name": "Real Mallorca", "id": 181},
"away": {"name": "Real Madrid", "id": 178},
"offers": [
{
"bet_type": "for,ah,h,-10",
"selection_id": "2024-04-13,181,178|28276122|181|for",
"quotes": [
{"price": 2.345, "min_stake": ["EUR", 1.01], "max_stake": ["EUR", 500.02]},
{"price": 2.213, "min_stake": ["EUR", 1.02], "max_stake": ["EUR", 411.43]},
{"price": 2.102, "min_stake": ["EUR", 1.29], "max_stake": ["EUR", 28.44]}
]
},
{
"bet_type": "for,ah,a,-10",
"selection_id": "2024-04-13,181,178|28276122|178|for",
"quotes": [
{"price": 1.938, "min_stake": ["EUR", 10.21], "max_stake": ["EUR", 9281.32]}
]
}
]
}

3.4.3 Special events

A special event is a multirunner competition with an outright winner market — horse racing, golf, a championship outright etc. Instead of home and away it carries a list of runners and an event name.

runners [ array ]:

Objects with a name and an id, one per runner.

event [ string ]:

The name of the event, for example 19:04 Keeneland or LaLiga.

For championships that run over a long period — English Premier League, UEFA Champions League, German Bundesliga, US Masters, etc. — truncate start_time to the beginning of the year, in the form <year>-01-01T00:00:00+00:00.

Offers on special events use the multirunner bet types, which name the runner in full.

Example:

{
"sport": "horse",
"league": {"name": "USA | Keeneland", "id": null},
"start_time": "2024-04-13T19:04:00+00:00",
"runners": [
{"name": "Neon Icon", "id": null},
{"name": "Kara And Colleen", "id": null},
{"name": "Streetwhereyoulive", "id": null},
{"name": "A Dollar A Day", "id": null}
],
"event": "19:04 Keeneland",
"offers": [
{
"bet_type": "unparsed,multirunner,for,win,A Dollar A Day",
"selection_id": "2024-04-13,multirunner,100087829|27286133|9966|for",
"quotes": [
{"price": 2.312, "min_stake": ["EUR", 1.08], "max_stake": ["EUR", 500.06]},
{"price": 2.298, "min_stake": ["EUR", 1.09], "max_stake": ["EUR", 411.41]}
]
}
]
}

3.4.4 Names and IDs

League and team names may be your own internal names. They need to be consistent between polls and descriptive enough for us to associate them with the events in our system.

IDs are the opposite. Where you supply an id, it must be a MollyBet ID, obtainable from the MollyBet API data feeds — never your own internal identifier. IDs are optional: if you do not have the MollyBet ID for a league, side or runner, send null.

If you need to attach your own identifiers to an event, put them in the selection_id of each offer. Those are passed back to you unchanged when we place a bet.

3.4.5 Offers

Each entry in offers describes one selection and the prices available on it.

bet_type [ string ]:

The market and selection, encoded as described in Bet Types.

selection_id [ string ]:

A string uniquely identifying this selection. See Selection ID.

quotes [ array ]:

The available prices and the liquidity at each. The quotes must be in descending order with respect to price.

A quote is a price together with the minimum and maximum stake accepted at that price:

{"price": 2.345, "min_stake": ["EUR", 1], "max_stake": ["EUR", 500]}

Prices and stakes belong here. If your odds move faster than we poll this endpoint, also implement /price_and_stake, which we call at a rate agreed with you.