> ## Documentation Index
> Fetch the complete documentation index at: https://docs.therundown.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Markets

> Market definitions, odds data, delta feeds, price history, and participants

## Overview

Markets are the core data model in V2. Each market represents a type of bet (moneyline, spread, total, player props, etc.) with participants, lines, and prices from each sportsbook.

### Default Market IDs

When you call event endpoints without specifying `market_ids`, the API defaults to `1,2,3`:

| Market ID | Name               | Description                                                                        |
| --------- | ------------------ | ---------------------------------------------------------------------------------- |
| **1**     | Moneyline          | Winner of the game. Two-way for most sports, three-way (includes draw) for soccer. |
| **2**     | Point Spread       | Handicap/spread betting. The favorite must win by more than the spread.            |
| **3**     | Total (Over/Under) | Combined score of both teams. Bet over or under the posted number.                 |

<Note>
  To get player props, team totals, or other market types, you must explicitly pass their IDs. For example, `market_ids=29` for Player Points or `market_ids=94` for Team Totals. See the [full Market IDs reference](/reference/markets).
</Note>

<Info>
  For a visual breakdown of how markets, participants, lines, and prices nest together, see the [Data Model](/reference/data-model). For the complete list of market IDs and sport availability, see [Market IDs](/reference/markets). For delta-based polling of market prices, see the [Efficient Polling guide](/guides/efficient-polling).
</Info>

***

## Endpoints

<Accordion title="GET /api/v2/markets — List all market definitions">
  Returns every canonical market definition with its ID, name, period info, and whether the line value represents a participant name.

  This is a reference endpoint -- it returns the market catalog, not live prices. Use it to build a mapping of market IDs to display names.

  <CodeGroup>
    ```bash cURL theme={null}
    curl "https://therundown.io/api/v2/markets?key=YOUR_API_KEY"
    ```

    ```python Python theme={null}
    import requests

    resp = requests.get(
        "https://therundown.io/api/v2/markets",
        headers={"X-TheRundown-Key": "YOUR_API_KEY"}
    )
    markets = resp.json()
    ```

    ```javascript JavaScript theme={null}
    const resp = await fetch(
      "https://therundown.io/api/v2/markets?key=YOUR_API_KEY"
    );
    const markets = await resp.json();
    ```
  </CodeGroup>

  ### Response fields

  | Field                       | Description                                                                                                                                               |
  | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `id`                        | Numeric market identifier                                                                                                                                 |
  | `name`                      | Display name (e.g., "Money Line", "Player Points")                                                                                                        |
  | `description`               | Longer description of the market                                                                                                                          |
  | `short_description`         | Abbreviated description                                                                                                                                   |
  | `line_value_is_participant` | When `true`, the participant carries the selection and the line `value` may be a placeholder or label. When `false`, display the line value when present. |
  | `proposition`               | Whether this is a proposition/player prop market                                                                                                          |
  | `period_id`                 | Period this market applies to (see [Period IDs](/reference/periods))                                                                                      |
  | `live_variant_id`           | Market ID of the corresponding live/in-play variant, if any                                                                                               |
  | `updated_at`                | When the market definition was last updated                                                                                                               |

  ### Example Response

  ```json theme={null}
  [
    {
      "id": 1,
      "name": "Money Line",
      "description": "Pick the winner of the game",
      "short_description": "Winner",
      "line_value_is_participant": false,
      "proposition": false,
      "period_id": 0,
      "live_variant_id": 41,
      "updated_at": "2025-01-15T12:00:00Z"
    },
    {
      "id": 2,
      "name": "Point Spread",
      "description": "Handicap betting on the margin of victory",
      "short_description": "Spread",
      "line_value_is_participant": false,
      "proposition": false,
      "period_id": 0,
      "live_variant_id": 42,
      "updated_at": "2025-01-15T12:00:00Z"
    },
    {
      "id": 3,
      "name": "Total Over/Under",
      "description": "Combined score of both teams",
      "short_description": "Total",
      "line_value_is_participant": false,
      "proposition": false,
      "period_id": 0,
      "live_variant_id": 43,
      "updated_at": "2025-01-15T12:00:00Z"
    },
    {
      "id": 29,
      "name": "Player Points",
      "description": "Player points scored in the game",
      "short_description": "Points",
      "line_value_is_participant": true,
      "proposition": true,
      "period_id": 0,
      "live_variant_id": 90,
      "updated_at": "2025-01-15T12:00:00Z"
    },
    {
      "id": 94,
      "name": "Team Total",
      "description": "Total points scored by a single team",
      "short_description": "Team Total",
      "line_value_is_participant": true,
      "proposition": false,
      "period_id": 0,
      "live_variant_id": 96,
      "updated_at": "2025-01-15T12:00:00Z"
    }
  ]
  ```
</Accordion>

<Accordion title="GET /api/v2/markets/delta — Market price delta feed">
  Returns market line price changes (new, updated, removed) since the specified `last_id`. This is the most efficient way to keep your odds data up to date via polling.

  ### Parameters

  | Parameter       | Type  | Required | Description                                                                                     |
  | --------------- | ----- | -------- | ----------------------------------------------------------------------------------------------- |
  | `last_id`       | query | Yes      | Integer cursor. Use `0` for initial fetch, then pass the highest ID from the previous response. |
  | `sport_id`      | query | No       | Filter by sport ID                                                                              |
  | `affiliate_ids` | query | No       | Comma-separated sportsbook IDs                                                                  |
  | `market_ids`    | query | No       | Comma-separated market IDs                                                                      |
  | `event_id`      | query | No       | Filter by event ID                                                                              |
  | `limit`         | query | No       | Max results (default 1000, max 5000)                                                            |

  <CodeGroup>
    ```bash Initial fetch theme={null}
    curl "https://therundown.io/api/v2/markets/delta?key=YOUR_API_KEY&last_id=0&sport_id=4&market_ids=1,2,3"
    ```

    ```bash Subsequent poll theme={null}
    curl "https://therundown.io/api/v2/markets/delta?key=YOUR_API_KEY&last_id=PREVIOUS_LAST_ID&sport_id=4"
    ```

    ```python Python — Market delta polling theme={null}
    import requests
    import time

    API_KEY = "YOUR_API_KEY"
    BASE = "https://therundown.io/api/v2"
    last_id = 0

    while True:
        resp = requests.get(
            f"{BASE}/markets/delta",
            headers={"X-TheRundown-Key": API_KEY},
            params={"last_id": last_id, "sport_id": 4, "market_ids": "1,2,3"}
        )
        data = resp.json()

        for change in data.get("market_line_prices", []):
            print(f"Price change: event={change['event_id']} "
                  f"market={change['market_id']} "
                  f"affiliate={change['affiliate_id']} "
                  f"price={change['price']}")

        if data.get("market_line_prices"):
            last_id = max(p["id"] for p in data["market_line_prices"])

        time.sleep(3)
    ```

    ```javascript JavaScript theme={null}
    let lastId = 0;
    const resp = await fetch(
      `https://therundown.io/api/v2/markets/delta?key=YOUR_API_KEY&last_id=${lastId}&sport_id=4&market_ids=1,2,3`
    );
    const data = await resp.json();
    lastId = data.meta.delta_last_id;
    ```
  </CodeGroup>

  ### Example Response

  ```json theme={null}
  {
    "meta": {
      "delta_last_id": "584012",
      "count": 3,
      "has_more": false
    },
    "deltas": [
      {
        "id": 584010,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_id": 2,
        "market_name": "Point Spread",
        "participant_id": 51,
        "participant_type": "TYPE_TEAM",
        "participant_name": "Cleveland Cavaliers",
        "line": "-4.5",
        "price": "-110",
        "previous_price": "-105",
        "change_type": "price_change",
        "closed_at": "",
        "updated_at": "2026-02-26T18:45:30Z"
      },
      {
        "id": 584011,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_id": 1,
        "market_name": "Moneyline",
        "participant_id": 56,
        "participant_type": "TYPE_TEAM",
        "participant_name": "New York Knicks",
        "line": "",
        "price": "125",
        "previous_price": "120",
        "change_type": "price_change",
        "closed_at": "",
        "updated_at": "2026-02-26T18:45:32Z"
      },
      {
        "id": 584012,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_id": 3,
        "market_name": "Total Over/Under",
        "participant_id": 0,
        "participant_type": "TYPE_RESULT",
        "participant_name": "Over",
        "line": "224.5",
        "price": "-108",
        "previous_price": "-110",
        "change_type": "price_change",
        "closed_at": "",
        "updated_at": "2026-02-26T18:45:35Z"
      }
    ]
  }
  ```
</Accordion>

<Accordion title="GET /api/v2/markets/history — Price history by market line price IDs">
  Returns the price history for specific market line prices. You need the `market_line_price_id` values from a prior event or delta response.

  ### Parameters

  | Parameter               | Type  | Required | Description                          |
  | ----------------------- | ----- | -------- | ------------------------------------ |
  | `market_line_price_ids` | query | Yes      | Comma-separated IDs (max 50)         |
  | `from`                  | query | No       | Start time (RFC3339 format)          |
  | `to`                    | query | No       | End time (RFC3339 format)            |
  | `limit`                 | query | No       | Max results (default 1000, max 5000) |

  <CodeGroup>
    ```bash cURL theme={null}
    curl "https://therundown.io/api/v2/markets/history?key=YOUR_API_KEY&market_line_price_ids=12345,67890&limit=500"
    ```

    ```python Python theme={null}
    import requests

    resp = requests.get(
        "https://therundown.io/api/v2/markets/history",
        headers={"X-TheRundown-Key": "YOUR_API_KEY"},
        params={"market_line_price_ids": "12345,67890", "limit": 500}
    )
    history = resp.json()
    ```

    ```javascript JavaScript theme={null}
    const resp = await fetch(
      "https://therundown.io/api/v2/markets/history?key=YOUR_API_KEY&market_line_price_ids=12345,67890&limit=500"
    );
    const history = await resp.json();
    ```
  </CodeGroup>

  ### Example Response

  ```json theme={null}
  {
    "meta": {
      "count": 5
    },
    "history": [
      {
        "id": 90001,
        "market_line_price_id": 12345,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_participant_id": 51,
        "market_id": 2,
        "line": "-3.5",
        "price": "-110",
        "previous_price": "",
        "change_type": "new",
        "closed_at": "",
        "updated_at": "2026-02-24T14:00:00Z"
      },
      {
        "id": 90002,
        "market_line_price_id": 12345,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_participant_id": 51,
        "market_id": 2,
        "line": "-3.5",
        "price": "-115",
        "previous_price": "-110",
        "change_type": "price_change",
        "closed_at": "",
        "updated_at": "2026-02-25T18:30:00Z"
      },
      {
        "id": 90003,
        "market_line_price_id": 12345,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_participant_id": 51,
        "market_id": 2,
        "line": "-4.5",
        "price": "-110",
        "previous_price": "-115",
        "change_type": "line_change",
        "closed_at": "",
        "updated_at": "2026-02-26T01:15:00Z"
      },
      {
        "id": 90004,
        "market_line_price_id": 67890,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_participant_id": 56,
        "market_id": 1,
        "line": "",
        "price": "110",
        "previous_price": "",
        "change_type": "new",
        "closed_at": "",
        "updated_at": "2026-02-24T14:00:00Z"
      },
      {
        "id": 90005,
        "market_line_price_id": 67890,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_participant_id": 56,
        "market_id": 1,
        "line": "",
        "price": "122",
        "previous_price": "110",
        "change_type": "price_change",
        "closed_at": "",
        "updated_at": "2026-02-25T22:00:00Z"
      }
    ]
  }
  ```
</Accordion>

<Accordion title="GET /api/v2/markets/participants — Get market participants">
  Returns participants (teams, players, or result types like Over/Under) for specified markets and events. Useful for resolving participant IDs to names.

  ### Parameters

  | Parameter    | Type  | Required | Description                |
  | ------------ | ----- | -------- | -------------------------- |
  | `market_ids` | query | No       | Comma-separated market IDs |
  | `event_id`   | query | No       | Filter by event ID         |

  <CodeGroup>
    ```bash cURL theme={null}
    curl "https://therundown.io/api/v2/markets/participants?key=YOUR_API_KEY&event_id=EVENT_ID&market_ids=29"
    ```

    ```python Python theme={null}
    import requests

    resp = requests.get(
        "https://therundown.io/api/v2/markets/participants",
        headers={"X-TheRundown-Key": "YOUR_API_KEY"},
        params={"event_id": "EVENT_ID", "market_ids": "29"}
    )
    participants = resp.json()
    ```

    ```javascript JavaScript theme={null}
    const resp = await fetch(
      "https://therundown.io/api/v2/markets/participants?key=YOUR_API_KEY&event_id=EVENT_ID&market_ids=29"
    );
    const participants = await resp.json();
    ```
  </CodeGroup>

  ### Example Response

  ```json theme={null}
  {
    "participants": [
      {
        "id": 70001,
        "market_event_id": 28401,
        "participant_id": 2005,
        "participant_type": "TYPE_PLAYER",
        "participant_name": "Donovan Mitchell",
        "updated_at": "2026-02-26T12:00:00Z"
      },
      {
        "id": 70002,
        "market_event_id": 28401,
        "participant_id": 2010,
        "participant_type": "TYPE_PLAYER",
        "participant_name": "Jalen Brunson",
        "updated_at": "2026-02-26T12:00:00Z"
      },
      {
        "id": 70003,
        "market_event_id": 28401,
        "participant_id": 51,
        "participant_type": "TYPE_TEAM",
        "participant_name": "Cleveland Cavaliers",
        "updated_at": "2026-02-26T12:00:00Z"
      },
      {
        "id": 70004,
        "market_event_id": 28401,
        "participant_id": 0,
        "participant_type": "TYPE_RESULT",
        "participant_name": "Over",
        "updated_at": "2026-02-26T12:00:00Z"
      }
    ]
  }
  ```
</Accordion>

<Accordion title="GET /api/v2/events/{eventID}/markets — Available markets for an event">
  Returns the list of market definitions (not prices) available for a specific event. Use this to discover which markets are offered before requesting prices.

  ### Parameters

  | Parameter          | Type  | Required | Description                                     |
  | ------------------ | ----- | -------- | ----------------------------------------------- |
  | `eventID`          | path  | Yes      | Canonical V2 event ID from the `event_id` field |
  | `participant_ids`  | query | No       | Filter by participant IDs                       |
  | `participant_type` | query | No       | Filter by participant type                      |

  <CodeGroup>
    ```bash List all available markets for an event theme={null}
    curl "https://therundown.io/api/v2/events/EVENT_ID/markets?key=YOUR_API_KEY"
    ```

    ```bash Filter to player markets only theme={null}
    curl "https://therundown.io/api/v2/events/EVENT_ID/markets?key=YOUR_API_KEY&participant_type=player"
    ```

    ```python Python theme={null}
    import requests

    resp = requests.get(
        "https://therundown.io/api/v2/events/EVENT_ID/markets",
        headers={"X-TheRundown-Key": "YOUR_API_KEY"}
    )
    markets = resp.json()
    ```

    ```javascript JavaScript theme={null}
    const resp = await fetch(
      "https://therundown.io/api/v2/events/EVENT_ID/markets?key=YOUR_API_KEY"
    );
    const markets = await resp.json();
    ```
  </CodeGroup>

  ### Example Response

  Returns the same market definition schema as `GET /api/v2/markets`, filtered to the markets available for this event.

  ```json theme={null}
  [
    {
      "id": 1,
      "name": "Money Line",
      "description": "Pick the winner of the game",
      "short_description": "Winner",
      "line_value_is_participant": false,
      "proposition": false,
      "period_id": 0,
      "live_variant_id": 41,
      "updated_at": "2025-01-15T12:00:00Z"
    },
    {
      "id": 2,
      "name": "Point Spread",
      "description": "Handicap betting on the margin of victory",
      "short_description": "Spread",
      "line_value_is_participant": false,
      "proposition": false,
      "period_id": 0,
      "live_variant_id": 42,
      "updated_at": "2025-01-15T12:00:00Z"
    },
    {
      "id": 3,
      "name": "Total Over/Under",
      "description": "Combined score of both teams",
      "short_description": "Total",
      "line_value_is_participant": false,
      "proposition": false,
      "period_id": 0,
      "live_variant_id": 43,
      "updated_at": "2025-01-15T12:00:00Z"
    },
    {
      "id": 29,
      "name": "Player Points",
      "description": "Player points scored in the game",
      "short_description": "Points",
      "line_value_is_participant": true,
      "proposition": true,
      "period_id": 0,
      "live_variant_id": 90,
      "updated_at": "2025-01-15T12:00:00Z"
    }
  ]
  ```
</Accordion>

<Accordion title="GET /api/v2/events/{eventID}/markets/history — Market history for an event">
  Returns time-series price history for all markets on an event. Supports filtering by market, affiliate, and time range.

  ### Parameters

  | Parameter       | Type  | Required | Description                                     |
  | --------------- | ----- | -------- | ----------------------------------------------- |
  | `eventID`       | path  | Yes      | Canonical V2 event ID from the `event_id` field |
  | `market_ids`    | query | No       | Comma-separated market IDs                      |
  | `affiliate_ids` | query | No       | Comma-separated sportsbook IDs                  |
  | `from`          | query | No       | Start time (RFC3339)                            |
  | `to`            | query | No       | End time (RFC3339)                              |
  | `limit`         | query | No       | Max results (default 1000, max 5000)            |

  <CodeGroup>
    ```bash cURL theme={null}
    curl "https://therundown.io/api/v2/events/EVENT_ID/markets/history?key=YOUR_API_KEY&market_ids=1,2,3&affiliate_ids=19"
    ```

    ```python Python theme={null}
    import requests

    resp = requests.get(
        "https://therundown.io/api/v2/events/EVENT_ID/markets/history",
        headers={"X-TheRundown-Key": "YOUR_API_KEY"},
        params={"market_ids": "1,2,3", "affiliate_ids": "19"}
    )
    history = resp.json()
    ```

    ```javascript JavaScript theme={null}
    const resp = await fetch(
      "https://therundown.io/api/v2/events/EVENT_ID/markets/history?key=YOUR_API_KEY&market_ids=1,2,3&affiliate_ids=19"
    );
    const history = await resp.json();
    ```
  </CodeGroup>

  ### Example Response

  ```json theme={null}
  {
    "meta": {
      "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
      "count": 3
    },
    "history": [
      {
        "id": 80001,
        "market_line_price_id": 12345,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_participant_id": 51,
        "market_id": 1,
        "line": "",
        "price": "-130",
        "previous_price": "",
        "change_type": "new",
        "closed_at": "",
        "updated_at": "2026-02-24T14:00:00Z"
      },
      {
        "id": 80002,
        "market_line_price_id": 12345,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_participant_id": 51,
        "market_id": 1,
        "line": "",
        "price": "-140",
        "previous_price": "-130",
        "change_type": "price_change",
        "closed_at": "",
        "updated_at": "2026-02-25T09:30:00Z"
      },
      {
        "id": 80003,
        "market_line_price_id": 12345,
        "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
        "sport_id": 4,
        "affiliate_id": 19,
        "market_participant_id": 51,
        "market_id": 1,
        "line": "",
        "price": "-145",
        "previous_price": "-140",
        "change_type": "price_change",
        "closed_at": "",
        "updated_at": "2026-02-26T16:20:00Z"
      }
    ]
  }
  ```
</Accordion>

<Accordion title="GET /api/v2/events/{eventID}/markets/{marketID}/history — Line chart data for a specific market">
  Returns time-series price data suitable for charting line movement on a single market. More granular than the general history endpoint.

  ### Parameters

  | Parameter        | Type  | Required | Description                                     |
  | ---------------- | ----- | -------- | ----------------------------------------------- |
  | `eventID`        | path  | Yes      | Canonical V2 event ID from the `event_id` field |
  | `marketID`       | path  | Yes      | Market ID (e.g., `1` for Moneyline)             |
  | `participant_id` | query | No       | Filter by participant ID                        |
  | `affiliate_ids`  | query | No       | Comma-separated sportsbook IDs                  |
  | `line`           | query | No       | Filter by line value                            |
  | `from`           | query | No       | Start time (RFC3339)                            |
  | `to`             | query | No       | End time (RFC3339)                              |

  <CodeGroup>
    ```bash Moneyline history from DraftKings theme={null}
    curl "https://therundown.io/api/v2/events/EVENT_ID/markets/1/history?key=YOUR_API_KEY&affiliate_ids=19"
    ```

    ```bash Spread history for a specific participant theme={null}
    curl "https://therundown.io/api/v2/events/EVENT_ID/markets/2/history?key=YOUR_API_KEY&participant_id=12345"
    ```

    ```python Python theme={null}
    import requests

    resp = requests.get(
        "https://therundown.io/api/v2/events/EVENT_ID/markets/1/history",
        headers={"X-TheRundown-Key": "YOUR_API_KEY"},
        params={"affiliate_ids": "19"}
    )
    chart_data = resp.json()
    ```

    ```javascript JavaScript theme={null}
    const resp = await fetch(
      "https://therundown.io/api/v2/events/EVENT_ID/markets/1/history?key=YOUR_API_KEY&affiliate_ids=19"
    );
    const chartData = await resp.json();
    ```
  </CodeGroup>

  ### Example Response

  The chart-optimized response groups data points into `series` keyed by affiliate ID. Each point uses shorthand fields: `t` (timestamp), `p` (price), and `c` (closed\_at, empty string if still active).

  ```json theme={null}
  {
    "meta": {
      "event_id": "401584701-d1f2-43e7-b5a6-9c8d7e6f5a4b",
      "market_id": 2,
      "market_name": "Point Spread"
    },
    "series": {
      "19": {
        "affiliate_id": 19,
        "affiliate_name": "DraftKings",
        "data": [
          { "t": "2026-02-24T14:00:00Z", "p": "-3.5 -110", "c": "" },
          { "t": "2026-02-25T09:15:00Z", "p": "-4.5 -110", "c": "" },
          { "t": "2026-02-26T16:30:00Z", "p": "-4.5 -108", "c": "" }
        ]
      }
    }
  }
  ```
</Accordion>

***

## Available Markets by Sport and Date

You can also discover which markets are available for a sport on a given date:

<CodeGroup>
  ```bash Markets across all sports for a date theme={null}
  curl "https://therundown.io/api/v2/sports/markets/2026-02-26?key=YOUR_API_KEY"
  ```

  ```bash Markets for NBA on a date (hide closed) theme={null}
  curl "https://therundown.io/api/v2/sports/4/markets/2026-02-26?key=YOUR_API_KEY&hide_closed_markets=1"
  ```

  ```python Python theme={null}
  import requests

  resp = requests.get(
      "https://therundown.io/api/v2/sports/4/markets/2026-02-26",
      headers={"X-TheRundown-Key": "YOUR_API_KEY"},
      params={"hide_closed_markets": 1}
  )
  markets = resp.json()
  ```

  ```javascript JavaScript theme={null}
  const resp = await fetch(
    "https://therundown.io/api/v2/sports/4/markets/2026-02-26?key=YOUR_API_KEY&hide_closed_markets=1"
  );
  const markets = await resp.json();
  ```
</CodeGroup>

***

## Market Data Model

Each market in an event response follows this structure:

```json theme={null}
{
  "id": 28401,
  "market_id": 1,
  "period_id": 0,
  "name": "Moneyline",
  "market_description": "Pick the winner of the game",
  "participants": [
    {
      "id": 51,
      "type": "TYPE_TEAM",
      "name": "Cleveland Cavaliers",
      "lines": [
        {
          "id": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
          "value": "",
          "prices": {
            "19": { "id": "194920001", "price": -145, "is_main_line": true, "updated_at": "2026-02-26T18:30:00Z" }
          }
        }
      ]
    }
  ]
}
```

The `prices` object is keyed by `affiliate_id` (sportsbook). A price value of **0.0001** indicates the line is off the board.
