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

# All markets for a single sports event

> Resolves markets for one game. If `game_id` is given, tries a cached lookup first, falling back to a live Polymarket lookup on a miss. If only `slug` is given, first resolves the event's `gameId` via a live Polymarket lookup, then performs the same event-markets lookup. Returns an empty markets list if neither parameter resolves to an event. At least one of `game_id` or `slug` should be supplied; both are optional and unvalidated strings.



## OpenAPI

````yaml /openapi/data-api.yaml get /sports/event-markets
openapi: 3.1.0
info:
  title: Kairos Data API
  version: 1.0.0
  summary: >-
    The full Kairos data plane — markets, candles, trades, search, discover,
    sports, trader analytics, and PnL.
  description: |
    The Kairos Data API at `data.kairos.trade` is the platform's primary data
    plane: market metadata and prices, OHLCV candles, live venue trade proxies,
    normalized trade history, full-text search, discovery feeds, the sports
    catalog, public trader analytics, and account PnL.

    ## Authentication

    Most endpoints accept a Kairos **API key** (`X-Client-Id` + `X-Api-Key` +
    `X-Api-Secret`, all three) or a first-party session JWT. Endpoints tagged
    `public` (trader analytics, provider configs, several sports feeds) need
    no credentials at all. Some endpoints additionally require an API-key
    **scope** (`trade:read`, `position:read`) — stated per operation.

    For high-volume market-data consumption (candles/trades/metadata at
    scale), prefer the dedicated **Market Data API** at `md.kairos.trade` —
    it has higher budgets, ETag caching, and a binary candle format.

    ## Rate limits

    Rate limits use a sliding window keyed on the authenticated user (JWT
    `sub`) or, for anonymous callers, the trusted client IP. Routes belong to
    a named **bucket** (`x-kairos-bucket`) whose per-minute budget is shared
    by every route in it; routes with no bucket run under the service default
    of 100/minute. `x-kairos-rate-limit` states the bucket's compile-time
    default — operators can raise or lower a bucket at runtime, so treat the
    documented number as the baseline, not a contract. 429 responses carry
    `Retry-After` and `X-RateLimit-*`.

    ## Conventions

    - Prices are on the **0–100 cents scale** unless a field says otherwise
      (trader-analytics position/trade prices use the 0–1 scale; each field's
      description states its scale).
    - Errors: `{"detail": "<message>"}` for handler errors; FastAPI's
      standard validation envelope for 422s. Errors surfaced from a venue
      adapter instead use `{"error", "provider", "operation", "message"}` —
      see `DataProviderError`. Unhandled failures always return the generic
      500 body; internal details are logged, never returned.
    - Every request body is capped at 8 MiB service-wide (413).
  contact:
    name: Kairos
    url: https://app.kairos.trade/docs/api-reference
  termsOfService: https://kairos.trade/terms
servers:
  - url: https://data.kairos.trade
    description: Production
  - url: https://staging-data.kairos.trade
    description: Staging
security:
  - apiKeyClientId: []
    apiKeyKey: []
    apiKeySecret: []
paths:
  /sports/event-markets:
    get:
      tags:
        - Sports
      summary: All markets for a single sports event
      description: >-
        Resolves markets for one game. If `game_id` is given, tries a cached
        lookup first, falling back to a live Polymarket lookup on a miss. If
        only `slug` is given, first resolves the event's `gameId` via a live
        Polymarket lookup, then performs the same event-markets lookup. Returns
        an empty markets list if neither parameter resolves to an event. At
        least one of `game_id` or `slug` should be supplied; both are optional
        and unvalidated strings.
      operationId: getSportsEventMarkets
      parameters:
        - name: game_id
          in: query
          required: false
          description: Upstream sports game ID to look up directly.
          schema:
            type: string
          example: '12345678'
        - name: slug
          in: query
          required: false
          description: >-
            Polymarket market slug used to discover the event's gameId when
            game_id is not known.
          schema:
            type: string
          example: nba-lal-bos-2026-01-15-lal
      responses:
        '200':
          description: >-
            Markets for the resolved event. `gameId` echoes the resolved id, or
            falls back to the raw `game_id`/`slug` query value ("unknown" if
            neither was supplied) when nothing could be resolved.
          headers:
            Cache-Control:
              schema:
                type: string
                example: public, max-age=10, s-maxage=10
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SportsEventMarketsResponse'
        '422':
          $ref: '#/components/responses/DataValidationError'
        '429':
          $ref: '#/components/responses/DataRateLimited'
      security: []
components:
  schemas:
    SportsEventMarketsResponse:
      type: object
      required:
        - gameId
        - markets
      properties:
        gameId:
          type: string
          description: >-
            Resolved gameId, or the raw game_id/slug query value ("unknown" if
            neither resolved).
          example: '12345678'
        markets:
          type: array
          items:
            $ref: '#/components/schemas/SportsNormalizedMarket'
    SportsNormalizedMarket:
      type: object
      description: >-
        Upstream market normalized into a common shape used across the
        live-events, event-markets, and upcoming-events endpoints.
      required:
        - id
        - question
        - slug
        - conditionId
        - tokenId
        - outcomePrices
        - outcomes
        - volumeNum
        - liquidityNum
        - acceptingOrders
        - sportsMarketType
        - groupItemTitle
        - bestBid
        - bestAsk
        - spread
        - provider
        - image
        - icon
      properties:
        id:
          type: string
          example: '587234'
        question:
          type: string
          example: Will the Celtics win?
        slug:
          type: string
          example: nba-lal-bos-2026-01-15-bos
        conditionId:
          type: string
          example: 0xabc123...
        tokenId:
          type: string
          description: First clobTokenId for the market.
          example: 10897234...
        outcomePrices:
          type: array
          items:
            type: number
            format: double
          example:
            - 0.6
            - 0.4
        outcomes:
          type: array
          items:
            type: string
          example:
            - 'Yes'
            - 'No'
        volumeNum:
          type: number
          format: double
          example: 128432.1
        liquidityNum:
          type: number
          format: double
          example: 42311
        acceptingOrders:
          type: boolean
        sportsMarketType:
          type:
            - string
            - 'null'
          example: moneyline
        groupItemTitle:
          type:
            - string
            - 'null'
          example: Celtics
        gameStartTime:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Scheduled fixture kickoff used for cross-provider live-game
            matching.
        bestBid:
          type:
            - number
            - 'null'
          format: double
          example: 0.59
        bestAsk:
          type:
            - number
            - 'null'
          format: double
          example: 0.61
        spread:
          type:
            - number
            - 'null'
          format: double
          example: 0.02
        provider:
          type: string
          example: polymarket
        image:
          type:
            - string
            - 'null'
        icon:
          type:
            - string
            - 'null'
        outcomeMarketIds:
          type: array
          description: >-
            Only present on 3-way (soccer moneyline) composite markets. Length
            3, [home, draw, away].
          items:
            type:
              - string
              - 'null'
          example:
            - '587234'
            - '587235'
            - '587236'
        outcomeTokenIds:
          type: array
          description: Per-outcome token IDs in the same order as outcomes, when available.
          items:
            type:
              - string
              - 'null'
        outcomeConditionIds:
          type: array
          description: Only present on 3-way composite markets.
          items:
            type:
              - string
              - 'null'
  responses:
    DataValidationError:
      description: Request failed FastAPI parameter validation.
      content:
        application/json:
          schema:
            type: object
            required:
              - detail
            properties:
              detail:
                type: array
                description: >-
                  One entry per failed field, with location, message, and error
                  type.
                items:
                  type: object
                  additionalProperties: true
    DataRateLimited:
      description: >
        Rate limit exceeded for this route's sliding window, keyed on the
        session `sub` when

        authenticated and on the trusted client IP otherwise. Honor
        `Retry-After`. A per-API-key

        data ceiling (set per credential) rejects with `{"detail": "API key data
        rate limit

        exceeded"}` instead of the `error` envelope below.
      headers:
        Retry-After:
          schema:
            type: integer
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
        X-RateLimit-Reset:
          schema:
            type: integer
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: 'Rate limit exceeded: 100 per 1 minute'
  securitySchemes:
    apiKeyClientId:
      type: apiKey
      in: header
      name: X-Client-Id
      description: >-
        Credential client id (`kairos_ck_...`). Must be sent together with
        X-Api-Key and X-Api-Secret.
    apiKeyKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: 64-char hex API key.
    apiKeySecret:
      type: apiKey
      in: header
      name: X-Api-Secret
      description: 64-char hex API secret.

````

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