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

# V2: Find a same-book parlay price (alias)

> Compare the mathematical combined price across books that currently have every requested leg open.

## Endpoint details

Compare the mathematical combined price across books that currently have every requested leg open. This is a read-only calculation and does not place a bet. Authenticate with X-TheRundown-Key (recommended) or key=. Returned books, player props, live periods and data delay respect the subscription. No separate Pro gate applies; ordinary plan data/period/prop restrictions still apply. A request needs 2–25 legs. Each returned book costs one data point. The two routes are aliases of the same handler. Combined prices do not guarantee betslip/SGP eligibility, and incomplete books are omitted. The example shows two legs with no eligible book having a matching price for every leg; an empty books array is a valid result.

## Example response

Examples are shortened for readability; counts retain the source values.

```json 200 theme={null}
{
  "meta": {
    "source": "mixed",
    "as_of": "2026-12-05T01:00:00Z",
    "count": 0,
    "warnings": [
      "best_same_book_combined_price does not guarantee sportsbook betslip eligibility"
    ]
  },
  "books": []
}
```

## Response fields

| Field | Type | Description |
| - | - | - |
| `meta` | object | Response source, freshness, result count and diagnostic metadata. |
| `meta.source` | string | Source used to serve the response. |
| `meta.as_of` | string | Latest included price-update time; the current UTC response time when no price rows contribute. This is not a guaranteed observation or delivery timestamp. |
| `meta.count` | integer | Number of rows returned. |
| `meta.sport_id` | integer | Sport scope for sport/date discovery endpoints. |
| `meta.date` | string | Event date scope. |
| `meta.date_from` | string | UTC lower bound used for the event date scope. |
| `meta.date_to` | string | UTC upper bound used for the event date scope. |
| `meta.window_minutes` | integer | Lookback window used for steamer detection. |
| `meta.stale` | boolean | True when the newest included price update is more than 15 minutes old; quiet books can still have valid unchanged prices. |
| `meta.warnings` | array | Diagnostic notices about fallback reads, unavailable data or the age of the returned prices. Empty results may be accompanied by a warning. |
| `books` | array | Sportsbooks that currently have every requested leg open, sorted by combined decimal odds descending. |
| `books[].affiliate_id` | integer | TheRundown sportsbook or exchange affiliate identifier. |
| `books[].affiliate_name` | string | Display name of the sportsbook or exchange. |
| `books[].decimal_odds` | number | Product of the selected legs’ decimal odds, rounded to four decimal places. |
| `books[].american_odds` | number | Combined same-book price expressed as American odds. |
| `books[].best_same_book_combined_only` | boolean | Always true: this is the mathematical same-book combined price, not confirmation of sportsbook betslip or same-game-parlay eligibility. |
| `books[].legs` | array | The selections used for this same-book combined price. |


## OpenAPI

````yaml openapi.yaml POST /api/v2/parlays/best-book
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 data API: odds, lines, scores and statistics
    across major North American and international sports leagues.


    ## Authentication

    Operations marked keyless do not require an API key. All other operations
    accept the `X-TheRundown-Key` header or the legacy `key` query parameter.
    Prefer a private server-side environment variable and the header; avoid
    exposing credentials in URLs or browser assets.


    ## RapidAPI compatibility

    `/api/v1/v2/*` is an alias of `/api/v2/*` for RapidAPI integrations. These
    aliases use the same V2 handlers and response representations; the canonical
    V2 paths are documented once here.


    ## 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)
  - name: V2 Odds
    description: Best prices, line movement, consensus and same-book parlay calculations.
  - name: V2 Promotions
    description: Source-reported sportsbook odds boosts and promotions.
  - name: V2 Public
    description: Allowlisted keyless delayed and cached public data.
externalDocs:
  description: Build with AI guide
  url: https://therundown.io/build-with-ai
paths:
  /api/v2/parlays/best-book:
    post:
      tags:
        - V2 Odds
      summary: Find a same-book parlay price (alias)
      description: >-
        Compare the mathematical combined price across books that currently have
        every requested leg open. This is a read-only calculation and does not
        place a bet. Authenticate with X-TheRundown-Key (recommended) or key=.
        Returned books, player props, live periods and data delay respect the
        subscription. No separate Pro gate applies; ordinary plan
        data/period/prop restrictions still apply. A request needs 2–25 legs.
        Each returned book costs one data point. The two routes are aliases of
        the same handler. Combined prices do not guarantee betslip/SGP
        eligibility, and incomplete books are omitted. The example shows two
        legs with no eligible book having a matching price for every leg; an
        empty books array is a valid result.
      operationId: v2GetBestParlayBook
      parameters:
        - name: affiliate_ids
          in: query
          required: false
          description: >-
            Additional comma-separated affiliate filter read by the shared
            access filter. Intersects body affiliate_ids and plan-allowed books;
            omit to use only body/plan filters.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestNewParlayBookRequest'
            example:
              legs:
                - event_id: evt-0
                  market_id: 1
                - event_id: evt-1
                  market_id: 1
      responses:
        '200':
          description: >-
            Successful response. Arrays may be empty when no eligible records
            match.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestNewParlayBookResponse'
              example:
                meta:
                  source: mixed
                  as_of: '2026-12-05T01:00:00Z'
                  count: 0
                  warnings:
                    - >-
                      best_same_book_combined_price does not guarantee
                      sportsbook betslip eligibility
                books: []
          headers:
            X-Datapoints:
              description: Billable result count for this response, as described above.
              schema:
                type: integer
                minimum: 0
        '400':
          description: >-
            Malformed JSON, fewer than 2 or more than 25 legs, or a leg missing
            event_id/market_id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestNewError'
              example:
                error: at least two legs are required
        '401':
          description: Missing, invalid or revoked API credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestNewUnauthorized'
              example:
                message: unauthorized
        '403':
          description: >-
            The plan does not include the requested feature/date, or account
            access is blocked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestNewForbidden'
        '429':
          description: >-
            Request-rate or data-point allowance exceeded. Error metadata
            depends on the exhausted allowance; Retry-After is supplied when
            applicable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestNewRateLimit'
              example:
                error: Rate limit exceeded
                limit: 10
          headers:
            Retry-After:
              description: Seconds until the request may be retried.
              schema:
                type: integer
        '500':
          description: Unexpected JSON encoding error or failed requested odds conversion.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestNewError'
              example:
                error: json encoding error
        '503':
          description: >-
            Enabled-book membership changed repeatedly during this response;
            retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestNewError'
              example:
                error: >-
                  affiliate visibility changed while reading response; retry
                  request
      security:
        - ApiKeyHeader: []
        - ApiKeyQuery: []
components:
  schemas:
    RestNewParlayBookRequest:
      type: object
      required:
        - legs
      properties:
        legs:
          type: array
          minItems: 2
          items:
            $ref: '#/components/schemas/RestNewParlayLegRequest'
          description: >-
            Between 2 and 25 requested selections; every returned book must have
            an eligible price for every leg.
          maxItems: 25
        affiliate_ids:
          type: array
          items:
            type: integer
          description: >-
            Optional list of sportsbook affiliate IDs to consider; the
            subscription may further restrict the returned set.
        limit:
          type: integer
          minimum: 1
          maximum: 100
          description: Maximum books returned. Missing, below 1 or above 100 uses 25.
          default: 25
      description: ParlayBook request.
    RestNewParlayBookResponse:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/RestNewOddsDiscoveryMeta'
          description: Response source, freshness, result count and diagnostic metadata.
        books:
          type: array
          items:
            $ref: '#/components/schemas/RestNewParlayBookPick'
          description: >-
            Sportsbooks that currently have every requested leg open, sorted by
            combined decimal odds descending.
      description: ParlayBook response.
    RestNewError:
      type: object
      properties:
        error:
          type: string
          description: Human-readable explanation of why the request failed.
      description: Error.
    RestNewUnauthorized:
      type: object
      properties:
        message:
          type: string
          description: Human-readable authentication or request failure message.
      description: Unauthorized.
    RestNewForbidden:
      type: object
      properties:
        error:
          type: string
          description: Human-readable explanation of why the request failed.
        upgrade_url:
          type: string
          description: Relative URL of the appropriate plan or account upgrade page.
      description: Forbidden.
    RestNewRateLimit:
      type: object
      properties:
        error:
          type: string
          description: Human-readable explanation of why the request failed.
        limit:
          type: integer
          description: >-
            Maximum number of result rows requested or the allowance that was
            exceeded, as described by the containing response.
        used:
          type: integer
          description: Data points already used in the applicable allowance period.
        period:
          type: string
          description: Billing or allowance period identifier.
        required_tier:
          type: string
          description: Minimum suggested tier for the rejected request.
        upgrade_url:
          type: string
          description: Relative URL of the appropriate plan or account upgrade page.
        upgrade_message:
          type: string
          description: >-
            Human-readable description of the allowance or feature available on
            an upgraded plan.
      description: RateLimit.
    RestNewParlayLegRequest:
      type: object
      required:
        - event_id
        - market_id
        - period_id
      properties:
        event_id:
          type: string
          description: Required nonempty event ID for this leg.
        market_id:
          type: integer
          description: Required market-definition ID for this leg; zero is rejected.
        period_id:
          type: integer
          description: Market period identifier; 0 is full game.
        participant_id:
          type: integer
          description: Identifier of the team, player or other selection participant.
        participant_type:
          type: integer
          description: Numeric participant-kind identifier, when supplied.
        market_participant_id:
          type: integer
          format: int64
          description: Identifier of the event-market participant row.
        side:
          type: string
          description: Use over or under for total-style markets.
          enum:
            - over
            - under
        line:
          type: string
          description: >-
            Stored line value or selection label. Exact-line filters compare
            this string after trimming surrounding whitespace.
        include_alternates:
          type: boolean
          description: >-
            Whether alternate/extended lines may be considered when an exact
            line is not supplied.
      description: One requested event/market selection in a same-book price calculation.
    RestNewOddsDiscoveryMeta:
      type: object
      properties:
        source:
          type: string
          description: Source used to serve the response.
          example: redis
        as_of:
          type: string
          format: date-time
          description: >-
            Latest included price-update time; the current UTC response time
            when no price rows contribute. This is not a guaranteed observation
            or delivery timestamp.
        count:
          type: integer
          description: Number of rows returned.
        sport_id:
          type: integer
          description: Sport scope for sport/date discovery endpoints.
        date:
          type: string
          format: date
          description: Event date scope.
        date_from:
          type: string
          format: date-time
          description: UTC lower bound used for the event date scope.
        date_to:
          type: string
          format: date-time
          description: UTC upper bound used for the event date scope.
        window_minutes:
          type: integer
          description: Lookback window used for steamer detection.
        stale:
          type: boolean
          description: >-
            True when the newest included price update is more than 15 minutes
            old; quiet books can still have valid unchanged prices.
        warnings:
          type: array
          items:
            type: string
          description: >-
            Diagnostic notices about fallback reads, unavailable data or the age
            of the returned prices. Empty results may be accompanied by a
            warning.
      description: Response source, freshness, result count and diagnostic metadata.
    RestNewParlayBookPick:
      type: object
      properties:
        affiliate_id:
          type: integer
          description: TheRundown sportsbook or exchange affiliate identifier.
        affiliate_name:
          type: string
          description: Display name of the sportsbook or exchange.
        decimal_odds:
          type: number
          format: double
          description: >-
            Product of the selected legs’ decimal odds, rounded to four decimal
            places.
        american_odds:
          type: number
          format: double
          description: Combined same-book price expressed as American odds.
        best_same_book_combined_only:
          type: boolean
          description: >-
            Always true: this is the mathematical same-book combined price, not
            confirmation of sportsbook betslip or same-game-parlay eligibility.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/RestNewOddsPrice'
          description: The selections used for this same-book combined price.
      description: >-
        A sportsbook with a complete set of eligible legs and its combined
        mathematical price.
    RestNewOddsPrice:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: >-
            Identifier of this price record. Keep it unchanged when linking to
            the corresponding history resource.
        event_id:
          type: string
          description: TheRundown event identifier.
        sport_id:
          type: integer
          description: TheRundown sport or league identifier; see the Sports reference.
        affiliate_id:
          type: integer
          description: TheRundown sportsbook or exchange affiliate identifier.
        affiliate_name:
          type: string
          description: Display name of the sportsbook or exchange.
        market_id:
          type: integer
          description: TheRundown market-definition identifier.
        market_participant_id:
          type: integer
          format: int64
          description: Identifier of the event-market participant row.
        participant_id:
          type: integer
          description: Identifier of the team, player or other selection participant.
        participant_type:
          type: integer
          description: Numeric participant-kind identifier, when supplied.
        period_id:
          type: integer
          description: Market period identifier; 0 is full game.
        line:
          type: string
          description: >-
            Stored line value or selection label. Exact-line filters compare
            this string after trimming surrounding whitespace.
        price:
          type: string
          description: >-
            Current quoted odds, American by default; odds_format can return
            decimal, fractional or probability representations.
          example: '-110'
        previous_price:
          type: string
          description: >-
            Previous recorded price, when available; represented in the
            requested odds format.
        implied_probability:
          type: number
          format: double
          description: >-
            Raw implied win probability calculated from the price, as a fraction
            from 0 to 1.
        move_bps:
          type: integer
          format: int64
          description: Absolute implied-probability movement in basis points.
        is_main_line:
          type: boolean
          description: >-
            Whether this is the source book’s current main line for the
            selection.
        updated_at:
          type: string
          format: date-time
          description: UTC timestamp of the source price update.
        closed_at:
          type: string
          format: date-time
          description: Timestamp when closed. Omitted while open.
        indexed_at:
          type: string
          format: date-time
          description: >-
            UTC time the price document was indexed for odds discovery, when
            supplied.
        liquidity_usd:
          type: number
          description: >-
            Approximate USD resting-order depth reported by the venue
            (exchange-style sources only: Kalshi, Polymarket). Omitted entirely
            — never explicit null — when the venue does not report liquidity,
            which is every traditional sportsbook today.
          example: 4210.5
      description: >-
        One eligible sportsbook or exchange price with selection identity and
        timestamps.
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-TheRundown-Key
      description: Recommended API key request header for new integrations
    ApiKeyQuery:
      type: apiKey
      in: query
      name: key
      description: >-
        API key as query parameter. Deprecated for new integrations; retained
        for existing integrations.
      x-deprecated: true

````

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