Skip to Content
API ReferenceBatch Odds

Batch Odds

Fetch odds for multiple events in a single request. This avoids making separate API calls for each event, reducing latency and rate limit consumption.

POST /api/v1/odds/batch

Authentication

Requires API key. Available to all tiers.

Request Body

Send a JSON body with the following fields:

FieldTypeRequiredDescription
event_idsstring[]YesArray of event IDs to fetch odds for
sportsbookstringNoSingle sportsbook ID filter (defaults to all available for your tier)
marketstringNoSingle market type filter (defaults to all)

Batch Limits by Tier

The maximum number of events per batch request depends on your tier:

TierMax Events per Batch
Free10
Hobby10
Pro50
Sharp50
Enterprise100

Exceeding the batch limit for your tier will return a 400 invalid_request error. Split large requests into multiple batches if needed.

Example Requests

curl -X POST "https://api.sharpapi.io/api/v1/odds/batch" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "event_ids": ["evt_nba_lal_bos_20260126", "evt_nba_gsw_mia_20260126"], "sportsbook": "draftkings", "market": "moneyline" }'

Response

Success (200)

{ "success": true, "data": { "events": [ { "event_id": "evt_nba_lal_bos_20260126", "event_name": "Los Angeles Lakers @ Boston Celtics", "sport": "basketball", "league": "nba", "start_time": "2026-01-26T19:30:00Z", "is_live": false, "odds": [ { "sportsbook": "draftkings", "market_type": "moneyline", "selection": "Boston Celtics", "selection_type": "home", "odds_american": -210, "odds_decimal": 1.476, "line": null, "timestamp": "2026-01-26T10:15:00.000Z" }, { "sportsbook": "draftkings", "market_type": "moneyline", "selection": "Los Angeles Lakers", "selection_type": "away", "odds_american": 175, "odds_decimal": 2.75, "line": null, "timestamp": "2026-01-26T10:15:00.000Z" } ] }, { "event_id": "evt_nba_gsw_mia_20260126", "event_name": "Golden State Warriors @ Miami Heat", "sport": "basketball", "league": "nba", "start_time": "2026-01-26T20:00:00Z", "is_live": false, "odds": [ { "sportsbook": "draftkings", "market_type": "moneyline", "selection": "Miami Heat", "selection_type": "home", "odds_american": -130, "odds_decimal": 1.769, "line": null, "timestamp": "2026-01-26T10:15:05.000Z" } ] } ], "missing_events": [] }, "meta": { "requested": 2, "found": 2, "missing": 0, "max_batch": 50, "filters": { "sportsbook": "draftkings", "market": "moneyline" }, "updated_at": "2026-01-26T10:15:05.000Z" } }

Response Headers

X-RateLimit-Limit: 300 X-RateLimit-Remaining: 296 X-RateLimit-Reset: 1737853200 X-Data-Delay: 0 X-Request-Id: req_batch_abc123

Error Responses

400 Batch Limit Exceeded

{ "error": { "code": "invalid_request", "message": "Batch limit exceeded. Your tier (hobby) allows 10 events per batch, but 25 were requested.", "docs": "https://sharpapi.io/docs/api-reference/odds-batch" } }

400 Missing Events Field

{ "error": { "code": "invalid_request", "message": "The 'event_ids' field is required and must be a non-empty array of event IDs.", "docs": "https://sharpapi.io/docs/api-reference/odds-batch" } }

401 Unauthorized

{ "error": { "code": "unauthorized", "message": "Invalid or missing API key", "docs": "https://sharpapi.io/docs/authentication" } }

Response Structure

The batch response nests events and missing IDs under data, with counts in meta:

Data Object

FieldTypeDescription
data.eventsEventOdds[]Array of event objects with nested odds
data.missing_eventsstring[]Event IDs that were not found or had no odds

Meta Object

FieldTypeDescription
meta.requestedintegerNumber of event IDs in your request
meta.foundintegerNumber of events that had odds data
meta.missingintegerNumber of events not found
meta.max_batchintegerMaximum batch size for your tier
meta.filtersobjectApplied filters (sportsbook, market)

If an event ID in your request has no odds (e.g., the event has ended or doesn’t exist), it will appear in data.missing_events rather than causing an error. The response will still include odds for all valid events.

Response Schema

Each item in the data.events array is an event object with nested odds:

Event Object

FieldTypeDescription
event_idstringEvent identifier
event_namestringHuman-readable event name
sportstringSport slug
leaguestringLeague slug
start_timestringISO 8601 event start time
is_livebooleanWhether event is live
game_stateobject | undefinedLive game state (only for live events with scores)
oddsarrayArray of odds for this event

Odds Object (nested in event)

FieldTypeDescription
sportsbookstringSportsbook ID
market_typestringMarket type
selectionstringSelection name
selection_typestringhome, away, over, under
odds_americannumberAmerican odds
odds_decimalnumberDecimal odds
linenumber | nullLine value
timestampstringWhen odds were last updated

Use Cases

Pre-game Odds Loading

Load odds for an entire day’s slate in a single call instead of making dozens of individual requests:

# Get all NBA event IDs from the events endpoint events_response = requests.get( 'https://api.sharpapi.io/api/v1/events', params={'league': 'nba', 'limit': 50}, headers={'X-API-Key': 'YOUR_API_KEY'} ) event_ids = [e['id'] for e in events_response.json()['data']] # Batch fetch all odds at once odds_response = requests.post( 'https://api.sharpapi.io/api/v1/odds/batch', headers={'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json'}, json={'event_ids': event_ids} )

Dashboard Refresh

Periodically refresh odds for events a user is watching:

async function refreshWatchlist(eventIds) { const response = await fetch('https://api.sharpapi.io/api/v1/odds/batch', { method: 'POST', headers: { 'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ event_ids: eventIds }) }); const { data, meta } = await response.json(); if (data.missing_events.length > 0) { console.warn('Missing events:', data.missing_events); } return data.events; }
  • Odds Snapshot - Get odds with flexible query filters
  • Best Odds - Get best odds across books per selection
  • Events - List events to get event IDs for batch requests
Last updated on