---
title: "Get all odds"
method: GET
path: "/basketball/odds"
tags: ["Basketball.Odds"]
---

# Get all odds

`GET /basketball/odds`

## Request

- Base URL: `https://sports.highlightly.net`
- URL: `https://sports.highlightly.net/basketball/odds`
- Auth: none declared. Required headers: `x-rapidapi-host`, `x-rapidapi-key`
- TypeScript: <https://skmtc.dev/highlightly/apis/sports-api-highlightly/docs/basketball/odds/get.ts> (a function with typed inputs; its response is checked against the schema)

> Prematch odds refresh interval: Multiple times a day
  
> Live odds refresh interval: Once every 10 minutes
 
> Note: Endpoint is not available in the Basic/Free plan.

Retrieve a list of match odds based on the requested query parameters. With `oddsType` query parameter you can specify whether you want **prematch** or **live** odds. If you do not set a specific value **prematch** odds will be returned.

At least one primary query parameter needs to be specified before you can retrieve the data (`timezone`, `limit`, `offset`, `oddsType` are considered secondary).

The most popular way of getting match odds is by specifying the `matchId` query parameter. You can also utilise the `date` parameter alongside the `timezone` to fetch all match odds for a given day. By specifying league or bookmaker related fields you can further narrow down your search.

As it stands, we currently offer the support for the following markets:

| Market | Description |
| ----------- | ----------- |
| 3-Way Moneyline |  The possible outcomes for the three-way moneyline market are `Home`, `Draw` or `Away`. |
| Moneyline | When a match does not have a three-way moneyline it will have a two-way one instead. The possible outcomes for the mentioned market are either `Home` or `Away`. There is no possible way for the game to end in a `Draw`. |
| Total Points | This is considered a complex market. It is split into multiple possible variants such as *"Total Points 204.5"*, *"Total Points 209.5"* and so on. The possible outcome of a variant is either `Over` or `Under`. |
| Odd or Even | The Odd or Even market defines whether the score of both teams will be either `Odd` or `Even`. |
| Spread | This is considered a complex market. It is split into multiple possible variants such as *"Spread -28.5/+28.5"*, *"Spread -21.25/+21.25 "* and so on. The possible outcome of a variant is either `Home` or `Away`. |

There are two other important query parameters. The `limit` parameter defines what the number of returned match odds will be. If the number of actual match odds is above the `limit` value you can make subsequent requests by increasing the `offset` value.

> Match odds are available up to 28 days after the game finishes and up to 7 days before the game starts.

Below is an example of what can be achieved with bookmaker odds on a match basis:

![Odds example](https://highlightly.net/assets/img/documentation/odds-hda.png)

## Query parameters

- `oddsType` string
- `leagueId` number
- `leagueName` string
- `timezone` string
- `bookmakerId` number
- `limit` number
- `offset` number
- `matchId` number
- `bookmakerName` string
- `date` string

## Headers

- `x-rapidapi-host` string, required
- `x-rapidapi-key` string, required

## Response `200`

- BasketballOddsPaginatedResponseDto
  - `data` BasketballOddsResponseDto[], required
    - `matchId` number, required
    - `odds` BasketballMarketResponseDto[], required
      - `bookmakerId` number, required
      - `bookmakerName` string
      - `type` string, required
      - `market` string, required
      - `values` BasketballMarketSelectionResponseDto[], required
        - `odd` number, required
        - `value` string, required
  - `pagination` PaginationResponseDto, required
    - `totalCount` number, required: Available number of items, relevant to the provided query.
    - `offset` number, required
    - `limit` number, required
  - `plan` PlanResponseDto, required
    - `tier` string, required: Your current API subscription tier.
    - `message` string, required: Explanation message regarding your current tier.

## Other responses

- `400`: Bad request descriptive error.
- `500`: Internal server error.

---

[API](https://skmtc.dev/highlightly/apis/sports-api-highlightly.md) - [All operations](https://skmtc.dev/highlightly/apis/sports-api-highlightly/llms.txt) - [OpenAPI document](https://skmtc.dev/highlightly/apis/sports-api-highlightly/revisions/c8a366d3091f?raw)
