# Sport event status

The sport\_event\_status is the element which provides information related to the status of the match and can be retrieved mainly in the summary and timeline end points.

Before providing the 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 end points.

In case of AMQP feed **4** status can be provided and they are sent in the odds\_change message:

* not\_started
* live
* ended
* closed

In the API many other status can be provided to identify the status of the match.

As the API can be slightly delayed compared to the odds\_change message, therefore, it is recommended that the client gives priority to the status provided in the odds\_change message.

Also in case of live matches, in general the odds\_change message contains the sport\_event\_status element: due to caching and timing differences the API and the odds\_change message can temporarily report a different status.

Priority should be always given to the odds\_change message.

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:

![](https://1868790214-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1KlIQPveu0EGYCTI8DL1%2Fuploads%2FGyPiRgUrdjq3FjMM7i3M%2F42696841.png?alt=media)

The following table shows all the possible attributes of the sport\_event\_status element in the API&#x20;

| 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                                                                                                                               | <p>string</p><p>example: "sr:competitor: 6237"</p>                                                                                                    |
| 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 inthe section dedicated to the status) | numeric value                                                                                                                                         |
| match\_status\_code | see dedicated paragraph below                                                                                                                                       | <p><br></p>                                                                                                                                           |

<br>

### Status <a href="#sporteventstatus-status" id="sporteventstatus-status"></a>

Going more into the detail of the status possible values:

| Value of the 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                       | <p><br></p>                                                                                                                                                                                                                                                                                                                |
| 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 element 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 <a href="#sporteventstatus-correspondencebetweenstatusandstatus_code" id="sporteventstatus-correspondencebetweenstatusandstatus_code"></a>

| 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                  | <p><br></p>  |

### Match\_Status\_Code <a href="#sporteventstatus-match_status_code" id="sporteventstatus-match_status_code"></a>

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

<br>

<br>

<br>

<br>
