Event Object (Prematch)
| Field | Type | Description |
|---|
id | number | Event ID — use with Event Detail. |
sportId | number | Sport ID. |
leagueId | number | League ID. |
leagueName | string | League display name. |
homeTeam / awayTeam | string | Team names. |
homeTeamId / awayTeamId | number | Team IDs. |
homeImage / awayImage | string | null | Team logo URLs. |
startTime | number | Unix timestamp (seconds). |
startTimeISO | string | ISO 8601 datetime, e.g. "2026-06-21T16:00:00.000Z". |
marketCount | number | Total betting markets available. |
winProbability | object | null | { P1, PX, P2 } home / draw / away (0–1). |
venue | string | null | Stadium / venue name. |
round | string | null | Round info. |
odds | object | Pre-parsed main odds — see below. |
Odds Object
| Field | Type | Example |
|---|
odds.1x2 | object | { home: 1.107, draw: 11.8, away: 36 } |
odds.double_chance | object | { "1X": 1.001, "X2": 1.063, "12": 8.1 } |
odds.totals | object | { "over_2.5": 3.02, "under_2.5": 1.42 } |
odds.btts | object | { yes: 1.44, no: 2.75 } |
odds.draw_no_bet | object | { home: 1.375, away: 3.1 } |
odds.handicap | array | [{ type: "home", line: -2.5, odds: 1.782 }] |
Live Event Object
Extends the prematch Event Object with:
| Field | Type | Description |
|---|
isLive | boolean | Always true for live events. |
score | object | { home, away } current full-time score. |
periodScores | array | [{ period, name, home, away }]. |
currentPeriod | number | Current period number. |
currentPeriodName | string | e.g. "1st half", "Half Time", "Extra Time". |
timerSeconds | number | null | Match clock in seconds. |
timerMinutes | number | null | Match clock in minutes. |
info | string | null | Extra info ("Penalties 3-2", "Delayed"). |
hasVideo | boolean | Stream availability flag. |
videoId | string | null | Stream identifier. |
stats | array | Live match statistics (only on /live/leagues/{id}). |
Caching Behavior
| Endpoint | TTL |
|---|
/api/v1/sports | 600 s |
/api/v1/sports/{id}/leagues | 300 s |
/api/v1/events/top, /api/v1/leagues/{id}/events | 30 s |
/api/v1/event/{id} | 60 s |
/api/v1/live/sports | 10 s |
/api/v1/live/events, /api/v1/live/leagues/{id} | 5 s |
/api/v1/live/event/{id} | 5 s |
Cache is in-memory with LRU eviction (max 500 entries). Stale entries trigger a fresh upstream fetch — stale data is never served.
Error Handling
Standard error response:
{ "error": "Error message here" }
| HTTP | Meaning |
|---|
| 200 | Success |
| 400 | Bad request (missing or invalid parameters) |
| 401 | Unauthorized (missing or invalid x-api-key) |
| 404 | Endpoint not found |
| 500 | Internal server error (upstream failure) |
Empty data is not an error. A sport with no live events returns { "data": [], "count": 0 }.