---
title: "Get price history for specific market line prices"
method: GET
path: "/api/v2/markets/history"
tags: ["V2 Markets"]
---

# Get price history for specific market line prices

`GET /api/v2/markets/history`

## Request

- Base URL: `https://therundown.io`
- URL: `https://therundown.io/api/v2/markets/history`
- Auth: API key in header `X-TheRundown-Key`

## Query parameters

- `market_line_price_ids` string, required
- `from` string, date-time
- `to` string, date-time
- `limit` integer
- `main_line` 'true' | 'false'

## Response `200`

Price history

- MarketHistoryResponse
  - `meta` object
    - `event_id` string
    - `market_id` integer
    - `count` integer
  - `history` MarketLinePriceHistory[]
    - `id` integer
    - `market_line_price_id` integer
    - `event_id` string
    - `sport_id` integer
    - `affiliate_id` integer
    - `market_participant_id` integer
    - `market_id` integer
    - `line` string
    - `price` string
    - `previous_price` string, nullable
    - `closed_at` string, date-time: Closing timestamp for this history row; omitted if no recorded closure.
    - `change_type` string: Type of change: `price` (odds moved on this line), `open` (line first offered), `close` (line taken down), `reopen` (line offered again), `main_line` (only the main-line flag changed; see `is_main_line`), or `current` (no history rows exist yet for the requested line, so the row reflects the current price). When odds and the main-line flag change together the row is a `price` row, so read `is_main_line` on every row rather than relying on `change_type` alone.
    - `is_main_line` boolean: Whether this line was the sportsbook's main line when the row was written. Always present. To reconstruct main-line moves, keep rows with `is_main_line` = true (or pass `main_line=true`), sort by `updated_at`, and each change of `line` for a participant is a main-line move at that timestamp.
    - `updated_at` string, date-time

## Changes

- **2026-09-08** `837d29f6bc9e`: 2 info
  - added the new optional `query` request parameter `main_line`
  - added the optional property `history/items/is_main_line` to the response with the `200` status

[Operation history](https://skmtc.dev/therundown/apis/therundown-sports-api/changes/api/v2/markets/history/get.md)

---

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