API Reference
Complete reference documentation for all API endpoints. Every endpoint includes parameters, examples, and response formats.
Base URL
https://odds-marketplace.onrender.com/api/v1/nba/odds/leaguesRetrieve a list of available sports leagues
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
league_id | integer | Optional | Filter by specific league ID |
sport | string | Optional | Filter by sport name (e.g., 'NBA', 'NFL') |
is_active | boolean | Optional | Filter by active status |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/leagues?sport=NBA/api/v1/nba/odds/teamsGet a list of teams for specified leagues
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
league_id | integer | Optional | Filter by league ID |
team_id | integer | Optional | Filter by specific team ID(s), comma-separated |
conference | string | Optional | Filter by conference (e.g., 'Eastern', 'Western') |
division | string | Optional | Filter by division |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/teams?league_id=1/api/v1/nba/odds/gamesRetrieve game schedules and information
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (YYYY-MM-DD) | Optional | Get games for a specific date |
start_date | string (YYYY-MM-DD) | Optional | Start date for date range query |
end_date | string (YYYY-MM-DD) | Optional | End date for date range query |
league_id | integer | Optional | Filter by league ID |
game_id | integer | Optional | Filter by specific game ID(s) |
team_id | integer | Optional | Filter by team ID(s) |
status | string | Optional | Filter by game status (scheduled, live, finished) |
include_markets | boolean | Optional | Include market data in response (default: true) |
include_boxscore | boolean | Optional | Include boxscore data if available (default: true) |
limit | integer | Optional | Number of results per page (default: 100, max: 1000) |
offset | integer | Optional | Pagination offset (default: 0) |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/games?date=2024-01-15&league_id=1/api/v1/nba/odds/games/{game_id}Get detailed information for a specific game
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
game_id | integer | Required | The unique game identifier (path parameter) |
date | string (YYYY-MM-DD) | Optional | Game date for validation |
include_markets | boolean | Optional | Include market data |
include_boxscore | boolean | Optional | Include boxscore data |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/games/12345/api/v1/nba/odds/games/{game_id}/boxscoreRetrieve boxscore data for a completed game
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
game_id | integer | Required | The unique game identifier |
date | string (YYYY-MM-DD) | Optional | Game date |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/games/12345/boxscore/api/v1/nba/odds/games/{game_id}/marketsGet all betting markets available for a specific game
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
game_id | integer | Required | The unique game identifier |
date | string (YYYY-MM-DD) | Optional | Game date |
market_type | string | Optional | Filter by market type: spread, moneyline, total |
book_id | integer | Optional | Filter by sportsbook ID |
period | string | Optional | Filter by game period (full, first_half, etc.) |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/games/12345/markets?market_type=moneyline/api/v1/nba/odds/markets/moneylineGet moneyline odds across all games and sportsbooks
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (YYYY-MM-DD) | Optional | Filter by game date |
game_id | integer | Optional | Filter by game ID(s), comma-separated |
team_id | integer | Optional | Filter by team ID(s) |
book_id | integer | Optional | Filter by sportsbook ID(s) |
sort | string | Optional | Sort by 'odds' or 'value' (default: odds) |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/markets/moneyline?date=2024-01-15/api/v1/nba/odds/markets/spreadGet point spread odds for games
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (YYYY-MM-DD) | Optional | Filter by game date |
game_id | integer | Optional | Filter by game ID(s) |
team_id | integer | Optional | Filter by team ID(s) |
book_id | integer | Optional | Filter by sportsbook ID(s) |
sort | string | Optional | Sort by 'odds' or 'value' (default: value) |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/markets/spread?date=2024-01-15/api/v1/nba/odds/markets/totalGet over/under (total) odds for games
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (YYYY-MM-DD) | Optional | Filter by game date |
game_id | integer | Optional | Filter by game ID(s) |
book_id | integer | Optional | Filter by sportsbook ID(s) |
side | string | Optional | Filter by 'over' or 'under' |
sort | string | Optional | Sort by 'odds' or 'value' (default: value) |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/markets/total?date=2024-01-15/live-oddsLive odds via WebSocket (recommended). Server pushes updates ~20s. Auth: apiKey in handshake.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
subscribe | event | Optional | Emit with { game_id?, market_type?, book_id? } to filter |
Example Request
io("https://odds-marketplace.onrender.com/live-odds", { auth: { apiKey: "sk_..." } })/api/v1/nba/odds/liveOne-off live odds snapshot (fallback when WebSocket not used)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
game_id | integer | Optional | Filter by game ID(s) |
market_type | string | Optional | Filter by market type |
book_id | integer | Optional | Filter by sportsbook ID(s) |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/live?game_id=12345/api/v1/nba/odds/historicalRetrieve historical odds data for analysis
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
game_id | integer | Optional | Filter by game ID(s) |
start_date | string (YYYY-MM-DD) | Required | Start date for historical data range |
end_date | string (YYYY-MM-DD) | Required | End date for historical data range |
market_type | string | Optional | Filter by market type |
book_id | integer | Optional | Filter by sportsbook ID(s) |
limit | integer | Optional | Number of results (default: 100, max: 1000) |
offset | integer | Optional | Pagination offset |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/historical?start_date=2024-01-01&end_date=2024-01-31/api/v1/nba/odds/betting-infoGet betting volume and money information per market
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (YYYY-MM-DD) | Optional | Filter by game date |
game_id | integer | Optional | Filter by game ID(s) |
market_type | string | Optional | Filter by market type |
book_id | integer | Optional | Filter by sportsbook ID(s) |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/betting-info?date=2024-01-15/api/v1/nba/odds/consensusGet consensus data aggregated across all sportsbooks
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date | string (YYYY-MM-DD) | Optional | Filter by game date |
game_id | integer | Optional | Filter by game ID(s) |
market_type | string | Optional | Filter by market type |
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/consensus?date=2024-01-15/api/v1/nba/odds/sportsbooksGet a list of all available sportsbooks
Example Request
https://odds-marketplace.onrender.com/api/v1/nba/odds/sportsbooks