# GET /v2/leagues/{id}/odds

Group: Odds

Season-long betting odds for a league: the markets the bookmaker prices on how the whole season or competition ends — above all who takes the title (Premier League, Champions League and the like) — with one selection per team at opening and current prices. Available on Pro, Business and Enterprise plans. 18+ only; please gamble responsibly.

Plans: Requires Pro, Business or Enterprise; a Free or Starter key receives 403 endpoint_not_in_plan.

Note: Each selection carries the backed side as team, a TeamRef you can pass to /v2/teams/{id}; name is the bookmaker’s own wording, most often a short club name. A market’s key does not change during the season ("winner"; markets we cannot classify yet append their label to "other:"). decimal is 1 + fractional, rounded to two decimal places. The source sends no settlement flags for these markets. An empty markets list with updatedAt null simply means the bookmaker prices nothing for that season, which is the case for most leagues and for seasons that are over. There is no WebSocket channel, as season prices move slowly: read the endpoint again when you need fresh prices. Odds are third-party prices provided for information only, not advice.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | league id issued by DataSportsAPI, a positive integer |
| `season` | query | yes | season id, as listed by /v2/leagues/{id}/seasons |

## Response

- `data`: `LeagueOdds`
- `meta`: season, count (number of markets)
- Objects: LeagueOdds (https://datasportsapi.com/markdown/reference.md#leagueodds)

## Errors

- 400 bad_request — the season parameter is missing
- 403 endpoint_not_in_plan — returned to keys on the Free and Starter plans
- 403 history_not_in_plan — your plan’s history window begins after this season
- 404 not_found — DataSportsAPI never issued this league id, or the season belongs to another league

Plus the errors every /v2 call shares (https://datasportsapi.com/markdown/docs/errors.md).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/leagues/{id}/odds?season=…"
```

TypeScript:

```ts
const { data, meta } = await client.leagues.odds(id, { season });
```

Python:

```python
res = client.leagues.odds(id, season=season)
```

Go:

```go
res, err := client.Leagues.Odds(ctx, id, &datasportsapi.LeaguesOddsParams{Season: season})
```

CLI:

```bash
$ dsa leagues odds <id> --season <season>
```

## Example response

```json
{ "data": { "leagueId": 200310, "seasonId": 200386, "updatedAt": "2026-11-23T05:40:00.000Z",
    "markets": [ { "key": "winner", "kind": "winner", "name": "To Win Outright", "live": false,
        "choices": [ { "name": "Arsenal", "team": { "id": 200421, "name": "Arsenal", "slug": "arsenal", "shortName": "Arsenal", "code": "ARS", "image": "…" },
                       "fractional": "6/5", "decimal": 2.2, "openingFractional": "2/1", "openingDecimal": 3 },
                     { "name": "Man City", "team": { "id": 200433, "name": "Manchester City", … }, "fractional": "9/4", "decimal": 3.25, "openingFractional": "7/4", "openingDecimal": 2.75 }, … ] } ] },
  "meta": { "season": 200386, "count": 1 } }
```

---

Base URL: https://api.datasportsapi.com. Authenticate each /v2 call with the header `Authorization: Bearer <key>` (secret keys begin with `sk_live_`).
HTML: https://datasportsapi.com/docs/odds/leagues-odds/ · Group: https://datasportsapi.com/markdown/docs/odds.md · All docs: https://datasportsapi.com/markdown/docs.md · Data model: https://datasportsapi.com/markdown/reference.md
