Skip to main content

API Endpoint Refresh Intervals

Source: https://cricketapi.com/v5/api-endpoints-refresh-interval

Overview

Roanuz dynamically adjusts refresh intervals based on match state. Data verification workflows run at different frequencies depending on whether a match is live, upcoming, or completed.

Authentication

Refresh every 24 hours, or instantly upon InvalidAccessToken error.

Static Endpoints (24h refresh)

EndpointRefresh
Associations List24 hours
Country List24 hours
Venue List24 hours
Associations by Country24 hours
Country FlagsNever (static)
Featured Tournaments3 hours

Tournament Endpoints

ConditionRefresh
Live tournament or starting within 5 daysEvery 3 hours
All other tournamentsOnce daily at 8 PM GMT

Applies to: Featured Tournaments, Tournament Featured Matches, Tournament Fixtures, Tournament API, Tournament Tables, Tournament Team.

Match Endpoints

ConditionRefresh
Live Match (MG100)Every 5 seconds (or via Push API)
Live Match (MG101)Every 15 minutes (or via Push API)
Match Day (today's matches)Every 1 hour
Matches within 1 dayEvery 3 hours
Matches in 2-5 daysDaily at 4 PM GMT

Applies to: Featured Matches, Match API, Fixtures, Fantasy Credits/Points, Live/Pre-Match Odds.

Post-Match Validation

After match conclusion, one additional validation run finalizes: final scores, overs, player stats, points tables, and fantasy points.

Ball-by-Ball & Overs Summary

MG100 matches only. Live refresh: every 5 seconds (current over only).

Odds Endpoints

EndpointConditionRefresh
Live Match OddsLive Match (MG100)Every 5 seconds
Pre-Match OddsBefore Match DayOnce daily
Pre-Match OddsOn Match DayEvery 3 hours

Tournament Stats

ConditionRefresh
Live MatchEvery 10 minutes
Post-MatchOne final sync

Applies to both Tournament Stats and Tournament Player Stats.

Fantasy Endpoints

EndpointConditionRefresh
Fantasy PointsLive Match (MG100)Every 5 seconds
Fantasy PointsLive Match (MG101)Every 15 minutes
Fantasy CreditsToday or TomorrowEvery 3 hours
Fantasy Credits2-5 daysDaily at 4 PM GMT

Fixtures

Current month fixtures refresh every 3 hours. Live matches get one refresh after post-match validation.

Caching Recommendations

Roanuz includes a cache object in every API response with:

FieldDescription
cache.keyRecommended cache key to use
cache.expiresMaximum seconds to cache the response
cache.max_ageSeconds before you should check for updates (always < expires)
cache.etagETag for HTTP conditional requests

ETag Caching

Support ETag-based caching to reduce bandwidth:

  1. Store the etag from the response
  2. On next request, send If-None-Match: <etag> header
  3. If data hasn't changed, server returns 304 Not Modified (no body)
  4. If data changed, server returns 200 with new data and new etag

Hannibal Implementation

Current caching strategy (from RoanuzDataAdapter.ts):

DataHannibal TTLRoanuz Recommendation
Fixtures5min~3 hours
Match state (live)1minSeconds (match-time dependent)
Match state (completed)1hrHours/days
Scorecard (live)30sSeconds
Scorecard (completed)1hrHours/days
Ball-by-ball10s5s
Commentary30s~5s
Venue stats24hrN/A (computed)

Note: Hannibal caches slightly longer than Roanuz recommends for live data because WebSocket provides real-time updates. REST is used as a fallback/initial load.