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

# 赛事结算

> 获取赛事的结算数据。

查询模式：必需 `fixtureId` + 可选 `outcomeId`、可选 `playerId`。



## OpenAPI

````yaml /zh/api-reference/openapi.json get /fixtures/settlement
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:
  /fixtures/settlement:
    get:
      tags:
        - settlement
      summary: 赛事结算
      description: |-
        获取赛事的结算数据。

        查询模式：必需 `fixtureId` + 可选 `outcomeId`、可选 `playerId`。
      operationId: fixtures_settlement__lang__fixtures_settlement_get
      parameters:
        - $ref: '#/components/parameters/fixtureIdStringRequired'
        - name: outcomeId
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: 'Optional: restrict settlements to a single outcomeId.'
        - name: playerId
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: 'Optional: restrict settlements to a single playerId.'
      responses:
        '200':
          description: Returns FixtureSettlementResponse (fixture meta + settlements[])
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FixtureSettlementResponse'
              examples:
                example:
                  summary: Fixture settlement
                  value:
                    fixtureId: id1400003160574219
                    status:
                      live: false
                      statusId: 2
                      statusName: Finished
                    sport:
                      sportId: 14
                      sportName: American Football
                    tournament:
                      tournamentId: 31
                      tournamentName: NFL
                      categoryName: USA
                    season:
                      seasonId: null
                      seasonName: null
                      seasonRound: null
                    venue:
                      venueId: null
                      venueName: null
                      venueLocation: null
                    startTime: 1766685600
                    trueStartTime: '2025-12-25T18:00:17.744256+00:00'
                    trueEndTime: '2025-12-25T21:09:09.345372+00:00'
                    participants:
                      participant1Id: 4423
                      participant1RotNr: null
                      participant1Name: Minnesota Vikings
                      participant1ShortName: Vikings
                      participant1Abbr: null
                      participant2Id: 4419
                      participant2RotNr: null
                      participant2Name: Detroit Lions
                      participant2ShortName: Lions
                      participant2Abbr: null
                    scores:
                      result:
                        period: result
                        participant1Score: 23
                        participant2Score: 30
                        updatedAt: '2025-12-25T20:59:04.218194+00:00'
                    clock:
                      currentPeriod: null
                      currentTime: null
                      remainingTime: null
                      remainingTimeInPeriod: null
                      stopped: null
                    expectedPeriods: 4
                    periodLength: 15
                    externalProviders:
                      betgeniusId: 12281950
                      betradarId: 60574219
                      flashscoreId: lWoCl15F
                      mollybetId: 2025-12-25,10050390,21622
                      opticoddsId: 20251225B0C134B3
                      pinnacleId: 1621042823
                      sofascoreId: 13897686
                    settlements:
                      - marketId: 101
                        marketType: 1x2
                        outcomeId: 142
                        playerId: 0
                        status: won
                        team1Score: 23
                        team2Score: 30
                        periods:
                          - fulltime
                        margin: 7
                      - marketId: 101
                        marketType: 1x2
                        outcomeId: 141
                        playerId: 0
                        status: lost
                        team1Score: 23
                        team2Score: 30
                        periods:
                          - fulltime
                        margin: -7
                        reason: result
        '400':
          $ref: '#/components/responses/ApiError'
        '401':
          $ref: '#/components/responses/ApiError'
        '403':
          $ref: '#/components/responses/ApiError'
        '404':
          $ref: '#/components/responses/ApiError'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/ApiError'
components:
  parameters:
    fixtureIdStringRequired:
      name: fixtureId
      in: query
      required: true
      schema:
        type: string
      description: Single fixture ID (e.g. id1400003160574219).
  schemas:
    FixtureSettlementResponse:
      allOf:
        - $ref: '#/components/schemas/Fixture'
        - type: object
          properties:
            settlements:
              type: array
              items:
                $ref: '#/components/schemas/SettlementItem'
          required:
            - settlements
          additionalProperties: true
    Fixture:
      type: object
      properties:
        fixtureId:
          type: string
        status:
          $ref: '#/components/schemas/Status'
        sport:
          $ref: '#/components/schemas/SportRef'
        tournament:
          $ref: '#/components/schemas/TournamentRef'
        season:
          $ref: '#/components/schemas/SeasonRef'
        venue:
          $ref: '#/components/schemas/VenueRef'
        startTime:
          type: integer
        trueStartTime:
          type:
            - string
            - 'null'
        trueEndTime:
          type:
            - string
            - 'null'
        participants:
          $ref: '#/components/schemas/ParticipantsRef'
        scores:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ScorePeriod'
        clock:
          anyOf:
            - $ref: '#/components/schemas/Clock'
            - type: 'null'
        expectedPeriods:
          type:
            - integer
            - 'null'
        periodLength:
          type:
            - integer
            - 'null'
        externalProviders:
          $ref: '#/components/schemas/ExternalProviders'
        bookmakers:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/BookmakerFixtureMeta'
      required:
        - fixtureId
        - status
        - sport
        - tournament
        - season
        - venue
        - startTime
        - participants
        - scores
        - clock
        - externalProviders
        - bookmakers
      additionalProperties: true
    SettlementItem:
      type: object
      properties:
        marketId:
          type:
            - integer
            - 'null'
        marketType:
          type:
            - string
            - 'null'
        outcomeId:
          type:
            - integer
            - 'null'
        playerId:
          type:
            - integer
            - 'null'
        status:
          type:
            - string
            - 'null'
        margin:
          type:
            - number
            - 'null'
        team1Score:
          type:
            - integer
            - 'null'
        team2Score:
          type:
            - integer
            - 'null'
        periods:
          type:
            - array
            - 'null'
          items:
            type: string
        reason:
          type:
            - string
            - 'null'
      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'
    Status:
      type: object
      properties:
        live:
          type: boolean
        statusId:
          type: integer
        statusName:
          type: string
      required:
        - live
        - statusId
        - statusName
      additionalProperties: true
    SportRef:
      type: object
      properties:
        sportId:
          type: integer
        sportName:
          type: string
      required:
        - sportId
        - sportName
      additionalProperties: true
    TournamentRef:
      type: object
      properties:
        tournamentId:
          type: integer
        tournamentName:
          type: string
        categoryName:
          type:
            - string
            - 'null'
      required:
        - tournamentId
        - tournamentName
      additionalProperties: true
    SeasonRef:
      type: object
      properties:
        seasonId:
          type:
            - integer
            - 'null'
        seasonName:
          type:
            - string
            - 'null'
        seasonRound:
          type:
            - integer
            - 'null'
      additionalProperties: true
    VenueRef:
      type: object
      properties:
        venueId:
          type:
            - integer
            - 'null'
        venueName:
          type:
            - string
            - 'null'
        venueLocation:
          type:
            - string
            - 'null'
      additionalProperties: true
    ParticipantsRef:
      type: object
      properties:
        participant1Id:
          type: integer
        participant1RotNr:
          type:
            - integer
            - 'null'
        participant1Name:
          type:
            - string
            - 'null'
        participant1ShortName:
          type:
            - string
            - 'null'
        participant1Abbr:
          type:
            - string
            - 'null'
        participant2Id:
          type: integer
        participant2RotNr:
          type:
            - integer
            - 'null'
        participant2Name:
          type:
            - string
            - 'null'
        participant2ShortName:
          type:
            - string
            - 'null'
        participant2Abbr:
          type:
            - string
            - 'null'
      required:
        - participant1Id
        - participant2Id
      additionalProperties: true
    ScorePeriod:
      type: object
      properties:
        period:
          type: string
        participant1Score:
          type: integer
        participant2Score:
          type: integer
        updatedAt:
          type: string
      required:
        - period
        - participant1Score
        - participant2Score
        - updatedAt
      additionalProperties: true
    Clock:
      type: object
      properties:
        currentPeriod:
          type:
            - string
            - 'null'
        currentTime:
          type:
            - string
            - 'null'
        remainingTime:
          type:
            - string
            - 'null'
        remainingTimeInPeriod:
          type:
            - string
            - 'null'
        stopped:
          type:
            - boolean
            - 'null'
      additionalProperties: true
    ExternalProviders:
      type: object
      additionalProperties: true
    BookmakerFixtureMeta:
      type: object
      properties:
        bookmaker:
          type: string
        bookmakerFixtureId:
          type:
            - string
            - 'null'
        fixturePath:
          type:
            - string
            - 'null'
        hasOdds:
          type: boolean
        staleOdds:
          type: boolean
        staleOddsResponseCode:
          type:
            - integer
            - 'null'
        suspended:
          type: boolean
        participantsRotated:
          type: boolean
        meta:
          type:
            - object
            - 'null'
          additionalProperties: true
        updatedAt:
          type: string
      required:
        - bookmaker
        - hasOdds
        - staleOdds
        - suspended
        - participantsRotated
        - updatedAt
      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).

````