> For the complete documentation index, see [llms.txt](https://docs.sportmonks.com/v3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportmonks.com/v3/endpoints-and-entities/endpoints/markets/get-all-markets.md).

# GET All Markets

This endpoint returns all available markets within your subscription.

{% tabs %}
{% tab title="Request" %}

```http
https://api.sportmonks.com/v3/odds/markets
```

{% endtab %}

{% tab title="Response" %}

```json
"data": [
    {
        "id": 1,
        "name": "Fulltime Result",
        "developer_name": "FULLTIME_RESULT",
        "has_winning_calculations": true
    },
    {
        "id": 2,
        "name": "Double Chance",
        "developer_name": "DOUBLE_CHANCE",
        "has_winning_calculations": false
    },
    {
        "id": 10,
        "name": "Draw No Bet",
        "developer_name": "DRAW_NO_BET",
        "has_winning_calculations": true
    },
    {
        "id": 14,
        "name": "Both Teams To Score",
        "developer_name": "BOTH_TEAMS_TO_SCORE",
        "has_winning_calculations": true
    },
    {
        "id": 28,
        "name": "1st Half Goals",
        "developer_name": "1ST_HALF_GOALS",
        "has_winning_calculations": false
    },
    {
        "id": 31,
        "name": "Half Time Result",
        "developer_name": "HALF_TIME_RESULT",
        "has_winning_calculations": false
    },
    {
        "id": 52,
        "name": "Home/Away",
        "developer_name": "HOME_AWAY",
        "has_winning_calculations": false
    },
    {
        "id": 68,
        "name": "Total Corners",
        "developer_name": "TOTAL_CORNERS",
        "has_winning_calculations": false
    },
    {
        "id": 71,
        "name": "Corner Match Bet",
        "developer_name": "CORNER_MATCH_BET",
        "has_winning_calculations": false
    },
    {
        "id": 74,
        "name": "Team Corners",
        "developer_name": "TEAM_CORNERS",
        "has_winning_calculations": false
    },
    {
        "id": 80,
        "name": "Goals Over/Under",
        "developer_name": "GOALS_OVER_UNDER",
        "has_winning_calculations": false
    },
    {
        "id": 281,
        "name": "Team Cards",
        "developer_name": "TEAM_CARDS",
        "has_winning_calculations": false
    }
]
```

{% endtab %}

{% tab title="Field Description" %}

| Field                      | Description                                                             | Type    |
| -------------------------- | ----------------------------------------------------------------------- | ------- |
| `id`                       | The unique ID of the market. Use this when filtering odds by market.    | integer |
| `name`                     | The display name of the market.                                         | string  |
| `developer_name`           | A stable machine-readable identifier for the market.                    | string  |
| `has_winning_calculations` | Whether the API returns a calculated winning selection for this market. | boolean |
| {% endtab %}               |                                                                         |         |
| {% endtabs %}              |                                                                         |         |

{% hint style="warning" %}
**Do not use `legacy_id` for filtering.** The response also returns a `legacy_id` field, which is the market identifier from API 2.0. It is included for migration reference only. All filtering and integration should use `id`, not `legacy_id`. Using a `legacy_id` value as a current market ID will return the wrong market or no results.
{% endhint %}

{% tabs %}
{% tab title="Query Parameters" %}

| Query Parameters | Required? | Description                                                                                                                                                             |
| ---------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api_token`      | YES       | Your unique API token                                                                                                                                                   |
| `include`        | NO        | Enrich the API with more data by using includes                                                                                                                         |
| `select`         | NO        | Select specific fields on the base entity                                                                                                                               |
| `filters`        | NO        | Filter the API response on multiple related entities. There are static filters and dynamic filters. Please find the possibilities in the Static and Dynamic Filter tab. |
| {% endtab %}     |           |                                                                                                                                                                         |

{% tab title="Static Filters" %}
**Static filters** are always the same and filter in one specific way without any custom options.

| Static Filter | Available on Entity | Description                                                                                                                | Example                      |
| ------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| `IdAfter`     | All                 | Filter all markets starting from a certain market ID. Handy when importing all markets and resuming from a specific point. | `&filters=IdAfter:marketID`  |
| `marketIds`   | All                 | Filter on a selection of markets separated by a comma.                                                                     | `&filters=marketIds:1,10,14` |
| {% endtab %}  |                     |                                                                                                                            |                              |

{% tab title="Dynamic Filters" %}
Not applicable for this endpoint.
{% endtab %}
{% endtabs %}

**Pagination**

YES

**Include depth**

You can use a total of `0` nested includes on this endpoint.

**Include options**

`none`

**Related Entities**

* [Market](https://claude.ai/v3/odds-api/getting-started/entities/market.md)

**Code Example**

{% tabs %}
{% tab title="Javascript" %}

```javascript
const response = await fetch(
  "https://api.sportmonks.com/v3/odds/markets?api_token=YOUR_TOKEN"
);
const data = await response.json();
console.log(data);
```

{% endtab %}

{% tab title="Python" %}

```python
import http.client

conn = http.client.HTTPSConnection("api.sportmonks.com")
payload = ''
headers = {}
conn.request("GET", "/v3/odds/markets?api_token={your_token}", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.sportmonks.com/v3/odds/markets?api_token={your_token}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sportmonks.com/v3/endpoints-and-entities/endpoints/markets/get-all-markets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
