/getNHLBettingOdds
- Call this with either param gameDate or gameID. Most people will use gameDate to pull back the full day’s worth of odds, in json map format, with the key being gameID.
- This is updated every minute, so no need to call it more than once a minute.
- Odds are pre-game only, not live betting.
- Many customers use the results from this endpoint for predictive analysis and other AI related experiments.
- Odds for NHL games go back as far as 2/8/2024
A complete example of this call can be found on the rapidapi main UI for this api:
https://rapidapi.com/tank01/api/tank01-nhl-live-in-game-real-time-statistics-nhl/
Glossary:
- gameID is always in format awayTeamAbv@homeTeamAbv_gameDate
- gameDate is always in format YYYYMMDD
- Team abbreviations and Team IDs can be found from /getNHLTeams endpoint
Parameters:
One of the below is REQUIRED. If the endpoint is called with neither then you will get an empty map in return
Error Handling:
Errors are handled by returning an empty “body” map, statusCode of 200, and an added “error” element on the same level as “body”.
Possible Error Messages:
- “no odds available with that gameID” – this means there are no odds available for the gameID that you provided. This does not mean that the gameID is not valid.
- “no odds available for that date” – this means there are no odds available for the gameDate that you provided. This does not mean that there are no NHL games on that date.
- “Need to pass gameID or gameDate as parameter.” – this means you did not pass in either gameDate or gameID
This endpoint will retrieve a map in this format:
- statusCode
- body
- {gameID} gameID will be one or many. This depends on how many games are played on that gameDate
- last_updated_e_time – This is epoch time of when this map was last updated
- gameDate
- teamIDHome (numerical teamID)
- teamIDAway (numerical teamID)
- awayTeam (team abbreviation)
- homeTeam (team abbreviation)
- gameID
- {gamblingWebSiteName} – This can be one or many
- totalUnder
- totalOver
- totalUnderOdds
- totalOverOdds
- awayTeamPuckLine
- awayTeamPuckLineOdds
- homeTeamPuckLine
- homeTeamPuckLineOdds
- awayTeamMLOdds
- homeTeamMLOdds