Build a live scoreboard
Turn event updates into a readable scoreboard that also handles quiet periods.
Load the day's fixtures
Start with the event list for one competition. Group rows by the reader's local date and key each row by event ID. For a scheduled game, show the start time alongside the two participants. For a final game, keep the result visible after it leaves a live-only collection. Events reference
Merge updates by ID
Use the live collection for competitions with in-game coverage. When evt_example_001 reappears, update the existing row. Assign its current scores directly. Adding each new score to the old one would count earlier scoring again.
Keep the last successful update time with the row. If a refresh fails, leave the existing score in place and let the reader see its age. When a game drops out of the live list, refresh its event detail to resolve its latest state. Live events · Event details
Share the polling work
Have a server-side job fetch each competition once per polling interval, then serve that snapshot to your viewers. Stop polling a competition when its games finish. Choose an interval that fits its coverage and your workspace limits. The reference and playground let you try the display logic with sample events. Playground
curl --request GET "https://api.precisesports.io/v1/events?competition=nba&status=in_progress" \
--header "Authorization: Bearer $PRECISEDATA_KEY"