XML Structure
Keep-AliveMessage
Message is the root of the XML, it is structured as follows:
Header
The header consists of general information, which can be later used as a reference. It is structured as follows:
Model
Element | Data Type | Description |
Events | Array | Array of Event |
KeepAlive | Array | An array of active events – all the events that are live at current time |
Events
An array of Event elements. Every Event element holds Fixture, Markets, and Livescore elements. It is structured as follows:
Example:
Model
Element | Data Type | Description |
Event.FixtureID | int | The unique ID of the fixture |
Note: Be advised that the above example is relevant for RMQ messages only, API message structure is slightly different, and does not include <Event> tag - see example below:
Fixture
The fixture element holds general data about the event.
Model
Element | Data Type | Description |
Fixture.LastUpdate | DateTime | Timestamp representing the last time the fixture was updated |
Fixture.ExternalProviderId | int | OPTIONAL: For your convenience, an ID of the fixture in a provider of your choosing |
Sport.Id | int | The unique ID of the sport |
Sport.Name | name | The name of the sport |
Location.Id | int | The unique ID of the location |
Location.Name | name | The name of the location |
League.Id | int | The unique ID of the league |
League.Name | name | The name of the league |
StartDate | DateTime | Timestamp representing the start date of the fixture |
Status | enum | The current status of the event |
FixtureExtraData | Array | Array of Data |
Participants | Array | Array of Participant |
Outright Fixture
The outright fixture is a part of the competition hierarchy as follow:
Note: The following format will not be sent for non-outright fixtures at this time.
Competition Model
Note: This element is resuscrive. Every Competition element can have a Competitions element. Please consider that the competitions are constructred dynamically - Structure may change.
Element | Data Type | Description |
Id | int | The ID of the competition |
Name | string | The name of the competition |
Type | int | The type of the competition element |
Competitions | List of competitions | Child competitions |
Outright Fixture Model
Element | Data Type | Description |
OutrightFixture.LastUpdate | DateTime | Timestamp representing the last time the fixture was updated |
OutrightFixture.ExternalProviderId | int | OPTIONAL: For your convenience, an ID of the fixture in a provider of your choosing |
Sport.Id | int | The unique ID of the sport |
Sport.Name | name | The name of the sport |
Location.Id | int | The unique ID of the location |
Location.Name | name | The name of the location |
StartDate | DateTime | Timestamp representing the start date of the fixture |
Status | enum | The current status of the event |
FixtureExtraData | array | Array of Data |
Participants | array | Array of Participant |
Outright League
The outright league is a part of the competition hierarchy as follow:
Note: The following format will not be sent for non-outright fixtures at this time.
Competition Model
Note: This element is resuscrive. Every Competition element can have a Competitions element. Please consider that the competitions are constructred dynamically - Structure may change.
Element | Data Type | Description |
Id | int | The ID of the competition |
Name | string | The name of the competition |
Type | int | The type of the competition element |
Competitions | List of competitions | Child competitions |
Outright League Model
Element | Data Type | Description |
OutrightFixture.LastUpdate | DateTime | Timestamp representing the last time the fixture was updated |
OutrightFixture.ExternalProviderId | int | OPTIONAL: For your convenience, an ID of the fixture in a provider of your choosing |
Sport.Id | int | The unique ID of the sport |
Sport.Name | name | The name of the sport |
Location.Id | int | The unique ID of the location |
Location.Name | name | The name of the location |
Status | enum | The current status of the event |
Participant
An element that represents a participant (player, team, horse, etc.) in the event.
Model
Element | Data Type | Description |
Id | int | The unique ID of the participant |
Name | string | The unique ID of the participant |
RotationId | int | The rotation ID of the participant |
Position | string | In 2-participant events the positions will be 1 (home) or 2 (away) For outright events the positions will represent the initial position of the participant |
IsActive | bool | Will only show in outright events. False if the participant is no longer active. For example: When a horse is set as non-runner |
ExtraData | array | Array of data |
Extra Data
Extra data is an array of Data elements, which provide additional information about their parenting element in a name-value structure.
Note: This section applies for all Extra Data elements – FixtureExtraData, ParticipantExtraData, LivescoreExtraData and so on.
Examples
LiveScore ExtraData
ExtraData Model
Source | Data Type | Description |
Value | string | Representing the extra data value |
Data.Name | string | The name of extra data field |
Markets
The market element is an array of Market elements. Every Market holds data regarding markets and bets.
Model
Element | Data Type | Description |
Market.Id | int | The unique ID of the market |
Market.Name | string | The name of the market |
Note: order of elements may change between different messages (e.g. bets order could be '1', 'x', '2' and in a future message could be '1', '2', 'x'
Provider
ProvidersEvery market holds an array of Providers. Under every Provider, there is data for the market and its bets, as they were received from that Provider.
Model
Element | Data Type | Description |
Id | int | The unique ID of the provider |
Name | string | The name of the provider |
LastUpdate | DateTime | Timestamp representing the time the provider’s data for the market was last updated |
ProviderFixtureId | string | OPTIONAL: The fixture ID, as shown by the provider |
ProviderLeagueId | string | OPTIONAL: The league ID, as shown by the provider |
ProviderMarketId | string | OPTIONAL: The market ID, as shown by the provider |
Bet
Every provider holds an array of bets. Every bet holds data as it was received from the provider. All the bets are a part of their Market ancestor (parent of Provider).
Model
Element | Data Type | Description |
Id | int | The unique ID of the bet |
Name | string | The name of the bet |
Line | string | The line of the bet |
BaseLine | string | The base line helps you group all bets that belong together. In the example above – all bets with the same base line (0:2) belong together |
Status | enum | The status of the bet |
StartPrice | double | The initial price of the bet, when it was first introduced |
Price | double | The price (odd) of the bet |
LayPrice | double | OPTIONAL |
PriceVolume | double | OPTIONAL |
LayPriceVolume | double | OPTIONAL |
Settlement | eunm | Represents how the bet was settled (resulted) |
ProviderBetId | string | OPTIONAL: The bet ID, as shown by the provider |
LastUpdate | DateTime | Timestamp representing the time the bet was last updated |
ParticipantId | int | OPTIONAL: Reference ID to the participant in the fixture
|
Livescore
The livescore element holds all scores and statistics:
Example 1
Example 2
Scoreboard
Scoreboard Model
All child nodes are an array of Score
Attribute | Data Type | Description |
Status | enum | The current status of the event |
Description | enum | Provides additional information regarding the current status of the game |
CurrentPeriod | enum | The type of the current period of the event |
Time | int | The current time of the event (should the sport support time) |
Score Model
Source | Data Type | Description |
Score | string | The score of a specific participant in a Scoreboard or Period element |
Score.Position | int | In 2-participant events the positions will be 1 (home) or 2 (away) For outright events the positions will represent the initial position of the participant |
Periods
Periods Model
All child nodes are an array of Period. Every Period represents a period (previous or current) during the live event.
Attributes | Data Type | Description |
Type | enum | The type of the period |
IsFinished | bool | Indicates whether the period is finished or not |
IsConfirmed | bool | Indicates whether the period and its scores is confirmed |
Note: Delivering the IsFinished as true and the IsConfirmed as false means we couldn't validate the final result of the specific period
Score Model
Source | Data Type | Description |
Score | string | The score of a specific participant in a Scoreboard or Period element |
Score.Position | int | In 2-participant events the positions will be 1 (home) or 2 (away) For outright events the positions will represent the initial position of the participant |
Incident Model
Every period element may contain a list of incidents (e.g. goals that were scored). Incidents will appear as long as we have the information.
Note: Incidents may be sent after a final status had been received.
Attributes | Data Type | Description |
Periods | enum | The type of the period, in which the incident had occurred |
Seconds | bool | Time of incident occurrence |
ParticipantPosition | bool | In 2-participant events the positions will be 1 (home) or 2 (away) For outright events the positions will represent the initial position of the participant |
PlayerName | string | The name of the player responsible for the incident |
Statistics
An array of Statistics. Every Statistic represents an individual statistic during the live event. All statistics show the current values as they are (without period breakdown).
Model
Attributes | Data Type | Description |
Type | enum | The type of the statistic |
Statistics Value
Source | Data Type | Description |
Value | string | The score of a specific participant in a Statistic element |
Value.Position | string | The position of the participant whom this statistic value references to. In 2-participant events the values will be 1 (home) or 2 (away). In outright events, the positions will hold the actual position of the participants |
Livescore important notes
Periods, scores, statistics, and time MAY be reverted due to mistakes made by the data providers.
The current total score of the event can be found under the Scoreboard element. The score for every individual period can be found within the Period elements.
Note: Every period contains the score relevant to that period alone
As a part of our data quality improvement, new periods and statistical types may be added all the time. Make sure your system is dynamic enough to cope with unidentified types.
A loss of coverage will occur if we are not able to provide data for an event due to technical difficulties or faulty data.
Note: Should a loss of coverage occur – all bets will be suspended.
There are several events that we are offering live up to 30 minutes before the event’s actual start time. Those events will be sent with the status “9”, which indicates that the event is about to start. The status is the attribute of the Scoreboard element.
The period type “80” stands for “BreakTime”. This period applies to ANY break during the live event. The type of the break will be in the Description attribute of the Scoreboard element, as seen below:
Football
Time
Time direction will be ascending until the end of the half.
During halftime, the time will always be 2700 seconds.
During overtime halftime, the time will always be 6300 seconds.
When the event is finished (without overtime), the time will always be 5400 seconds.
When the event is finished (after overtime), the time will always be 7200 seconds.
During penalties, there will be no time available.
Basketball
Time
Time direction will be descending or increasing, depending on the information received.
At the end of every period, the time will be set to 0 (for the descending clock) or 10\12 mins (for the increasing clock).
Periods
During NCAA events (College male basketball), the periods will show as halves (10 – 1st Half, 20 – 2nd Half) instead of quarters as usual.
Tennis
Periods
When the Tennis match is finished, the period “60” (Game period) will be removed as it is no longer relevant.
The serving player will appear under the ExtraData element, within the “Turn” key. The possible values are 1 or 2 (according to the participant's position).
Keep Alive
Keep alive messages contain an array of fixture IDs. These IDs are of the events that are live.
Note: When there are no events available (no orders/no live events), an empty KeepAlive message will be sent.
Example
Model
Attributes | Data Type | Description |
ActiveEvent | int | FixtureId of a live event |
Heartbeat
Heartbeat messages will be sent every 5 seconds and they can be used to make sure that your connection is still alive.
Note: Heartbeat messages are without Body (only Header)
Example
Last updated