<sport_event_status>

About <sport_event_status>

The <sport_event_status> element provides information related to the status of the match and can be retrieved mainly in the summary and timeline endpoints.

The following table describes the sport event's 'status' attributes in detail:

State

Description

not_started

The match has not started yet. (Alternatively, Betradar has no live coverage of the event, the match has started but we do not know this. The match will then move to closed when Betradar enters the match results)

live

The match is live

ended

The match has finished, but results have not been confirmed yet.

closed

The match is finished, results confirmed, and no more changes are expected to the results (only for events covered by pre-match producer).

cancelled

The sport event (either the actual match, or this Betradar representation of the match) has been cancelled

delayed

The sport event start has been delayed from scheduled start (most often seen for tennis).

interrupted

The sport event has been temporarily interrupted. Interruption is expected to be just a few minutes.

suspended

The sport event looks to be interrupted for a longer period than a few minutes

postponed

The sport event has been postponed and will be played at a later date. Typically, if the later date is more than 3 days away. This sport event id will be cancelled and replaced by a new id. If the match is postponed to just one or two days from now, the same sport-id will change its state just before match start.

abandoned 

Used to indicate that Betradar has no live coverage or has lost live coverage but match is still likely ongoing.

sport_event_status in AMQP Feed Vs API Endpoint

Before providing a description of its attributes, it is important to make a distinction between the sport event status provided in the AMQP feed and the one provided in the endpoints.

Note: The top 4 states (not_started, live, ended, closed) are the only event statuses that are being sent out in the odds_change message. The rest of the states are only available in the API.

Relationship to odds_change sport_event_status

Since API can be slightly delayed compared to the AMQP odds_change message, it is recommended that you give priority to the status provided in the AMQP odds_change message. (Here, AMQP>API)

When providing live odds for a live match, the odds_change message normally contains the sport_event_status element to provide an accurate representation of what the status was of the match when the odds were generated.

Due to caching and timing differences, the API and the odds_change message may temporarily report different values. For live matches the status as reported in the odds_change should always be used if available. The API is more likely to lag behind the odds_change message, but it could occasionally be ahead (The difference should always be less than a handful of seconds).

The difference

The odds_change message represents statuses using integer codes due to performance reasons, whereas in the API string representations of the statuses are provided for clarity. However, the meaning of the states is the same. In particular, for the status attribute the odds_change message uses only a few of the possible states available in the API, so the states in the API is a superset of those used in the odds_change message. The states not used in odds_change are typically stopped states where no live odds are provided, and hence no odds_change messages sent (states such as delayed, interrupted, postponed, cancelled, etc.).

Another important difference between the odds_change message and the API is that the odds_change message represents statuses using an integer code as shown below:

AggregateHomeScore/Away event

The aggregate_home_score and aggregate_away_score is present for two-legged ties (i.e. soccer). aggregate_*_score represents the total score for each team, summing up the results of the first and second match. Please note that aggregate_*_score is only present in the second match of the two-legged-tie-series

Sport event status in the API

Sport Event Status is an element provided in the summary and timeline endpoints in the API. Status is the only required attribute, this attribute describes the current status of the sport-event itself. This element contains the high-level status of the match including status, score etc.

Note: Sometimes live-only matches will never get the status element set to status=”closed” in the API, they will stay in status=”ended”. This is because matches are put in “closed” when production has prematch-resulted these matches. So therefor, if they are only live covered (see scope of the producers), they will never be “closed”, only “ended”.

Live and resulting information

Live Information: Live match information reports the current information about a particular ongoing match (only matches with status live, suspended, or ended should be here – status in closed could be temporarily present here).

Results information: Results information provides the same information as for live information, but only when the status of the match is closed (ID 4): sport_event_status status="4”.

XML Example

<sport_event_status home_score="130" away_score="122" status_code="4" match_status_code="110" status="closed" match_status="aet" winner_id="sr:competitor:3433">
      <period_scores>
        <period_score home_score="27" away_score="30" match_status_code="13" type="regular_period" number="1"/>
        <period_score home_score="29" away_score="31" match_status_code="14" type="regular_period" number="2"/>
        <period_score home_score="32" away_score="25" match_status_code="15" type="regular_period" number="3"/>
        <period_score home_score="29" away_score="31" match_status_code="16" type="regular_period" number="4"/>
        <period_score home_score="13" away_score="5" match_status_code="40" type="overtime" number="5"/>
      </period_scores>
      <results>
        <result home_score="117" away_score="117" match_status_code="100"/>
        <result home_score="130" away_score="122" match_status_code="110"/>
      </results>
</sport_event_status>

Attributes Explained

The following table shows all the possible attributes of the sport_event_status element in the API

Attribute

Meaning

Possible values

status

provides information related to the status of the match

not_started, match_about_to_start, postponed, delayed, cancelled, interrupted, suspended, abandoned, retired, ended, aet, match_after_penalties

home_score

provides score of the home team

numeric value

away_score

provides score of the away team

numeric value

winner_id

provides info about who the winner is

string

example: "sr:competitor: 6237"

status_code

0, 22, 60, 61, 70, 80, 81, 90, 92, 100, 110, 120 (correspondence between status and status_code is reported in table below in the section dedicated to the status)

numeric value

match_status_code

see dedicated paragraph below

status Attribute

The status attribute is an enumeration in the API and has a finite set of states as outlined in the state diagram below:

Going more into the detail of the status possible values:

Value of 'status' attribute

Description

Value of 'status' attribute

Description

not_started

match not started yet

match_about_to_start

match about to start

postponed

The sport event has been postponed and will be played at a later date. Tipically, if the later date is more than 3 days away, this sport event will be cancelled and replaced by a new id. If the match is postponed to just one or 2 days from now, the same sport id will change its state just before the match starts.

delayed

The sport event has been delayed from scheduled start (most often seen for tennis)

cancelled

The sport event (either the actual match, or sportradar representation ) has been cancelled.

interrupted

The sport event has been temporarily interrupted. Interruption is expected to be just a few minutes. Longer interruptions may lead to a match being suspended or possibly postponed.

suspended

The sport event looks to be interrupted for a longer period than just a few minutes.

abandoned

Used to indicate that Betradar has no live coverage ut match is still likely ongoing.

retired

ended

Match is over

aet

Match has ended after extra time

match_after_penalties

Match has ended with penalties

closed

The match is over, results are confirmed, no more changes are expected to the results.

Sometimes live-only matches will never get the status attribute set to status "closed", they will just stay in "ended" in the API. This is because matches are put in "Closed" when production has prematch-resulted these matches therefore, if the matches are only live covered, then they will never be "closed", only "ended".

Correspondence between 'status' and 'status_code' Attributes

status

status_code

not_started

0

match_about_to_start

22

postponed

60

delayed

61

cancelled

70

interrupted

80

suspended

81

abandoned

90

retired

92

ended

100

aet

110

match_after_penalties

120

closed

match_status_code Attribute

The match_status_code is an attribute which describes the phase the match is into and is different according to the sport taken into consideration.

The attached excel provides all possible values and meaning for the match_status_code:

match_status_codes.ods

Last updated

Was this helpful?