Betting Odds

Retrieve betting odds for NBA games.

Get Betting Odds

Use this endpoint to retrieve betting odds for NBA games.

import { Time4BoostAPI } from "@time4boost/sdk";

const api = new Time4BoostAPI({ apiKey: "YOUR_API_KEY" });
const odds = await api.nba.getOdds({ date: "2024-04-01" });

The above command returns JSON structured like this:

{
  "data": [
    {
      "type": "2way",
      "vendor": "MGMLiveOdds",
      "live": true,
      "game_id": 1,
      "odds_decimal_home": "2.45",
      "odds_decimal_visitor": "1.50",
      "odds_american_home": "+145",
      "odds_american_visitor": "-200"
    },
    {
      "type": "spread",
      "vendor": "Betplay",
      "live": true,
      "game_id": 1,
      "odds_decimal_home": "2.45",
      "odds_decimal_visitor": "1.50",
      "odds_american_home": "+145",
      "odds_american_visitor": "-200",
      "away_spread": "-7.5"
    },
    {
      "type": "over/under",
      "vendor": "FanDuel",
      "live": false,
      "game_id": 1,
      "odds_decimal_home": "2.45",
      "odds_decimal_visitor": "1.50",
      "odds_american_home": "+145",
      "odds_american_visitor": "-200",
      "over_under": "110"
    }
  ],
  "meta": {
    "next_cursor": "2",
    "per_page": 25
  }
}

HTTP Request

GET https://api.time4boost.com/v1/nba/odds

Query Parameters

ParameterRequiredDescription
datetrue*Returns all odds for games on this date (YYYY-MM-DD)
game_idtrue*Returns all odds for this game_id
cursorfalseCursor for pagination, use the value from meta.next_cursor
per_pagefalseNumber of results per page (default: 25, max: 100)

* Either date or game_id MUST be specified as a parameter.