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

# 获取盘口

> 列出盘口。

查询模式：`marketIds` 或 `sportId` 或 `outcomeIds`。



## OpenAPI

````yaml /zh/api-reference/openapi.json get /markets
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:
  /markets:
    get:
      tags:
        - common
      summary: 获取盘口
      description: |-
        列出盘口。

        查询模式：`marketIds` 或 `sportId` 或 `outcomeIds`。
      operationId: get_markets__lang__markets_get
      parameters:
        - name: marketIds
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: Comma- or space-separated market IDs.
        - name: sportId
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: Single sport ID.
        - name: outcomeIds
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: Comma- or space-separated outcome IDs.
      responses:
        '200':
          description: Returns Market[]
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketList'
              examples:
                example:
                  summary: Markets list
                  value:
                    - marketId: 111
                      marketLength: 2
                      sportId: 11
                      playerProp: false
                      handicap: 0
                      period: result
                      marketType: moneyline
                      marketName: Winner (incl. overtime)
                      marketNameShort: Winner
                      outcomes:
                        - outcomeId: 111
                          outcomeName: '1'
                        - outcomeId: 112
                          outcomeName: '2'
                    - marketId: 113
                      marketLength: 3
                      sportId: 11
                      playerProp: false
                      handicap: 0
                      period: fulltime
                      marketType: 1x2
                      marketName: Regular Time Result
                      marketNameShort: 1X2
                      outcomes:
                        - outcomeId: 113
                          outcomeName: '1'
                        - outcomeId: 114
                          outcomeName: X
                        - outcomeId: 115
                          outcomeName: '2'
        '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:
  schemas:
    MarketList:
      type: array
      items:
        $ref: '#/components/schemas/Market'
    Market:
      type: object
      properties:
        marketId:
          type: integer
        sportId:
          type:
            - integer
            - 'null'
        marketType:
          type:
            - string
            - 'null'
        period:
          type:
            - string
            - 'null'
        marketLength:
          type:
            - integer
            - 'null'
        playerProp:
          type:
            - boolean
            - 'null'
        handicap:
          type:
            - number
            - 'null'
        marketName:
          type:
            - string
            - 'null'
        marketNameShort:
          type:
            - string
            - 'null'
        outcomes:
          type: array
          items:
            $ref: '#/components/schemas/MarketOutcome'
      required:
        - marketId
      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'
    MarketOutcome:
      type: object
      properties:
        outcomeId:
          type: integer
        outcomeName:
          type:
            - string
            - 'null'
      required:
        - outcomeId
      additionalProperties: true
    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).

````