> ## 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 closing prices for an event

> Returns the latest recorded price for each available line and sportsbook at or before the event's scheduled start time. Before the event starts, the snapshot is provisional. Period markets use the event start time as their closing cutoff. The response always uses an `events` array, even for one event ID.

Historical-data access and the event-date lookback depend on your plan. Omit `hide_closed` or use `false` to include currently closed prices in completed-event snapshots. The event can be returned without prices when no recorded lines match the filters.

For price changes over time, use `GET /api/v2/events/{eventID}/markets/history` or `GET /api/v2/events/{eventID}/markets/{marketID}/history`. See the [Historical Odds guide](/guides/historical-odds) for examples.




## OpenAPI

````yaml get /api/v2/events/{eventID}/closing
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}/closing:
    get:
      tags:
        - V2 Events
      summary: Get closing prices for an event
      description: >
        Returns the latest recorded price for each available line and sportsbook
        at or before the event's scheduled start time. Before the event starts,
        the snapshot is provisional. Period markets use the event start time as
        their closing cutoff. The response always uses an `events` array, even
        for one event ID.


        Historical-data access and the event-date lookback depend on your plan.
        Omit `hide_closed` or use `false` to include currently closed prices in
        completed-event snapshots. The event can be returned without prices when
        no recorded lines match the filters.


        For price changes over time, use `GET
        /api/v2/events/{eventID}/markets/history` or `GET
        /api/v2/events/{eventID}/markets/{marketID}/history`. See the
        [Historical Odds guide](/guides/historical-odds) for examples.
      operationId: v2GetEventClosing
      parameters:
        - $ref: '#/components/parameters/EventIDPath'
        - $ref: '#/components/parameters/MarketIDsQuery'
        - $ref: '#/components/parameters/AffiliateIDsQuery'
        - $ref: '#/components/parameters/MainLineQuery'
        - $ref: '#/components/parameters/HideClosedQuery'
      responses:
        '200':
          description: Event with closing prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsV2Response'
              example:
                meta: {}
                events:
                  - event_id: ebb2dc1a9b7c2e32c4468da5ba60a526
                    sport_id: 3
                    event_date: '2026-09-09T17:10:00Z'
                    markets:
                      - id: 6001161
                        market_id: 11
                        period_id: 0
                        name: bases
                        market_description: Over/under on total bases recorded by a player.
                        participants:
                          - id: 1330
                            type: TYPE_PLAYER
                            name: Kody Clemens
                            lines:
                              - id: 4155be99fb37f9ba2e9fa360e422ea0a
                                value: Under 1.5
                                prices:
                                  '19':
                                    id: '679182630'
                                    price: -149
                                    price_delta: -5
                                    is_main_line: true
                                    updated_at: '2026-09-09T16:27:46Z'
        '400':
          description: Invalid request parameters
        '401':
          description: Missing or invalid API key
        '403':
          description: The requested historical data is not available for this plan
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
    MarketIDsQuery:
      name: market_ids
      in: query
      schema:
        type: string
        default: 1,2,3
      description: >
        Comma-separated market IDs. Defaults to `1,2,3` (Moneyline, Spread,
        Total); for soccer leagues and NHL the default is `1,2,3,563`. The
        soccer 3-way moneyline (home/draw/away) is served on market 1 as three
        participants; market 563 carries the NHL 60-minute regulation-time line.

        **Limit: 12 market IDs per request.** Requests with more than 12 IDs are
        rejected with a `400` — split larger requests into batches of 12, or
        omit the parameter to use the default.

        On market-definition endpoints (`/api/v2/events/{eventID}/markets`,
        `/api/v2/sports/{sportID}/markets/{date}`), omitting `market_ids`
        returns all available market definitions instead of the default set.

        Common IDs: 1=Moneyline, 2=Spread, 3=Total, 29=Player Points, 35=Player
        Rebounds, 38=Three Pointers, 39=Player Assists, 93=Player PRA, 94=Team
        Totals.

        Live variants: 41=Live ML, 42=Live Spread, 43=Live Total.
    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.
    MainLineQuery:
      name: main_line
      in: query
      schema:
        type: string
        enum:
          - 'true'
          - 'false'
        default: 'false'
      description: >-
        Only return main lines (primary odds, not alternates). On opening and
        closing endpoints, this selects main lines in the snapshot. Use history
        to follow which line was main at each timestamp.
    HideClosedQuery:
      name: hide_closed
      in: query
      schema:
        type: string
        enum:
          - 'true'
          - 'false'
        default: 'false'
      description: >-
        Exclude currently closed lines when `true`. Omit or set `false` to
        retrieve completed historical snapshots; an event can remain when no
        prices match.
  schemas:
    EventsV2Response:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/EventsSnapshotMeta'
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventV2'
    EventsSnapshotMeta:
      type: object
      nullable: true
      properties:
        delta_last_id:
          $ref: '#/components/schemas/MarketDeltaCursor'
    EventV2:
      type: object
      properties:
        event_id:
          type: string
          description: >-
            Canonical event identifier string used by V2 endpoints, filters, and
            delta feeds.
          example: 816efd1e5767d7133b5bc70c77173a18
        event_uuid:
          type: string
          description: >-
            Compatibility identifier retained for older integrations. Do not
            assume it matches `event_id`.
          example: 11f1-197d-e93ea800-8c2a-ef6a554ca62d
        sport_id:
          type: integer
          example: 4
        event_date:
          type: string
          format: date-time
        rotation_number_away:
          type: integer
        rotation_number_home:
          type: integer
        score:
          $ref: '#/components/schemas/Score'
        teams:
          type: array
          items:
            $ref: '#/components/schemas/TeamNormalized'
        schedule:
          $ref: '#/components/schemas/Schedule'
        pitcher_away:
          $ref: '#/components/schemas/Pitcher'
        pitcher_home:
          $ref: '#/components/schemas/Pitcher'
        markets:
          type: array
          items:
            $ref: '#/components/schemas/MarketResponse'
        live_game_state:
          $ref: '#/components/schemas/LiveGameState'
        affiliate_source_ids:
          type: object
          additionalProperties:
            type: string
          description: >-
            Map of affiliate ID (as a string) to that sportsbook's own
            identifier for this event, when available. Useful for deep-linking
            or joining against a book's data. For Polymarket (affiliate 26) the
            value is the Polymarket event slug — see the Source identifiers
            section of the Sportsbook reference.
          example:
            '19': '31580014'
            '23': 34031-88749503
    MarketDeltaCursor:
      description: >-
        Positive whole-integer cursor for `/api/v2/markets/delta`. The API may
        return it as an integer or a numeric string. Use a snapshot value to
        begin market-delta polling only for known zero-delay access when that
        snapshot explicitly reports `X-Data-Delay-Seconds: 0`; otherwise use
        scoped snapshots and never substitute `0`.
      oneOf:
        - type: integer
          format: int64
          minimum: 1
        - type: string
          pattern: ^[1-9][0-9]*$
    Score:
      type: object
      properties:
        event_id:
          type: string
        event_status:
          type: string
          description: >
            Event status. Common values: STATUS_SCHEDULED, STATUS_IN_PROGRESS,
            STATUS_FINAL, STATUS_POSTPONED, STATUS_CANCELED, STATUS_SUSPENDED,
            STATUS_DELAYED, STATUS_RAIN_DELAY, STATUS_HALFTIME,
            STATUS_END_PERIOD, STATUS_END_OF_REGULATION, STATUS_OVERTIME,
            STATUS_FIRST_HALF, STATUS_SECOND_HALF
        team_id_away:
          type: integer
          description: Away team ID. Omitted when zero.
        team_id_home:
          type: integer
          description: Home team ID. Omitted when zero.
        score_away:
          type: integer
        score_home:
          type: integer
        winner_away:
          type: integer
        winner_home:
          type: integer
        score_away_by_period:
          type: array
          items:
            type: integer
        score_home_by_period:
          type: array
          items:
            type: integer
        venue_name:
          type: string
          description: >-
            Arena or stadium name. May be an empty string when unavailable from
            the live feed.
        venue_location:
          type: string
          description: >-
            City and state. May be an empty string when unavailable from the
            live feed.
        game_clock:
          type: integer
        display_clock:
          type: string
        game_period:
          type: integer
        broadcast:
          type: string
        event_status_detail:
          type: string
        updated_at:
          type: string
          format: date-time
    TeamNormalized:
      type: object
      properties:
        team_id:
          type: integer
        name:
          type: string
        mascot:
          type: string
        abbreviation:
          type: string
        record:
          type: string
        is_home:
          type: boolean
        is_away:
          type: boolean
        ranking:
          type: integer
          nullable: true
        conference:
          $ref: '#/components/schemas/Conference'
        division:
          $ref: '#/components/schemas/Division'
    Schedule:
      type: object
      properties:
        season_type:
          type: string
          example: Regular Season
        season_year:
          type: integer
          example: 2026
        conference_competition:
          type: boolean
          nullable: true
        conference_name:
          type: string
        league_name:
          type: string
          nullable: true
        event_name:
          type: string
        attendance:
          type: string
        event_headline:
          type: string
        game_number:
          type: integer
          enum:
            - 1
            - 2
          description: >-
            Game number for a true MLB doubleheader. Omitted for ordinary and
            standalone makeup games.
        game_type:
          type: string
          enum:
            - doubleheader
            - makeup
            - doubleheader_makeup
          description: >-
            Structured MLB doubleheader or makeup classification. Omitted for
            ordinary games.
        week:
          type: integer
        week_name:
          type: string
        week_detail:
          type: string
    Pitcher:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        throws_left_handed:
          type: boolean
          nullable: true
        throws_right_handed:
          type: boolean
          nullable: true
        bats_left_handed:
          type: boolean
          nullable: true
        bats_right_handed:
          type: boolean
          nullable: true
    MarketResponse:
      type: object
      description: Market with participants and prices for a specific event
      properties:
        id:
          type: integer
          format: int64
        market_id:
          type: integer
          example: 1
        period_id:
          type: integer
        name:
          type: string
          example: Money Line
        market_description:
          type: string
        participants:
          type: array
          items:
            $ref: '#/components/schemas/MarketParticipantResponse'
    LiveGameState:
      type: object
      description: >
        Real-time game-state snapshot embedded on live event payloads. Requires
        the live game state entitlement (Ultra plan or higher); keys without it
        never receive this field. Sport-specific blocks (`mlb`, `football`,
        `basketball`, `hockey`) are present only for the relevant sport.
      properties:
        event_id:
          type: string
        sport_id:
          type: integer
        sport:
          type: string
          description: >-
            Sport slug — `mlb`, `nba`, `nba-summer`, `ncaab`, `nfl`, `ncaaf`,
            `nhl`, `wnba`, or `soccer`
          example: mlb
        period:
          type: integer
          description: Current period/inning/quarter number
        half_indicator:
          type: string
          description: >-
            Half within the period where applicable (e.g. `top`/`bottom` for MLB
            innings)
        last_play:
          $ref: '#/components/schemas/LastPlayRef'
        updated_at:
          type: string
          format: date-time
        mlb:
          type: object
          description: Baseball-only snapshot
          properties:
            balls:
              type: integer
            strikes:
              type: integer
            outs:
              type: integer
            on_first:
              $ref: '#/components/schemas/PlayPlayerSummary'
            on_second:
              $ref: '#/components/schemas/PlayPlayerSummary'
            on_third:
              $ref: '#/components/schemas/PlayPlayerSummary'
            current_batter:
              $ref: '#/components/schemas/PlayPlayerSummary'
            current_pitcher:
              $ref: '#/components/schemas/PlayPlayerSummary'
        football:
          type: object
          description: NFL/NCAAF-only snapshot
          properties:
            possession_team_id:
              type: integer
            down:
              type: integer
            distance:
              type: integer
            yard_line:
              type: integer
            down_distance_text:
              type: string
              example: 3rd & 4 at KC 38
            short_down_distance_text:
              type: string
              example: 3rd & 4
            possession_text:
              type: string
            is_red_zone:
              type: boolean
            home_timeouts:
              type: integer
            away_timeouts:
              type: integer
        basketball:
          type: object
          description: NBA/WNBA/NCAAB-only snapshot
          properties:
            possession_team_id:
              type: integer
            home_timeouts:
              type: integer
            away_timeouts:
              type: integer
            home_in_bonus:
              type: boolean
            away_in_bonus:
              type: boolean
        hockey:
          type: object
          description: NHL-only snapshot
          properties:
            possession_team_id:
              type: integer
            strength:
              type: string
              description: Skater strength situation (e.g. even strength, power play)
            power_play_team_id:
              type: integer
            home_shots_on_goal:
              type: integer
            away_shots_on_goal:
              type: integer
            home_goalie_pulled:
              type: boolean
            away_goalie_pulled:
              type: boolean
    Conference:
      type: object
      properties:
        conference_id:
          type: integer
        sport_id:
          type: integer
        name:
          type: string
    Division:
      type: object
      properties:
        division_id:
          type: integer
        conference_id:
          type: integer
        sport_id:
          type: integer
        name:
          type: string
    MarketParticipantResponse:
      type: object
      properties:
        id:
          type: integer
          description: >-
            Stable, joinable participant identifier. Join on this field rather
            than name to avoid shared-name collisions. Its meaning depends on
            `type`: for `TYPE_TEAM` it is the normalized team ID (stable across
            seasons, matches `event.teams[].team_id`; full record at GET
            /api/v2/teams/{team_id}); for `TYPE_PLAYER` it is the player ID
            (full record at GET /api/v2/players/{player_id}); for `TYPE_RESULT`
            it is a small outcome index (e.g. 0/1 for Over/Under) and is not a
            team or player resource key.
          example: 51
        type:
          type: string
          description: >-
            Kind of participant. Determines what `id` points to (team, player,
            or result outcome).
          enum:
            - TYPE_TEAM
            - TYPE_PLAYER
            - TYPE_RESULT
        name:
          type: string
          description: >-
            Display name. Not guaranteed unique across participants — join on
            `id`, not `name`.
          example: New England Patriots
        lines:
          type: array
          items:
            $ref: '#/components/schemas/MarketLinesResponse'
    LastPlayRef:
      type: object
      description: >-
        Reference to the most recent play, mirrored from the play-by-play
        timeline
      properties:
        play_id:
          type: integer
          format: int64
        sequence:
          type: integer
        type:
          type: string
        result:
          type: string
        description:
          type: string
        team_id:
          type: integer
        scoring_play:
          type: boolean
        score_value:
          type: integer
        occurred_at:
          type: string
          format: date-time
        win_probability_home:
          type: number
        participants:
          type: array
          items:
            $ref: '#/components/schemas/PlayParticipant'
    PlayPlayerSummary:
      type: object
      properties:
        player_id:
          type: integer
          format: int64
        name:
          type: string
        team_id:
          type: integer
    MarketLinesResponse:
      type: object
      properties:
        id:
          type: string
        value:
          type: string
          description: >-
            Line value. For spreads/totals this is numeric; for some prop and
            special markets it can be a method, round, threshold, or other
            display value. When `line_value_is_participant` is true, the
            participant usually carries the selection.
        selection:
          type: string
        handicap:
          type: string
        prices:
          type: object
          description: Prices keyed by affiliate ID
          additionalProperties:
            $ref: '#/components/schemas/MarketLinePriceResponse'
    PlayParticipant:
      type: object
      properties:
        player_id:
          type: integer
          format: int64
          description: Normalized player ID — joins to the players endpoints
        name:
          type: string
        team_id:
          type: integer
        role:
          type: string
          example: batter
        position:
          type: string
    MarketLinePriceResponse:
      type: object
      properties:
        id:
          type: string
        price:
          type: number
          description: American odds price. Value of 0.0001 means "off the board".
          example: -110
        price_delta:
          type: number
          nullable: true
          description: Change from previous price
        is_main_line:
          type: boolean
          description: Whether this is the primary/main line
        source_id:
          type: string
          description: >-
            The sportsbook's own identifier for this price/selection, when
            available. Omitted when the book does not expose one. For Polymarket
            (affiliate 26) this encodes
            `<event-slug>-<gamma-market-id>-<clob-token-id>` (parse from the
            right; the two trailing fields are numeric) — see the Source
            identifiers section of the Sportsbook reference for the full mapping
            recipe.
        liquidity_usd:
          type: number
          description: >-
            Approximate USD resting-order-book depth for this price. Polymarket
            reports its own figure directly, refreshed alongside the price;
            Kalshi's is derived from its order book on a separate background
            refresh cadence (see the docs FAQ for details). Present only for
            prediction-market exchanges (Kalshi, affiliate 25; Polymarket,
            affiliate 26) — omitted entirely, never null and never a fabricated
            0, for every traditional sportsbook and for any exchange price
            without a current reading.
          example: 4210.5
        updated_at:
          type: string
          format: date-time
        closed_at:
          type: string
          format: date-time
          description: Closing timestamp for this price; omitted if no recorded closure.
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-TheRundown-Key
      description: Recommended API key request header for new integrations

````