> ## 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.

# Get market price history for an event

> Returns recorded price changes for the requested markets and sportsbooks, subject to your plan's historical-data access. Data can be available before, during, or after an event as prices are recorded. Each response is bounded by the requested limit.



## OpenAPI

````yaml get /api/v2/events/{eventID}/markets/history
openapi: 3.1.0
info:
  title: TheRundown Sports API
  version: 2.0.0
  description: >
    **Resolve the event first.** Ambiguous date, team, player, or timezone? The
    agent asks instead of guessing.


    **Every price carries evidence.** Event, market, affiliate ID, line, and the
    price update time. A fetch time is not freshness.


    **Missing stays missing.** No remembered odds, no synthetic prices, no
    filled gaps.


    **IDs come from the API.** Sports, markets, and affiliates are discovered at
    runtime. Retired affiliates stay out.


    Real-time and historical sports betting data, odds, lines, and statistics
    across major North American and international sports leagues.


    ## Authentication

    All endpoints (except `/sports` and `/affiliates`) require authentication.
    Send your API key from a private server-side environment variable in the
    `X-TheRundown-Key` header.

    The query-key security scheme is retained for compatibility with existing
    integrations and deprecated for new integrations; do not put keys in URLs,
    prompts, browser bundles, or public code.

    ## Off-the-Board Sentinel Value

    The value **0.0001** indicates a line is "off the board" — the sportsbook
    has temporarily removed pricing (e.g., pending injury news). This is NOT an
    error. Display as "Off Board" or "N/A" in your UI.


    ## Rate Limiting

    Requests are rate-limited per API key tier. Check response headers for
    current limits.


    ## Data Updates

    - Live odds update in real-time during games

    - Use delta endpoints for efficient polling of changes

    - WebSocket connections available for streaming updates


    ## V1 vs V2

    V2 endpoints use market-based data structures (market_id, participants, line
    prices). V1 endpoints use legacy line-based structures (moneyline, spread,
    total objects). V2 is recommended for new integrations.
  contact:
    name: TheRundown API Support
    url: https://therundown.io
    email: support@therundown.io
  termsOfService: https://therundown.io/terms
servers:
  - url: https://therundown.io
    description: Production
security:
  - ApiKeyHeader: []
tags:
  - name: V2 Sports
    description: Sport listings, dates, and teams (V2)
  - name: V2 Events
    description: Events with market-based odds (V2)
  - name: V2 Markets
    description: Market definitions, odds, deltas, and history (V2)
  - name: V2 Futures
    description: >-
      Futures/outright competition events — championship and tournament-winner
      boards (V2, early access)
  - name: V2 Teams
    description: Team data, players, and stats (V2)
  - name: V2 Players
    description: Player data (V2)
  - name: V2 Stats
    description: Team and player statistics (V2)
  - name: V2 WebSocket
    description: Real-time streaming via WebSocket (V2)
  - name: V2 Reference
    description: Reference data — affiliates, sportsbooks, season types (V2)
  - name: V1 Events
    description: Events with line-based odds (V1 legacy)
  - name: V1 Lines
    description: Moneyline, spread, total, best-line endpoints (V1 legacy)
  - name: V1 Sports
    description: Sport listings, dates, events, schedules (V1 legacy)
  - name: V1 Delta
    description: Delta/change feeds (V1 legacy)
  - name: V1 Reference
    description: Reference data (V1 legacy)
  - name: V1 WebSocket
    description: Real-time streaming via WebSocket (V1 legacy)
externalDocs:
  description: Build with AI guide
  url: https://therundown.io/build-with-ai
paths:
  /api/v2/events/{eventID}/markets/history:
    get:
      tags:
        - V2 Markets
      summary: Get market price history for an event
      description: >-
        Returns recorded price changes for the requested markets and
        sportsbooks, subject to your plan's historical-data access. Data can be
        available before, during, or after an event as prices are recorded. Each
        response is bounded by the requested limit.
      operationId: v2GetMarketHistoryByEvent
      parameters:
        - $ref: '#/components/parameters/EventIDPath'
        - name: market_ids
          in: query
          schema:
            type: string
          description: >-
            Comma-separated market IDs to filter. Defaults to `1,2,3`; maximum
            12.
        - $ref: '#/components/parameters/AffiliateIDsQuery'
        - name: from
          in: query
          schema:
            type: string
            format: date-time
          description: Inclusive start time (RFC3339)
        - name: to
          in: query
          schema:
            type: string
            format: date-time
          description: Inclusive end time (RFC3339)
        - name: limit
          in: query
          schema:
            type: integer
            default: 1000
            maximum: 5000
          description: >-
            Maximum total rows across all requested markets and sportsbooks.
            Invalid or out-of-range values use 1000.
        - $ref: '#/components/parameters/MainLineHistoryQuery'
      responses:
        '200':
          description: >-
            Market price history, newest first. There is no paging cursor or
            truncation flag; narrow the request scope or time window if it
            reaches the limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketHistoryResponse'
              example:
                meta:
                  event_id: 09bfa53f8484a63e584398545c035932
                  count: 2
                history:
                  - id: 500002
                    market_line_price_id: 192868821
                    event_id: 09bfa53f8484a63e584398545c035932
                    sport_id: 4
                    affiliate_id: 19
                    market_participant_id: 45001
                    market_id: 1
                    line: ''
                    price: '-110'
                    previous_price: '-105'
                    change_type: price
                    updated_at: '2026-02-11T09:30:00Z'
                    is_main_line: true
                  - id: 500001
                    market_line_price_id: 192868821
                    event_id: 09bfa53f8484a63e584398545c035932
                    sport_id: 4
                    affiliate_id: 19
                    market_participant_id: 45001
                    market_id: 1
                    line: ''
                    price: '-105'
                    change_type: open
                    updated_at: '2026-02-10T14:00:00Z'
                    is_main_line: true
components:
  parameters:
    EventIDPath:
      name: eventID
      in: path
      required: true
      schema:
        type: string
      description: >-
        Canonical V2 event ID from the `event_id` field returned by event
        endpoints
    AffiliateIDsQuery:
      name: affiliate_ids
      in: query
      schema:
        type: string
      description: >
        Comma-separated sportsbook/affiliate IDs to filter. Common values
        include DraftKings (19), FanDuel (23), BetMGM (22), BookMaker (7),
        BetCRIS (9), Pinnacle (3), Polymarket US (31), Circa Sports (32), Bet105
        (33), and Heritage Sports (34). Availability varies by sport and market.

        On V2 event endpoints (`/api/v2/sports/{sportID}/events/{date}`,
        `/api/v2/events/{eventID}`, and their openers/closing siblings),
        `affiliate_ids=0` is a scores-only sentinel: the response keeps events,
        scores, and status and omits markets and price objects. Other endpoints
        that share this parameter treat `affiliate_ids` as a sportsbook filter
        only.
    MainLineHistoryQuery:
      name: main_line
      in: query
      schema:
        type: string
        enum:
          - 'true'
          - 'false'
        default: 'false'
      description: >-
        When `true`, return only history rows (or chart points) that were the
        sportsbook's main line when written — `is_main_line` = true on history
        rows, `m` = true on chart points. Sorted by time, each change of the
        line value for a participant is a main-line move at that timestamp.
  schemas:
    MarketHistoryResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            event_id:
              type: string
            market_id:
              type: integer
              format: int64
            count:
              type: integer
        history:
          type: array
          items:
            $ref: '#/components/schemas/MarketLinePriceHistory'
    MarketLinePriceHistory:
      type: object
      properties:
        id:
          type: integer
          format: int64
        market_line_price_id:
          type: integer
          format: int64
        event_id:
          type: string
        sport_id:
          type: integer
        affiliate_id:
          type: integer
        market_participant_id:
          type: integer
          format: int64
        market_id:
          type: integer
          format: int64
        line:
          type: string
        price:
          type: string
        previous_price:
          type: string
          nullable: true
        closed_at:
          type: string
          format: date-time
          description: >-
            Closing timestamp for this history row; omitted if no recorded
            closure.
        change_type:
          type: string
          description: >-
            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:
          type: boolean
          description: >-
            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:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-TheRundown-Key
      description: Recommended API key request header for new integrations

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.