> ## 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 changes since a given ID

> Returns market line price changes (new, updated, closed) since the specified `last_id`. Use for efficient polling.

**Bootstrap flow:** To obtain an initial `last_id` cursor, call `GET /api/v2/sports/{sportID}/events/{date}` — the response `meta.delta_last_id` provides the current cursor. Then pass that value as `last_id` to begin polling this endpoint.

**Staleness guard:** Cursors older than 30 minutes are rejected with HTTP 400. If your cursor becomes stale, re-bootstrap from the events endpoint.




## OpenAPI

````yaml get /api/v2/markets/delta
openapi: 3.1.0
info:
  title: TheRundown Sports API
  version: 2.0.0
  description: >
    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.
    Pass your API key using one of:

    - **Query parameter**: `?key=YOUR_API_KEY`

    - **Header**: `X-Therundown-Key: YOUR_API_KEY`

    ## 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:
  - ApiKeyQuery: []
  - 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 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)
paths:
  /api/v2/markets/delta:
    get:
      tags:
        - V2 Markets
      summary: Get market price changes since a given ID
      description: >
        Returns market line price changes (new, updated, closed) since the
        specified `last_id`. Use for efficient polling.


        **Bootstrap flow:** To obtain an initial `last_id` cursor, call `GET
        /api/v2/sports/{sportID}/events/{date}` — the response
        `meta.delta_last_id` provides the current cursor. Then pass that value
        as `last_id` to begin polling this endpoint.


        **Staleness guard:** Cursors older than 30 minutes are rejected with
        HTTP 400. If your cursor becomes stale, re-bootstrap from the events
        endpoint.
      operationId: v2GetMarketsDelta
      parameters:
        - name: last_id
          in: query
          required: true
          schema:
            type: integer
            format: int64
          description: >-
            Return changes with ID greater than this value. Obtain the initial
            cursor from the `meta.delta_last_id` field in the v2 events
            response. Cursors older than 30 minutes are rejected.
        - name: sport_id
          in: query
          schema:
            type: integer
          description: Filter by sport ID
        - $ref: '#/components/parameters/AffiliateIDsQuery'
        - name: market_ids
          in: query
          schema:
            type: string
          description: Comma-separated market IDs to filter
        - name: event_id
          in: query
          schema:
            type: string
          description: Filter by event ID
        - name: limit
          in: query
          schema:
            type: integer
            default: 1000
            maximum: 5000
      responses:
        '200':
          description: Market deltas
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketDeltaResponse'
              example:
                meta:
                  delta_last_id: '193500000'
                  count: 2
                  has_more: false
                deltas:
                  - id: 193499998
                    event_id: 09bfa53f8484a63e584398545c035932
                    sport_id: 4
                    affiliate_id: 19
                    market_id: 1
                    market_name: moneyline
                    participant_id: 11
                    participant_type: TYPE_TEAM
                    participant_name: Atlanta Hawks
                    line: ''
                    price: '-112'
                    previous_price: '-110'
                    change_type: price_change
                    updated_at: '2026-02-12T00:10:43Z'
                  - id: 193499999
                    event_id: 09bfa53f8484a63e584398545c035932
                    sport_id: 4
                    affiliate_id: 19
                    market_id: 3
                    market_name: totals
                    participant_id: 1001
                    participant_type: TYPE_RESULT
                    participant_name: Over
                    line: '235.5'
                    price: '-110'
                    previous_price: '-108'
                    change_type: price_change
                    updated_at: '2026-02-12T00:10:43Z'
        '400':
          description: Invalid or stale cursor
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                stale_cursor:
                  summary: Cursor older than 30 minutes
                  value:
                    error: >-
                      last_id is stale (>30 min), re-bootstrap from events
                      endpoint
                not_found:
                  summary: Cursor ID not found
                  value:
                    error: last_id not found, re-bootstrap from events endpoint
components:
  parameters:
    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), Bovada (2), Pinnacle
        (3).
  schemas:
    MarketDeltaResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            delta_last_id:
              type: string
              description: Use this as `last_id` in the next request
            count:
              type: integer
            has_more:
              type: boolean
              description: >-
                If true, there are more results — poll again immediately with
                the returned delta_last_id
        deltas:
          type: array
          items:
            $ref: '#/components/schemas/MarketDeltaEntry'
    MarketDeltaEntry:
      type: object
      description: A single market line price change entry from the delta feed
      properties:
        id:
          type: integer
          format: int64
        event_id:
          type: string
        sport_id:
          type: integer
        affiliate_id:
          type: integer
        market_id:
          type: integer
          format: int64
        market_name:
          type: string
        participant_id:
          type: integer
          description: Normalized participant ID (team_id, player_id, or result_id)
        participant_type:
          type: string
          enum:
            - TYPE_TEAM
            - TYPE_PLAYER
            - TYPE_RESULT
        participant_name:
          type: string
        line:
          type: string
          description: >-
            Line value (e.g., "-4.5" for spread, "224.5" for total, "" for
            moneyline)
        price:
          type: string
          description: American odds price as a string (e.g., "-110", "150")
        previous_price:
          type: string
          nullable: true
          description: Previous price before this change
        change_type:
          type: string
          description: Type of change (e.g., "price_change", "new", "close", "reopen")
        closed_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: key
      description: API key as query parameter
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Therundown-Key
      description: API key as request header

````