How to manage timer update by our API

Question: Is there a way to update the timer during the live event?

 

Step-by-step guide: Statscore do not send messages every second of the match to avoid generating hundreds of unnecessary, empty messages where only the match time changes. Instead, we send messages only when there is a change in any statistic or when a match incident occurs, such as a goal, corner, change of ball possession, throw-in, etc.

 

If you want to maintain continuous time tracking on your end, you can update it independently based on our feed.

 

The exact start time of each half is provided in the events.show endpoint within the event details (ids: 19 and 20, example below). Based on this, you can calculate the half-time durations yourself to always have them up-to-date.

 

Another approach is calculating the time from the "1st half started" incident to the "halftime" incident, and from the "2nd half started" incident to the match-ending incident.

 

Yet another option is querying our API every few seconds, also via the events.show endpoint, and checking the current value of the "played_time" field, which shows the number of seconds elapsed in the match.

 

The mentioned endpoint:


event_details node:

{ "id": 19, "name": "First half start date", "value": "2024-12-09 12:20:07" }, { "id": 20, "name": "Second half start date", "value": "2024-12-09 13:25:37" }