Live Odds Message Format
The data we send to customers has three layers. First, the standard BEDEX DataProviderMessage envelope. Second, the LiveOddsUpdateMessage wrapper. Third, the payload of LiveOddsUpdateMessage, which contains odds updates (OddsUpdateMessage) and score updates (ScoreUpdateMessage).
This article explains the data format itself. You can download example messages here.
DataProviderMessage
{
"path": "replay/esports/lol/riot/superleague_lol/10476977477967401/10476977477967401/3e67fcc7-fd42-52b5-c84e-a093ffceee26",
"seqIdx": 100,
"timeSent": "2022-01-14T05:38:08.479411Z",
"payload": {...},
"version": "2.0"
}
DataProviderMessage is the topmost envelope included in all BEDEX messages. It contains several metadata fields.
| Field | Description | Type |
|---|---|---|
| path | The BEDEX identifier for the stream | String |
| seqIdx | A unique number that identifies the ordering of messages in each stream. seqIdx starts at 1 and is increased for each message | Integer |
| timeSent | UTC time when the message was originally sent by the data provider | ISO 8601 datetime |
| payload | Contains the LiveOddsUpdateMessage message | Object |
| version | DataProviderMessage structure version | String |
LiveOddsUpdateMessage
{
"version": "1.0",
"createdAt": "2022-05-01T00:00:00.00Z",
"updatedAt": "2022-05-02T00:00:00.00Z",
"provider": "otter",
"type": "odds",
"payload": {...}
}
The payload of a DataProviderMessage is a LiveOddsUpdateMessage, which includes the following fields.
| Field | Description | Type |
|---|---|---|
| version | LiveOddsUpdateMessage structure version | String |
| createdAt | date of when the first update for this match was created | ISO 8601 datetime |
| updatedAt | date of last update | ISO 8601 datetime |
| provider | odds provider’s name set by Bayes | String |
| type | scores or odds | String |
| payload | OddsUpdateMessage or ScoreUpdateMessage | Object |
OddsUpdateMessage
Full OddsUpdateMessage example
{
"metadata": {
"tournament": "esports:tournament:c0874279-09eb-4e55-ac0d-5b98fc198c05",
"match": "esports:match:030d603c-e62a-40ae-9f53-05af1172e50f",
"title": "csgo",
"participants": [
{"name": "team1", "id": "esports:team:3f222519-2242-4857-83ac-3f89ea2c1b9e", "type": "team"},
{"name": "team2", "id": "esports:team:af49ae8b-efd7-4b48-8e32-8f3917e84e09", "type": "team"},
{"name": "team3", "id": "esports:team:0b6a9f08-1a9a-44a0-897c-a5640f2ca53b", "type": "team"},
{"name": "player1", "id": "esports:player:c4530f27-6cd2-4427-a4a8-789cb0a51f28", "type": "player"}
]
},
"createdAt": "2023-03-13T15:16:55.344053",
"updatedAt": "2023-03-13T15:16:55.344053",
"type": "prematch",
"provider": "example_odds_provider",
"markets": [
{
"marketName": "match_winner",
"marketType": "2way",
"specifiers": {},
"outcomes": [
{
"outcome": "team1",
"decimalOdd": 1.6,
"tradingStatus": "open",
"won": false
},
{
"outcome": "team2",
"decimalOdd": 2.25,
"tradingStatus": "open",
"won": false
}
]
},
{
"marketName": "map_total_rounds",
"marketType": "overunder",
"specifiers": {
"mapNumber": 2,
"line": 28.5
},
"outcomes": [
{
"outcome": "over",
"decimalOdd": 2.9,
"tradingStatus": "open",
"won": false
},
{
"outcome": "under",
"decimalOdd": 1.38,
"tradingStatus": "open",
"won": false
}
]
}
]
}
If the type in LiveOddsUpdateMessage is odds, then the following OddsUpdateMessage fields will occupy the payload:
| Field | Description | Type |
|---|---|---|
| metadata | contains the fixture service PERIDs of the entities related to this match | Object |
| oddsType | odds type. Either prematch or live | String |
| markets | contains a list of all markets for a match | List of Objects |
NOTE: OddsUpdateMessages will always contain all markets that had been initialised for the match, including those that had been closed, settled, and canceled during the match.
metadata
{
...
"metadata": {
"tournament": "esports:tournament:627266ae-0552-5916-98ee-7529b0953184",
"match": "esports:match:2bb1497e-3290-5da7-9196-5d6db1bd8732",
"title": "csgo",
"participants": [
{"name": "team1", "id": "esports:team:3f222519-2242-4857-83ac-3f89ea2c1b9e", "type": "team"},
{"name": "team2", "id": "esports:team:af49ae8b-efd7-4b48-8e32-8f3917e84e09", "type": "team"},
{"name": "player1", "id": "esports:player:4c3352ee-cfcc-4f52-a34d-ad2005d7de06", "type": "player"}
]
},
...
}
The metadata object contains the fixture service PERIDs of the entities related to this match.
| Field | Description | Type |
|---|---|---|
| tournament | the tournament PERID | String |
| match | the match PERID | String |
| title | the title of the tournament | String |
| participants | PERIDs of the participating teams or players | List of Objects |
The participants list contains objects with the following fields:
| Field | Description | Type | Possible Values |
|---|---|---|---|
| name | the name of the participant (not the actual team name, please find it in the Fixture Service API) | String | e.g. team1, team2, player1,... |
| id | the PERID of the participant | String | e.g. esports:team:123-456-78-90 |
| type | the type of the participant | String | team, player |
markets
{
...
"markets": [
{
"marketName": "match_winner",
"marketType": "2way",
"specifiers": {},
"outcomes": [
{
"outcome": "team1",
"decimalOdd": 1.6,
"tradingStatus": "closed",
"won": true
},
{
"outcome": "team2",
"decimalOdd": 2.25,
"tradingStatus": "closed",
"won": false
}
]
},
...
]
...
}
The markets object contains a list of all markets for a match.
| Field | Description | Type |
|---|---|---|
| marketName | the market description | String |
| marketType | the market type | String |
| outcomes | the betting outcomes for this market | List |
| specifiers | additional details — can be player, team, mapNumber, line, etc | Object |
specifiers
The specifiers field provides key details that define the conditions of the betting
market, such as map number, line, round number, or player-specific information etc.
specifiers object
"specifiers": {
"mapNumber": 2,
"roundNumber": 2,
"halfNumber": 2,
"line": 1.0,
"team": "team1",
"player": "johndoe",
}
| Field | Description | Type |
|---|---|---|
| mapNumber | Specifies the number of the map in a series of games | Integer |
| roundNumber | Specifies the specific round within a map | Integer |
| line | Specifies the threshold for over/under or handicap markets | mixed: String, Float |
| team | Specifies a particular team, used in team-specific markets | String |
| player | Specifies a particular player, used in player-specific markets | String |
| halfNumber | Specifies which half of the game the market pertains to, used to determine outcomes within that segment | Integer |
ScoreUpdateMessage
Full ScoreUpdateMessage example
"metadata": {
"tournament": "esports:tournament:516155fd-9441-4805-87dd-6418a9842073",
"match": "esports:match:1aa0386d-2189-4cf6-8085-4c5ca0ac7621",
"title": "csgo",
"participants": [
{"name": "team1", "id": "esports:team:3f222519-2242-4857-83ac-3f89ea2c1b9e", "type": "team"},
{"name": "team2", "id": "esports:team:af49ae8b-efd7-4b48-8e32-8f3917e84e09", "type": "team"},
{"name": "team3", "id": "esports:team:0b6a9f08-1a9a-44a0-897c-a5640f2ca53b", "type": "team"},
{"name": "player1", "id": "esports:player:c4530f27-6cd2-4427-a4a8-789cb0a51f28", "type": "player"}
]
},
"matchStatus": "ONGOING",
"matchFormat": "bestOf",
"matchCurrent": 2,
"matchMax": 3,
"scores": [
{
"interval": "match",
"intervalNumber": null,
"scoreType": "maps",
"scores": [
{
"participant": "team1",
"score": 1
},
{
"participant": "team2",
"score": 1
}
]
},
{
"interval": "map",
"intervalNumber": 1,
"scoreType": "rounds",
"scores": [
{
"participant": "team1",
"score": 16
},
{
"participant": "team2",
"score": 12
}
]
},
{
"interval": "match",
"intervalNumber": null,
"scoreType": "kills",
"scores": [
{
"participant": "player1",
"score": 17
}
]
}
]
If the type in LiveOddsUpdateMessage is scores, then the following ScoreUpdateMessage fields will occupy the payload:
| Field | Description | Type |
|---|---|---|
| metadata | contains the fixture service PERIDs of the entities related to this match. | Object |
| matchStatus | current status of the match, ex. ONGOING | String |
| matchFormat | what kind of match is being played, ex. bestOf | String |
| matchCurrent | which match is currently being played, ex. 2 (out of 2 or more matches) | Integer |
| matchMax | the max number of matches that will be played | Integer |
| scores | current scores of the teams or players playing | List of Objects |
metadata
{
...
"metadata": {
"tournament": "esports:tournament:627266ae-0552-5916-98ee-7529b0953184",
"match": "esports:match:2bb1497e-3290-5da7-9196-5d6db1bd8732",
"title": "csgo",
"participants": [
{"name": "team1", "id": "esports:team:3f222519-2242-4857-83ac-3f89ea2c1b9e", "type": "team"},
{"name": "team2", "id": "esports:team:af49ae8b-efd7-4b48-8e32-8f3917e84e09", "type": "team"},
{"name": "player1", "id": "esports:player:4c3352ee-cfcc-4f52-a34d-ad2005d7de06", "type": "player"}
]
},
...
}
The metadata object contains the fixture service PERIDs of the entities related to this match.
| Field | Description | Type |
|---|---|---|
| tournament | the tournament PERID | String |
| match | the match PERID | String |
| title | the title of the tournament | String |
| participants | PERIDs of the participating teams or players | List of Objects |
The participants list contains objects with the following fields:
| Field | Description | Type | Possible Values |
|---|---|---|---|
| name | the name of the participant (not the actual team name, please find it in the Fixture Service API) | String | e.g. team1, team2, player1,... |
| id | the PERID of the participant | String | e.g. esports:team:123-456-78-90 |
| type | the type of the participant | String | team, player |
scores
{
...
"scores": [
{
"interval": "match",
"intervalNumber": null,
"scoreType": "maps",
"scores": [
{
"participant": "team1",
"score": 1
},
{
"participant": "team2",
"score": 1
}
]
},
...
]
...
}
The scores object provides a list of different score categories identified by interval, intervalNumber, and scoreType.
Each object within the scores list of a given category includes the following fields:
| Field | Description | Type | Possible Values |
|---|---|---|---|
| interval | the interval of the series | String | match, map, period |
| intervalNumber | the event number in a series of events | Integer | null in case of match interval, otherwise a number greater than zero |
| scoreType | what the integer score field represents | String | maps, rounds, goals |
| scores | a list of scores for each participant in the interval | List of Objects |
Examples of score categories are as follows:
interval: "match", intervalNumber: null, scoreType: "maps": The score of the match in terms of maps.interval: "map", intervalNumber: 1, scoreType: "rounds": The score of the first map in terms of rounds.interval: "match", intervalNumber: null, scoreType: "kills": The score of the match in terms of kills.interval: "map", intervalNumber: 1, scoreType: "kills": The score of the first map in terms of kills.interval: "period", intervalNumber: 1, scoreType: "goals": The score of the first period in terms of goals. (for titles like football)
Each score object in the scores list of a score category contains the following fields:
| Field | Description | Type | Possible Values |
|---|---|---|---|
| participant | the participant's name from the metadata object | String | e.g. team1,team2, player1,... |
| score | numeric score of the participant perticipant in the scoreType | Integer | e.g. 0, 1, 13,... |