> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oddspapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 历史期货赔率

> 获取期货的历史赔率变化。

查询模式：必需 `futureId` + （未提供 `oddsIds` 时必需 `bookmakers`）或 `oddsIds`。



## OpenAPI

````yaml /zh/api-reference/openapi.json get /futures/odds/historical
openapi: 3.1.0
info:
  title: 赔率 API v5
  version: 5.0.0
  description: 高性能赔率API，由Valkey + Supabase RPC发现支持。
servers:
  - url: https://v5.oddspapi.io/zh
security:
  - ApiKeyAuth: []
tags:
  - name: common
  - name: fixtures
  - name: fixtures/odds
  - name: futures
  - name: futures/odds
  - name: mapping
  - name: media
  - name: settlement
paths:
  /futures/odds/historical:
    get:
      tags:
        - futures/odds
      summary: 历史期货赔率
      description: |-
        获取期货的历史赔率变化。

        查询模式：必需 `futureId` + （未提供 `oddsIds` 时必需 `bookmakers`）或 `oddsIds`。
      operationId: futures_odds_historical__lang__futures_odds_historical_get
      parameters:
        - $ref: '#/components/parameters/futureIdStringRequired'
        - name: bookmakers
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: >-
            Comma/space-separated bookmaker slugs. RULE: If oddsIds is NOT
            provided, you must pass exactly ONE bookmaker.
        - name: oddsIds
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: 'Optional: comma/space-separated oddsIds to restrict the response.'
      responses:
        '200':
          description: Returns FutureOddsHistoricalResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FutureOddsHistoricalResponse'
              examples:
                example:
                  summary: Future historical odds
                  value:
                    futureId: pm6980037088158379224
                    odds:
                      polymarket:
                        pm6980037088158379224:polymarket:5432:
                          '1776000000000':
                            bookmaker: polymarket
                            participantId: 5432
                            price: 3.2
                            active: true
                            changedAt: 1776000000000
                          '1776667000000':
                            bookmaker: polymarket
                            participantId: 5432
                            price: 3.8
                            active: true
                            changedAt: 1776667000000
                    bookmakers:
                      polymarket:
                        bookmaker: polymarket
                        bookmakerFutureId: '16263'
                        participantsRotated: false
        '400':
          $ref: '#/components/responses/ApiError'
        '401':
          $ref: '#/components/responses/ApiError'
        '403':
          $ref: '#/components/responses/ApiError'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/ApiError'
components:
  parameters:
    futureIdStringRequired:
      name: futureId
      in: query
      required: true
      schema:
        type: string
      description: Single future ID (e.g. id11000132131631).
  schemas:
    FutureOddsHistoricalResponse:
      type: object
      additionalProperties: true
    Error:
      type: object
      description: Concrete error format returned by this API (no FastAPI detail wrapper).
      properties:
        error:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Machine-readable reason code
        details:
          description: Optional extra details (string/object/array depending on the error).
      required:
        - error
        - message
      additionalProperties: true
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    ValidationError:
      title: ValidationError
      type: object
      required:
        - loc
        - msg
        - type
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
  responses:
    ApiError:
      description: API error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalid_filters:
              summary: Invalid filters
              value:
                error: 400
                message: Invalid filters.
                reason: invalid_filters
            invalid_api_key:
              summary: Invalid apiKey
              value:
                error: 401
                message: invalid apiKey
                reason: invalid_api_key
            rate_limited:
              summary: Rate limited
              value:
                error: 429
                message: rate limit exceeded
                reason: rate_limited
                retryAfterSec: 1
    ValidationError:
      description: Validation Error (framework-level)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: apiKey
      description: Your API key (query-based auth for v5).

````