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

# Get all odds

`GET /baseball/odds`

## Request

- Base URL: `https://sports.highlightly.net`
- URL: `https://sports.highlightly.net/baseball/odds`
- Auth: none declared. Required headers: `x-rapidapi-host`, `x-rapidapi-key`
- TypeScript: <https://skmtc.dev/highlightly/apis/sports-api-highlightly/docs/baseball/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 |
| ----------- | ----------- |
| Home/Away | 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`. |
| Over/Under | This is considered a complex market. It is split into multiple possible variants such as *"Over/Under 7.5"*, *"Over/Under 9.5"* points and so on. The possible outcome of a variant is either `Over` or `Under`.|
| Asian Handicap | This is considered a complex market. It is split into multiple possible variants such as *"Asian Handicap -0.5/+0.5"*, *"Asian Handicap -1.5/+1.5"* and so on. The possible outcome of a variant is either `Home` or `Away`.|
| Odd or Even| The Odd or Even market defines whether the score of both teams will be either `Odd` or `Even`. |

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-ha.png)

## Query parameters

- `oddsType` string
- `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`

- BaseballOddsPaginatedResponseDto
  - `data` BaseballOddsResponseDto[], required
    - `matchId` number, required
    - `odds` BaseballMarketResponseDto[], required
      - `bookmakerId` number, required
      - `bookmakerName` string
      - `type` string, required
      - `market` string, required
      - `values` BaseballMarketSelectionResponseDto[], 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)
