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)
| Endpoint | Refresh |
|---|---|
| Associations List | 24 hours |
| Country List | 24 hours |
| Venue List | 24 hours |
| Associations by Country | 24 hours |
| Country Flags | Never (static) |
| Featured Tournaments | 3 hours |
Tournament Endpoints
| Condition | Refresh |
|---|---|
| Live tournament or starting within 5 days | Every 3 hours |
| All other tournaments | Once daily at 8 PM GMT |
Applies to: Featured Tournaments, Tournament Featured Matches, Tournament Fixtures, Tournament API, Tournament Tables, Tournament Team.
Match Endpoints
| Condition | Refresh |
|---|---|
| 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 day | Every 3 hours |
| Matches in 2-5 days | Daily 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
| Endpoint | Condition | Refresh |
|---|---|---|
| Live Match Odds | Live Match (MG100) | Every 5 seconds |
| Pre-Match Odds | Before Match Day | Once daily |
| Pre-Match Odds | On Match Day | Every 3 hours |
Tournament Stats
| Condition | Refresh |
|---|---|
| Live Match | Every 10 minutes |
| Post-Match | One final sync |
Applies to both Tournament Stats and Tournament Player Stats.
Fantasy Endpoints
| Endpoint | Condition | Refresh |
|---|---|---|
| Fantasy Points | Live Match (MG100) | Every 5 seconds |
| Fantasy Points | Live Match (MG101) | Every 15 minutes |
| Fantasy Credits | Today or Tomorrow | Every 3 hours |
| Fantasy Credits | 2-5 days | Daily 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:
| Field | Description |
|---|---|
cache.key | Recommended cache key to use |
cache.expires | Maximum seconds to cache the response |
cache.max_age | Seconds before you should check for updates (always < expires) |
cache.etag | ETag for HTTP conditional requests |
ETag Caching
Support ETag-based caching to reduce bandwidth:
- Store the
etagfrom the response - On next request, send
If-None-Match: <etag>header - If data hasn't changed, server returns
304 Not Modified(no body) - If data changed, server returns
200with new data and new etag
Hannibal Implementation
Current caching strategy (from RoanuzDataAdapter.ts):
| Data | Hannibal TTL | Roanuz Recommendation |
|---|---|---|
| Fixtures | 5min | ~3 hours |
| Match state (live) | 1min | Seconds (match-time dependent) |
| Match state (completed) | 1hr | Hours/days |
| Scorecard (live) | 30s | Seconds |
| Scorecard (completed) | 1hr | Hours/days |
| Ball-by-ball | 10s | 5s |
| Commentary | 30s | ~5s |
| Venue stats | 24hr | N/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.