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

# Get a market

> One market by its id, with each venue leg (including `lean_url`, resolution rules, and fees) plus automatic `series_context` (whether the market is recurring, Brier score & sharpness calibration of prior settled markets in the series, sibling strikes in the same event, cross-venue equivalents, and active liquidity rewards).



## OpenAPI

````yaml api-reference/openapi.json GET /markets/{id}
openapi: 3.0.0
info:
  title: Lean API
  version: 0.1.0
  description: >-
    Programmatic access to Lean: canonical sports markets, quotes, orders,
    positions and balances.
servers:
  - url: '{baseUrl}/v1'
    description: Lean API
    variables:
      baseUrl:
        default: https://api.lean.xyz
        description: >-
          The Lean API base URL, without /v1. Same value as LEAN_API_URL in the
          guides.
security:
  - apiKey: []
paths:
  /markets/{id}:
    get:
      tags:
        - Markets
      summary: Get a market
      description: >-
        One market by its id, with each venue leg (including `lean_url`,
        resolution rules, and fees) plus automatic `series_context` (whether the
        market is recurring, Brier score & sharpness calibration of prior
        settled markets in the series, sibling strikes in the same event,
        cross-venue equivalents, and active liquidity rewards).
      operationId: getMarket
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 512
            description: >-
              A market id from GET /markets, or a venue symbol that names one
              market: a Polymarket token id, a Hyperliquid book coin (`#…`,
              written `%23…` in a path), or a leg `ticker` (`pm:…`, `hl:…`,
              `pmus:…` or a Kalshi market ticker) that lists only this outcome.
              A symbol that names more than one market, such as a Polymarket
              condition id, is refused with 400; use the token id or the market
              id instead.
            example: >-
              mkt_bmZsOjIwMjYtMTAtMTE6REVOLUxBQwpzcHJlYWQ6Z2FtZTpERU46LTMuNQpERU4
          required: true
          description: >-
            A market id from GET /markets, or a venue symbol that names one
            market: a Polymarket token id, a Hyperliquid book coin (`#…`,
            written `%23…` in a path), or a leg `ticker` (`pm:…`, `hl:…`,
            `pmus:…` or a Kalshi market ticker) that lists only this outcome. A
            symbol that names more than one market, such as a Polymarket
            condition id, is refused with 400; use the token id or the market id
            instead.
          name: id
          in: path
      responses:
        '200':
          description: One canonical market with its venue legs and series context
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      success:
                        type: boolean
                        enum:
                          - true
                      data:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - sports
                              id:
                                type: string
                                minLength: 1
                              title:
                                type: string
                                minLength: 1
                              outcome:
                                type: string
                                minLength: 1
                              line:
                                type: string
                                nullable: true
                                pattern: ^-?\d+(?:\.\d+)?$
                              fixture:
                                type: object
                                properties:
                                  key:
                                    type: string
                                    minLength: 1
                                  sport:
                                    type: string
                                    minLength: 1
                                  league:
                                    type: string
                                    minLength: 1
                                  title:
                                    type: string
                                    minLength: 1
                                  starts_at:
                                    type: string
                                    format: date-time
                                  scheduled_date:
                                    type: string
                                    nullable: true
                                    pattern: ^\d{4}-\d{2}-\d{2}$
                                  participants:
                                    type: array
                                    items:
                                      type: string
                                      minLength: 1
                                  teams:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        key:
                                          type: string
                                          minLength: 1
                                        name:
                                          type: string
                                          minLength: 1
                                        role:
                                          type: string
                                          enum:
                                            - home
                                            - away
                                            - competitor
                                      required:
                                        - key
                                        - name
                                        - role
                                required:
                                  - key
                                  - sport
                                  - league
                                  - title
                                  - starts_at
                                  - scheduled_date
                                  - participants
                                  - teams
                              group:
                                type: object
                                properties:
                                  key:
                                    type: string
                                    minLength: 1
                                  kind:
                                    type: string
                                    enum:
                                      - moneyline
                                      - spread
                                      - total
                                      - team_total
                                      - prop
                                  template:
                                    type: string
                                    minLength: 1
                                    description: >-
                                      Canonical sports contract template, such
                                      as `sports.winner`, `sports.handicap`,
                                      `sports.total`, `sports.team_total` or
                                      `sports.player_prop`.
                                  label:
                                    type: string
                                    minLength: 1
                                  period:
                                    type: string
                                    minLength: 1
                                  subject:
                                    type: string
                                    nullable: true
                                  stat:
                                    type: string
                                    nullable: true
                                  line:
                                    type: string
                                    nullable: true
                                    pattern: ^-?\d+(?:\.\d+)?$
                                required:
                                  - key
                                  - kind
                                  - template
                                  - label
                                  - period
                                  - subject
                                  - stat
                                  - line
                              legs:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    venue:
                                      type: string
                                      enum:
                                        - kalshi
                                        - polymarket
                                        - polymarket_us
                                        - hyperliquid
                                        - lighter
                                    ticker:
                                      type: string
                                      minLength: 1
                                    side:
                                      type: string
                                      enum:
                                        - 'yes'
                                        - 'no'
                                    status:
                                      type: string
                                      nullable: true
                                      enum:
                                        - unopened
                                        - open
                                        - closed
                                        - resolving
                                        - resolved
                                      description: >-
                                        The venue market status: `unopened`,
                                        `open`, `closed`, `resolving` or
                                        `resolved`; null until Lean has recorded
                                        the venue market. The platform shows a
                                        live book for every status but `closed`
                                        and `resolved`.
                                    tradable:
                                      type: boolean
                                      description: >-
                                        Whether the venue takes orders on this
                                        leg now: `status` is `open`, the venue
                                        has not marked the market untradable,
                                        and the API trades on its venue. An
                                        `unopened` or `resolving` leg is live
                                        but not tradable.
                                    yes_token:
                                      type: string
                                      nullable: true
                                      description: >-
                                        On-chain Polymarket ERC1155 YES outcome
                                        token id; null on venues that do not use
                                        ERC1155 tokens or when not recorded.
                                    no_token:
                                      type: string
                                      nullable: true
                                      description: >-
                                        On-chain Polymarket ERC1155 NO outcome
                                        token id; null on venues that do not use
                                        ERC1155 tokens or when not recorded.
                                    lean_url:
                                      type: string
                                      format: uri
                                      description: >-
                                        Direct Lean web terminal link for this
                                        market leg and side.
                                    venue_url:
                                      type: string
                                      nullable: true
                                      format: uri
                                      description: >-
                                        External venue page URL (Kalshi,
                                        Polymarket, Polymarket US, Hyperliquid),
                                        when known.
                                    resolution:
                                      type: object
                                      properties:
                                        source:
                                          type: string
                                          nullable: true
                                          description: >-
                                            How the venue's resolution was recorded,
                                            such as the oracle event; null until it
                                            resolves.
                                        rules:
                                          type: string
                                          nullable: true
                                          description: >-
                                            The venue's resolution rules verbatim,
                                            secondary rules after a blank line.
                                        end_date:
                                          type: string
                                          nullable: true
                                          format: date-time
                                          description: >-
                                            When the venue market is scheduled to
                                            close, if the venue gives one.
                                        url:
                                          type: string
                                          nullable: true
                                          format: uri
                                          description: >-
                                            The venue's public page for this market,
                                            when it can be built from stored data.
                                        result:
                                          type: string
                                          nullable: true
                                          enum:
                                            - won
                                            - lost
                                            - void
                                          description: >-
                                            How the venue settled this leg's side
                                            once `status` is `resolved`: `won` pays
                                            $1 a share, `lost` pays nothing, `void`
                                            pays the venue's void payout. Null until
                                            then.
                                      required:
                                        - source
                                        - rules
                                        - end_date
                                        - url
                                        - result
                                      description: How this venue resolves its market.
                                    fees:
                                      type: object
                                      nullable: true
                                      properties:
                                        formula:
                                          type: string
                                          enum:
                                            - price_curve
                                            - flat
                                            - notional_on_exit
                                          description: >-
                                            `price_curve`: every fill, buy or sell,
                                            pays quantity × rate × (price × (1 −
                                            price))^exponent. `notional_on_exit`: a
                                            buy pays nothing; a sell pays quantity ×
                                            price × rate, and each winning share
                                            pays rate × $1 at settlement.
                                        taker_rate:
                                          type: string
                                          pattern: ^\d+(?:\.\d+)?$
                                          description: >-
                                            The rate, as a fraction of 1, a fill
                                            that takes liquidity pays. For
                                            `notional_on_exit` (Hyperliquid) this is
                                            the base volume tier's rate, an upper
                                            bound: accounts on a discounted tier pay
                                            less.
                                        maker_rate:
                                          type: string
                                          pattern: ^\d+(?:\.\d+)?$
                                          description: >-
                                            The rate, as a fraction of 1, a resting
                                            order pays when it fills. For
                                            `notional_on_exit` (Hyperliquid) this is
                                            the base volume tier's rate, an upper
                                            bound: accounts on a discounted tier pay
                                            less.
                                        exponent:
                                          type: integer
                                          nullable: true
                                          description: >-
                                            The exponent of `price_curve`; null for
                                            `notional_on_exit`.
                                      required:
                                        - formula
                                        - taker_rate
                                        - maker_rate
                                        - exponent
                                      description: >-
                                        What this venue charges a fill, as `POST
                                        /v1/orders/preview` prices it; null when
                                        the venue's fee terms for the market are
                                        not recorded or depend on an account fee
                                        multiplier Lean cannot read (Lighter).
                                  required:
                                    - venue
                                    - ticker
                                    - side
                                    - status
                                    - tradable
                                    - yes_token
                                    - no_token
                                    - lean_url
                                    - venue_url
                                    - resolution
                                    - fees
                              equivalence:
                                type: string
                                enum:
                                  - single_venue
                                  - verified
                                  - unreviewed
                                description: >-
                                  `single_venue`: one leg. `verified`: a
                                  reviewer confirmed each venue market is the
                                  same proposition; rules text can still differ,
                                  so read each leg `resolution.rules`.
                                  `unreviewed`: at least one leg is not reviewed
                                  yet.
                              series_context:
                                type: object
                                nullable: true
                                properties:
                                  is_recurring:
                                    type: boolean
                                  series_ticker:
                                    type: string
                                    nullable: true
                                  recurrence:
                                    type: string
                                    nullable: true
                                  prior_settled_events:
                                    type: integer
                                    minimum: 0
                                  prior_settled_markets:
                                    type: integer
                                    minimum: 0
                                  upcoming_events:
                                    type: integer
                                    minimum: 0
                                  calibration:
                                    type: object
                                    nullable: true
                                    properties:
                                      sample_size:
                                        type: integer
                                        minimum: 0
                                      yes_rate:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Fraction of sampled prior markets that
                                          resolved YES.
                                      brier_24h:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Mean squared error (Brier score) of YES
                                          prices 24 hours before close vs realized
                                          outcome. Lower is sharper.
                                      brier_6h:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Brier score of YES prices 6 hours before
                                          close vs realized outcome.
                                      brier_1h:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Brier score of YES prices 1 hour before
                                          close vs realized outcome.
                                      brier_close:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Brier score of final pre-close YES
                                          prices vs realized outcome.
                                      log_loss_close:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Mean binary log loss of final pre-close
                                          YES prices vs realized outcome.
                                      sharpness:
                                        type: string
                                        enum:
                                          - very_sharp
                                          - well_calibrated
                                          - noisy
                                          - insufficient_history
                                        description: >-
                                          Automatic sharpness classification of
                                          prior markets in this series: very_sharp
                                          (<0.05 Brier), well_calibrated (<0.12),
                                          noisy (>=0.12), or insufficient_history
                                          (<3 samples).
                                      recent_settlements:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            market_id:
                                              type: string
                                              minLength: 1
                                            ticker:
                                              type: string
                                              minLength: 1
                                            event_ticker:
                                              type: string
                                              minLength: 1
                                            title:
                                              type: string
                                              minLength: 1
                                            end_date:
                                              type: string
                                              nullable: true
                                              format: date-time
                                            result:
                                              type: string
                                              enum:
                                                - 'yes'
                                                - 'no'
                                            expiration_value:
                                              type: string
                                              nullable: true
                                            price_24h_before:
                                              type: string
                                              nullable: true
                                            price_6h_before:
                                              type: string
                                              nullable: true
                                            price_1h_before:
                                              type: string
                                              nullable: true
                                            final_price:
                                              type: string
                                              nullable: true
                                            lean_url:
                                              type: string
                                              format: uri
                                            venue_url:
                                              type: string
                                              nullable: true
                                              format: uri
                                          required:
                                            - market_id
                                            - ticker
                                            - event_ticker
                                            - title
                                            - end_date
                                            - result
                                            - expiration_value
                                            - price_24h_before
                                            - price_6h_before
                                            - price_1h_before
                                            - final_price
                                            - lean_url
                                            - venue_url
                                    required:
                                      - sample_size
                                      - yes_rate
                                      - brier_24h
                                      - brier_6h
                                      - brier_1h
                                      - brier_close
                                      - log_loss_close
                                      - sharpness
                                      - recent_settlements
                                  siblings:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        market_id:
                                          type: string
                                          minLength: 1
                                        ticker:
                                          type: string
                                          minLength: 1
                                        title:
                                          type: string
                                          minLength: 1
                                        status:
                                          type: string
                                          enum:
                                            - unopened
                                            - open
                                            - closed
                                            - resolving
                                            - resolved
                                        result:
                                          type: string
                                          nullable: true
                                        lean_url:
                                          type: string
                                          format: uri
                                        venue_url:
                                          type: string
                                          nullable: true
                                          format: uri
                                      required:
                                        - market_id
                                        - ticker
                                        - title
                                        - status
                                        - result
                                        - lean_url
                                        - venue_url
                                  related_markets:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        market_id:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Orderable Lean market_id for the aligned
                                            outcome on the peer venue.
                                        no_market_id:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Orderable Lean market_id for the
                                            opposite outcome on the peer venue.
                                        venue:
                                          type: string
                                          minLength: 1
                                        ticker:
                                          type: string
                                          minLength: 1
                                        title:
                                          type: string
                                          nullable: true
                                        lean_url:
                                          type: string
                                          format: uri
                                        venue_url:
                                          type: string
                                          nullable: true
                                          format: uri
                                        compatibility:
                                          type: string
                                          nullable: true
                                        resolution:
                                          type: object
                                          nullable: true
                                          properties:
                                            source:
                                              type: string
                                              nullable: true
                                              description: >-
                                                How the venue's resolution was recorded,
                                                such as the oracle event; null until it
                                                resolves.
                                            rules:
                                              type: string
                                              nullable: true
                                              description: >-
                                                The venue's resolution rules verbatim,
                                                secondary rules after a blank line.
                                            end_date:
                                              type: string
                                              nullable: true
                                              format: date-time
                                              description: >-
                                                When the venue market is scheduled to
                                                close, if the venue gives one.
                                          required:
                                            - source
                                            - rules
                                            - end_date
                                        fees:
                                          type: object
                                          nullable: true
                                          properties:
                                            formula:
                                              type: string
                                              enum:
                                                - price_curve
                                                - flat
                                                - notional_on_exit
                                              description: >-
                                                `price_curve`: every fill, buy or sell,
                                                pays quantity × rate × (price × (1 −
                                                price))^exponent. `notional_on_exit`: a
                                                buy pays nothing; a sell pays quantity ×
                                                price × rate, and each winning share
                                                pays rate × $1 at settlement.
                                            taker_rate:
                                              type: string
                                              pattern: ^\d+(?:\.\d+)?$
                                              description: >-
                                                The rate, as a fraction of 1, a fill
                                                that takes liquidity pays. For
                                                `notional_on_exit` (Hyperliquid) this is
                                                the base volume tier's rate, an upper
                                                bound: accounts on a discounted tier pay
                                                less.
                                            maker_rate:
                                              type: string
                                              pattern: ^\d+(?:\.\d+)?$
                                              description: >-
                                                The rate, as a fraction of 1, a resting
                                                order pays when it fills. For
                                                `notional_on_exit` (Hyperliquid) this is
                                                the base volume tier's rate, an upper
                                                bound: accounts on a discounted tier pay
                                                less.
                                            exponent:
                                              type: integer
                                              nullable: true
                                              description: >-
                                                The exponent of `price_curve`; null for
                                                `notional_on_exit`.
                                          required:
                                            - formula
                                            - taker_rate
                                            - maker_rate
                                            - exponent
                                      required:
                                        - market_id
                                        - no_market_id
                                        - venue
                                        - ticker
                                        - title
                                        - lean_url
                                        - venue_url
                                        - compatibility
                                        - resolution
                                        - fees
                                  rewards:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        venue:
                                          type: string
                                          minLength: 1
                                        ticker:
                                          type: string
                                          minLength: 1
                                        daily_rate_usd:
                                          type: string
                                          pattern: ^-?\d+(?:\.\d+)?$
                                        max_spread:
                                          type: string
                                          nullable: true
                                          pattern: ^-?\d+(?:\.\d+)?$
                                        min_size:
                                          type: string
                                          nullable: true
                                          pattern: ^-?\d+(?:\.\d+)?$
                                        end_date:
                                          type: string
                                          nullable: true
                                          format: date-time
                                      required:
                                        - venue
                                        - ticker
                                        - daily_rate_usd
                                        - max_spread
                                        - min_size
                                        - end_date
                                required:
                                  - is_recurring
                                  - series_ticker
                                  - recurrence
                                  - prior_settled_events
                                  - prior_settled_markets
                                  - upcoming_events
                                  - calibration
                                  - siblings
                                  - related_markets
                                  - rewards
                              livemode:
                                type: boolean
                            required:
                              - kind
                              - id
                              - title
                              - outcome
                              - line
                              - fixture
                              - group
                              - legs
                              - equivalence
                              - series_context
                              - livemode
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - time_window
                              id:
                                type: string
                                minLength: 1
                              title:
                                type: string
                                minLength: 1
                              outcome:
                                type: string
                                enum:
                                  - up
                                  - down
                              line:
                                nullable: true
                              window:
                                type: object
                                properties:
                                  key:
                                    type: string
                                    minLength: 1
                                    description: >-
                                      The window: underlying, length and UTC
                                      start, such as `btc:15m:20261117-0100`.
                                      Every venue market on the same window
                                      shares it.
                                  category:
                                    type: string
                                    enum:
                                      - crypto
                                  underlying:
                                    type: string
                                    minLength: 1
                                    description: >-
                                      The asset whose price the window follows,
                                      such as `BTC`.
                                  duration_minutes:
                                    type: integer
                                    minimum: 0
                                    exclusiveMinimum: true
                                  proposition:
                                    type: string
                                    enum:
                                      - up_down
                                    description: >-
                                      `up_down`: `up` pays when the price at the
                                      window end is at or above the price at its
                                      start, as the venue resolution rules
                                      define them; `down` pays when it is below.
                                  starts_at:
                                    type: string
                                    format: date-time
                                  ends_at:
                                    type: string
                                    format: date-time
                                  title:
                                    type: string
                                    minLength: 1
                                required:
                                  - key
                                  - category
                                  - underlying
                                  - duration_minutes
                                  - proposition
                                  - starts_at
                                  - ends_at
                                  - title
                              legs:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    venue:
                                      type: string
                                      enum:
                                        - kalshi
                                        - polymarket
                                        - polymarket_us
                                        - hyperliquid
                                        - lighter
                                    ticker:
                                      type: string
                                      minLength: 1
                                    side:
                                      type: string
                                      enum:
                                        - 'yes'
                                        - 'no'
                                    status:
                                      type: string
                                      nullable: true
                                      enum:
                                        - unopened
                                        - open
                                        - closed
                                        - resolving
                                        - resolved
                                      description: >-
                                        The venue market status: `unopened`,
                                        `open`, `closed`, `resolving` or
                                        `resolved`; null until Lean has recorded
                                        the venue market. The platform shows a
                                        live book for every status but `closed`
                                        and `resolved`.
                                    tradable:
                                      type: boolean
                                      description: >-
                                        Whether the venue takes orders on this
                                        leg now: `status` is `open`, the venue
                                        has not marked the market untradable,
                                        and the API trades on its venue. An
                                        `unopened` or `resolving` leg is live
                                        but not tradable.
                                    yes_token:
                                      type: string
                                      nullable: true
                                      description: >-
                                        On-chain Polymarket ERC1155 YES outcome
                                        token id; null on venues that do not use
                                        ERC1155 tokens or when not recorded.
                                    no_token:
                                      type: string
                                      nullable: true
                                      description: >-
                                        On-chain Polymarket ERC1155 NO outcome
                                        token id; null on venues that do not use
                                        ERC1155 tokens or when not recorded.
                                    lean_url:
                                      type: string
                                      format: uri
                                      description: >-
                                        Direct Lean web terminal link for this
                                        market leg and side.
                                    venue_url:
                                      type: string
                                      nullable: true
                                      format: uri
                                      description: >-
                                        External venue page URL (Kalshi,
                                        Polymarket, Polymarket US, Hyperliquid),
                                        when known.
                                    resolution:
                                      type: object
                                      properties:
                                        source:
                                          type: string
                                          nullable: true
                                          description: >-
                                            How the venue's resolution was recorded,
                                            such as the oracle event; null until it
                                            resolves.
                                        rules:
                                          type: string
                                          nullable: true
                                          description: >-
                                            The venue's resolution rules verbatim,
                                            secondary rules after a blank line.
                                        end_date:
                                          type: string
                                          nullable: true
                                          format: date-time
                                          description: >-
                                            When the venue market is scheduled to
                                            close, if the venue gives one.
                                        url:
                                          type: string
                                          nullable: true
                                          format: uri
                                          description: >-
                                            The venue's public page for this market,
                                            when it can be built from stored data.
                                        result:
                                          type: string
                                          nullable: true
                                          enum:
                                            - won
                                            - lost
                                            - void
                                          description: >-
                                            How the venue settled this leg's side
                                            once `status` is `resolved`: `won` pays
                                            $1 a share, `lost` pays nothing, `void`
                                            pays the venue's void payout. Null until
                                            then.
                                      required:
                                        - source
                                        - rules
                                        - end_date
                                        - url
                                        - result
                                      description: How this venue resolves its market.
                                    fees:
                                      type: object
                                      nullable: true
                                      properties:
                                        formula:
                                          type: string
                                          enum:
                                            - price_curve
                                            - flat
                                            - notional_on_exit
                                          description: >-
                                            `price_curve`: every fill, buy or sell,
                                            pays quantity × rate × (price × (1 −
                                            price))^exponent. `notional_on_exit`: a
                                            buy pays nothing; a sell pays quantity ×
                                            price × rate, and each winning share
                                            pays rate × $1 at settlement.
                                        taker_rate:
                                          type: string
                                          pattern: ^\d+(?:\.\d+)?$
                                          description: >-
                                            The rate, as a fraction of 1, a fill
                                            that takes liquidity pays. For
                                            `notional_on_exit` (Hyperliquid) this is
                                            the base volume tier's rate, an upper
                                            bound: accounts on a discounted tier pay
                                            less.
                                        maker_rate:
                                          type: string
                                          pattern: ^\d+(?:\.\d+)?$
                                          description: >-
                                            The rate, as a fraction of 1, a resting
                                            order pays when it fills. For
                                            `notional_on_exit` (Hyperliquid) this is
                                            the base volume tier's rate, an upper
                                            bound: accounts on a discounted tier pay
                                            less.
                                        exponent:
                                          type: integer
                                          nullable: true
                                          description: >-
                                            The exponent of `price_curve`; null for
                                            `notional_on_exit`.
                                      required:
                                        - formula
                                        - taker_rate
                                        - maker_rate
                                        - exponent
                                      description: >-
                                        What this venue charges a fill, as `POST
                                        /v1/orders/preview` prices it; null when
                                        the venue's fee terms for the market are
                                        not recorded or depend on an account fee
                                        multiplier Lean cannot read (Lighter).
                                  required:
                                    - venue
                                    - ticker
                                    - side
                                    - status
                                    - tradable
                                    - yes_token
                                    - no_token
                                    - lean_url
                                    - venue_url
                                    - resolution
                                    - fees
                              equivalence:
                                type: string
                                enum:
                                  - single_venue
                                  - verified
                                  - unreviewed
                                description: >-
                                  `single_venue`: one leg. `verified`: a
                                  reviewer confirmed each venue market is the
                                  same proposition; rules text can still differ,
                                  so read each leg `resolution.rules`.
                                  `unreviewed`: at least one leg is not reviewed
                                  yet.
                              series_context:
                                type: object
                                nullable: true
                                properties:
                                  is_recurring:
                                    type: boolean
                                  series_ticker:
                                    type: string
                                    nullable: true
                                  recurrence:
                                    type: string
                                    nullable: true
                                  prior_settled_events:
                                    type: integer
                                    minimum: 0
                                  prior_settled_markets:
                                    type: integer
                                    minimum: 0
                                  upcoming_events:
                                    type: integer
                                    minimum: 0
                                  calibration:
                                    type: object
                                    nullable: true
                                    properties:
                                      sample_size:
                                        type: integer
                                        minimum: 0
                                      yes_rate:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Fraction of sampled prior markets that
                                          resolved YES.
                                      brier_24h:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Mean squared error (Brier score) of YES
                                          prices 24 hours before close vs realized
                                          outcome. Lower is sharper.
                                      brier_6h:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Brier score of YES prices 6 hours before
                                          close vs realized outcome.
                                      brier_1h:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Brier score of YES prices 1 hour before
                                          close vs realized outcome.
                                      brier_close:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Brier score of final pre-close YES
                                          prices vs realized outcome.
                                      log_loss_close:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Mean binary log loss of final pre-close
                                          YES prices vs realized outcome.
                                      sharpness:
                                        type: string
                                        enum:
                                          - very_sharp
                                          - well_calibrated
                                          - noisy
                                          - insufficient_history
                                        description: >-
                                          Automatic sharpness classification of
                                          prior markets in this series: very_sharp
                                          (<0.05 Brier), well_calibrated (<0.12),
                                          noisy (>=0.12), or insufficient_history
                                          (<3 samples).
                                      recent_settlements:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            market_id:
                                              type: string
                                              minLength: 1
                                            ticker:
                                              type: string
                                              minLength: 1
                                            event_ticker:
                                              type: string
                                              minLength: 1
                                            title:
                                              type: string
                                              minLength: 1
                                            end_date:
                                              type: string
                                              nullable: true
                                              format: date-time
                                            result:
                                              type: string
                                              enum:
                                                - 'yes'
                                                - 'no'
                                            expiration_value:
                                              type: string
                                              nullable: true
                                            price_24h_before:
                                              type: string
                                              nullable: true
                                            price_6h_before:
                                              type: string
                                              nullable: true
                                            price_1h_before:
                                              type: string
                                              nullable: true
                                            final_price:
                                              type: string
                                              nullable: true
                                            lean_url:
                                              type: string
                                              format: uri
                                            venue_url:
                                              type: string
                                              nullable: true
                                              format: uri
                                          required:
                                            - market_id
                                            - ticker
                                            - event_ticker
                                            - title
                                            - end_date
                                            - result
                                            - expiration_value
                                            - price_24h_before
                                            - price_6h_before
                                            - price_1h_before
                                            - final_price
                                            - lean_url
                                            - venue_url
                                    required:
                                      - sample_size
                                      - yes_rate
                                      - brier_24h
                                      - brier_6h
                                      - brier_1h
                                      - brier_close
                                      - log_loss_close
                                      - sharpness
                                      - recent_settlements
                                  siblings:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        market_id:
                                          type: string
                                          minLength: 1
                                        ticker:
                                          type: string
                                          minLength: 1
                                        title:
                                          type: string
                                          minLength: 1
                                        status:
                                          type: string
                                          enum:
                                            - unopened
                                            - open
                                            - closed
                                            - resolving
                                            - resolved
                                        result:
                                          type: string
                                          nullable: true
                                        lean_url:
                                          type: string
                                          format: uri
                                        venue_url:
                                          type: string
                                          nullable: true
                                          format: uri
                                      required:
                                        - market_id
                                        - ticker
                                        - title
                                        - status
                                        - result
                                        - lean_url
                                        - venue_url
                                  related_markets:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        market_id:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Orderable Lean market_id for the aligned
                                            outcome on the peer venue.
                                        no_market_id:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Orderable Lean market_id for the
                                            opposite outcome on the peer venue.
                                        venue:
                                          type: string
                                          minLength: 1
                                        ticker:
                                          type: string
                                          minLength: 1
                                        title:
                                          type: string
                                          nullable: true
                                        lean_url:
                                          type: string
                                          format: uri
                                        venue_url:
                                          type: string
                                          nullable: true
                                          format: uri
                                        compatibility:
                                          type: string
                                          nullable: true
                                        resolution:
                                          type: object
                                          nullable: true
                                          properties:
                                            source:
                                              type: string
                                              nullable: true
                                              description: >-
                                                How the venue's resolution was recorded,
                                                such as the oracle event; null until it
                                                resolves.
                                            rules:
                                              type: string
                                              nullable: true
                                              description: >-
                                                The venue's resolution rules verbatim,
                                                secondary rules after a blank line.
                                            end_date:
                                              type: string
                                              nullable: true
                                              format: date-time
                                              description: >-
                                                When the venue market is scheduled to
                                                close, if the venue gives one.
                                          required:
                                            - source
                                            - rules
                                            - end_date
                                        fees:
                                          type: object
                                          nullable: true
                                          properties:
                                            formula:
                                              type: string
                                              enum:
                                                - price_curve
                                                - flat
                                                - notional_on_exit
                                              description: >-
                                                `price_curve`: every fill, buy or sell,
                                                pays quantity × rate × (price × (1 −
                                                price))^exponent. `notional_on_exit`: a
                                                buy pays nothing; a sell pays quantity ×
                                                price × rate, and each winning share
                                                pays rate × $1 at settlement.
                                            taker_rate:
                                              type: string
                                              pattern: ^\d+(?:\.\d+)?$
                                              description: >-
                                                The rate, as a fraction of 1, a fill
                                                that takes liquidity pays. For
                                                `notional_on_exit` (Hyperliquid) this is
                                                the base volume tier's rate, an upper
                                                bound: accounts on a discounted tier pay
                                                less.
                                            maker_rate:
                                              type: string
                                              pattern: ^\d+(?:\.\d+)?$
                                              description: >-
                                                The rate, as a fraction of 1, a resting
                                                order pays when it fills. For
                                                `notional_on_exit` (Hyperliquid) this is
                                                the base volume tier's rate, an upper
                                                bound: accounts on a discounted tier pay
                                                less.
                                            exponent:
                                              type: integer
                                              nullable: true
                                              description: >-
                                                The exponent of `price_curve`; null for
                                                `notional_on_exit`.
                                          required:
                                            - formula
                                            - taker_rate
                                            - maker_rate
                                            - exponent
                                      required:
                                        - market_id
                                        - no_market_id
                                        - venue
                                        - ticker
                                        - title
                                        - lean_url
                                        - venue_url
                                        - compatibility
                                        - resolution
                                        - fees
                                  rewards:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        venue:
                                          type: string
                                          minLength: 1
                                        ticker:
                                          type: string
                                          minLength: 1
                                        daily_rate_usd:
                                          type: string
                                          pattern: ^-?\d+(?:\.\d+)?$
                                        max_spread:
                                          type: string
                                          nullable: true
                                          pattern: ^-?\d+(?:\.\d+)?$
                                        min_size:
                                          type: string
                                          nullable: true
                                          pattern: ^-?\d+(?:\.\d+)?$
                                        end_date:
                                          type: string
                                          nullable: true
                                          format: date-time
                                      required:
                                        - venue
                                        - ticker
                                        - daily_rate_usd
                                        - max_spread
                                        - min_size
                                        - end_date
                                required:
                                  - is_recurring
                                  - series_ticker
                                  - recurrence
                                  - prior_settled_events
                                  - prior_settled_markets
                                  - upcoming_events
                                  - calibration
                                  - siblings
                                  - related_markets
                                  - rewards
                              livemode:
                                type: boolean
                            required:
                              - kind
                              - id
                              - title
                              - outcome
                              - line
                              - window
                              - legs
                              - equivalence
                              - series_context
                              - livemode
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - event
                              id:
                                type: string
                                minLength: 1
                              title:
                                type: string
                                minLength: 1
                              outcome:
                                type: string
                                enum:
                                  - 'yes'
                                  - 'no'
                              line:
                                nullable: true
                              event:
                                type: object
                                properties:
                                  key:
                                    type: string
                                    minLength: 1
                                    description: >-
                                      The venue event the market belongs to,
                                      such as a Polymarket event's ticker.
                                  title:
                                    type: string
                                    minLength: 1
                                  category:
                                    type: string
                                    enum:
                                      - sports
                                      - crypto
                                      - politics
                                      - economy
                                      - business
                                      - entertainment
                                      - science
                                      - society
                                      - climate
                                      - commodities
                                      - transportation
                                      - gaming
                                      - health
                                      - law
                                      - uncategorized
                                    description: >-
                                      `crypto` for a coin-price market
                                      (Polymarket tagged `crypto-prices`, or
                                      `crypto` and `hit-price`; a Hyperliquid
                                      outcome tagged `asset:<coin>` for a
                                      Hyperliquid coin), whatever its taxonomy;
                                      otherwise the first root of the venue
                                      event's Lean taxonomy, else the category
                                      Kalshi files it under, else
                                      `uncategorized`.
                                  ends_at:
                                    type: string
                                    nullable: true
                                    format: date-time
                                    description: >-
                                      When the venue market is scheduled to
                                      close; null when the venue gives no date.
                                  created_at:
                                    type: string
                                    nullable: true
                                    format: date-time
                                    description: >-
                                      When the market was first listed on the
                                      venue or indexed by Lean.
                                  series_ticker:
                                    type: string
                                    nullable: true
                                    description: >-
                                      Recurring series identifier when the event
                                      belongs to a series; null otherwise.
                                  is_recurring:
                                    type: boolean
                                    description: >-
                                      True when the event belongs to a recurring
                                      series with prior or repeated iterations.
                                  recurrence:
                                    type: string
                                    nullable: true
                                    description: >-
                                      Recurrence cadence reported by the venue
                                      (e.g. daily, weekly, monthly), if known.
                                required:
                                  - key
                                  - title
                                  - category
                                  - ends_at
                                  - created_at
                                  - series_ticker
                                  - is_recurring
                                  - recurrence
                              legs:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    venue:
                                      type: string
                                      enum:
                                        - kalshi
                                        - polymarket
                                        - polymarket_us
                                        - hyperliquid
                                        - lighter
                                    ticker:
                                      type: string
                                      minLength: 1
                                    side:
                                      type: string
                                      enum:
                                        - 'yes'
                                        - 'no'
                                    status:
                                      type: string
                                      nullable: true
                                      enum:
                                        - unopened
                                        - open
                                        - closed
                                        - resolving
                                        - resolved
                                      description: >-
                                        The venue market status: `unopened`,
                                        `open`, `closed`, `resolving` or
                                        `resolved`; null until Lean has recorded
                                        the venue market. The platform shows a
                                        live book for every status but `closed`
                                        and `resolved`.
                                    tradable:
                                      type: boolean
                                      description: >-
                                        Whether the venue takes orders on this
                                        leg now: `status` is `open`, the venue
                                        has not marked the market untradable,
                                        and the API trades on its venue. An
                                        `unopened` or `resolving` leg is live
                                        but not tradable.
                                    yes_token:
                                      type: string
                                      nullable: true
                                      description: >-
                                        On-chain Polymarket ERC1155 YES outcome
                                        token id; null on venues that do not use
                                        ERC1155 tokens or when not recorded.
                                    no_token:
                                      type: string
                                      nullable: true
                                      description: >-
                                        On-chain Polymarket ERC1155 NO outcome
                                        token id; null on venues that do not use
                                        ERC1155 tokens or when not recorded.
                                    lean_url:
                                      type: string
                                      format: uri
                                      description: >-
                                        Direct Lean web terminal link for this
                                        market leg and side.
                                    venue_url:
                                      type: string
                                      nullable: true
                                      format: uri
                                      description: >-
                                        External venue page URL (Kalshi,
                                        Polymarket, Polymarket US, Hyperliquid),
                                        when known.
                                    resolution:
                                      type: object
                                      properties:
                                        source:
                                          type: string
                                          nullable: true
                                          description: >-
                                            How the venue's resolution was recorded,
                                            such as the oracle event; null until it
                                            resolves.
                                        rules:
                                          type: string
                                          nullable: true
                                          description: >-
                                            The venue's resolution rules verbatim,
                                            secondary rules after a blank line.
                                        end_date:
                                          type: string
                                          nullable: true
                                          format: date-time
                                          description: >-
                                            When the venue market is scheduled to
                                            close, if the venue gives one.
                                        url:
                                          type: string
                                          nullable: true
                                          format: uri
                                          description: >-
                                            The venue's public page for this market,
                                            when it can be built from stored data.
                                        result:
                                          type: string
                                          nullable: true
                                          enum:
                                            - won
                                            - lost
                                            - void
                                          description: >-
                                            How the venue settled this leg's side
                                            once `status` is `resolved`: `won` pays
                                            $1 a share, `lost` pays nothing, `void`
                                            pays the venue's void payout. Null until
                                            then.
                                      required:
                                        - source
                                        - rules
                                        - end_date
                                        - url
                                        - result
                                      description: How this venue resolves its market.
                                    fees:
                                      type: object
                                      nullable: true
                                      properties:
                                        formula:
                                          type: string
                                          enum:
                                            - price_curve
                                            - flat
                                            - notional_on_exit
                                          description: >-
                                            `price_curve`: every fill, buy or sell,
                                            pays quantity × rate × (price × (1 −
                                            price))^exponent. `notional_on_exit`: a
                                            buy pays nothing; a sell pays quantity ×
                                            price × rate, and each winning share
                                            pays rate × $1 at settlement.
                                        taker_rate:
                                          type: string
                                          pattern: ^\d+(?:\.\d+)?$
                                          description: >-
                                            The rate, as a fraction of 1, a fill
                                            that takes liquidity pays. For
                                            `notional_on_exit` (Hyperliquid) this is
                                            the base volume tier's rate, an upper
                                            bound: accounts on a discounted tier pay
                                            less.
                                        maker_rate:
                                          type: string
                                          pattern: ^\d+(?:\.\d+)?$
                                          description: >-
                                            The rate, as a fraction of 1, a resting
                                            order pays when it fills. For
                                            `notional_on_exit` (Hyperliquid) this is
                                            the base volume tier's rate, an upper
                                            bound: accounts on a discounted tier pay
                                            less.
                                        exponent:
                                          type: integer
                                          nullable: true
                                          description: >-
                                            The exponent of `price_curve`; null for
                                            `notional_on_exit`.
                                      required:
                                        - formula
                                        - taker_rate
                                        - maker_rate
                                        - exponent
                                      description: >-
                                        What this venue charges a fill, as `POST
                                        /v1/orders/preview` prices it; null when
                                        the venue's fee terms for the market are
                                        not recorded or depend on an account fee
                                        multiplier Lean cannot read (Lighter).
                                  required:
                                    - venue
                                    - ticker
                                    - side
                                    - status
                                    - tradable
                                    - yes_token
                                    - no_token
                                    - lean_url
                                    - venue_url
                                    - resolution
                                    - fees
                              equivalence:
                                type: string
                                enum:
                                  - single_venue
                                  - verified
                                  - unreviewed
                                description: >-
                                  `single_venue`: one leg. `verified`: a
                                  reviewer confirmed each venue market is the
                                  same proposition; rules text can still differ,
                                  so read each leg `resolution.rules`.
                                  `unreviewed`: at least one leg is not reviewed
                                  yet.
                              series_context:
                                type: object
                                nullable: true
                                properties:
                                  is_recurring:
                                    type: boolean
                                  series_ticker:
                                    type: string
                                    nullable: true
                                  recurrence:
                                    type: string
                                    nullable: true
                                  prior_settled_events:
                                    type: integer
                                    minimum: 0
                                  prior_settled_markets:
                                    type: integer
                                    minimum: 0
                                  upcoming_events:
                                    type: integer
                                    minimum: 0
                                  calibration:
                                    type: object
                                    nullable: true
                                    properties:
                                      sample_size:
                                        type: integer
                                        minimum: 0
                                      yes_rate:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Fraction of sampled prior markets that
                                          resolved YES.
                                      brier_24h:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Mean squared error (Brier score) of YES
                                          prices 24 hours before close vs realized
                                          outcome. Lower is sharper.
                                      brier_6h:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Brier score of YES prices 6 hours before
                                          close vs realized outcome.
                                      brier_1h:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Brier score of YES prices 1 hour before
                                          close vs realized outcome.
                                      brier_close:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Brier score of final pre-close YES
                                          prices vs realized outcome.
                                      log_loss_close:
                                        type: string
                                        nullable: true
                                        pattern: ^-?\d+(?:\.\d+)?$
                                        description: >-
                                          Mean binary log loss of final pre-close
                                          YES prices vs realized outcome.
                                      sharpness:
                                        type: string
                                        enum:
                                          - very_sharp
                                          - well_calibrated
                                          - noisy
                                          - insufficient_history
                                        description: >-
                                          Automatic sharpness classification of
                                          prior markets in this series: very_sharp
                                          (<0.05 Brier), well_calibrated (<0.12),
                                          noisy (>=0.12), or insufficient_history
                                          (<3 samples).
                                      recent_settlements:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            market_id:
                                              type: string
                                              minLength: 1
                                            ticker:
                                              type: string
                                              minLength: 1
                                            event_ticker:
                                              type: string
                                              minLength: 1
                                            title:
                                              type: string
                                              minLength: 1
                                            end_date:
                                              type: string
                                              nullable: true
                                              format: date-time
                                            result:
                                              type: string
                                              enum:
                                                - 'yes'
                                                - 'no'
                                            expiration_value:
                                              type: string
                                              nullable: true
                                            price_24h_before:
                                              type: string
                                              nullable: true
                                            price_6h_before:
                                              type: string
                                              nullable: true
                                            price_1h_before:
                                              type: string
                                              nullable: true
                                            final_price:
                                              type: string
                                              nullable: true
                                            lean_url:
                                              type: string
                                              format: uri
                                            venue_url:
                                              type: string
                                              nullable: true
                                              format: uri
                                          required:
                                            - market_id
                                            - ticker
                                            - event_ticker
                                            - title
                                            - end_date
                                            - result
                                            - expiration_value
                                            - price_24h_before
                                            - price_6h_before
                                            - price_1h_before
                                            - final_price
                                            - lean_url
                                            - venue_url
                                    required:
                                      - sample_size
                                      - yes_rate
                                      - brier_24h
                                      - brier_6h
                                      - brier_1h
                                      - brier_close
                                      - log_loss_close
                                      - sharpness
                                      - recent_settlements
                                  siblings:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        market_id:
                                          type: string
                                          minLength: 1
                                        ticker:
                                          type: string
                                          minLength: 1
                                        title:
                                          type: string
                                          minLength: 1
                                        status:
                                          type: string
                                          enum:
                                            - unopened
                                            - open
                                            - closed
                                            - resolving
                                            - resolved
                                        result:
                                          type: string
                                          nullable: true
                                        lean_url:
                                          type: string
                                          format: uri
                                        venue_url:
                                          type: string
                                          nullable: true
                                          format: uri
                                      required:
                                        - market_id
                                        - ticker
                                        - title
                                        - status
                                        - result
                                        - lean_url
                                        - venue_url
                                  related_markets:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        market_id:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Orderable Lean market_id for the aligned
                                            outcome on the peer venue.
                                        no_market_id:
                                          type: string
                                          minLength: 1
                                          description: >-
                                            Orderable Lean market_id for the
                                            opposite outcome on the peer venue.
                                        venue:
                                          type: string
                                          minLength: 1
                                        ticker:
                                          type: string
                                          minLength: 1
                                        title:
                                          type: string
                                          nullable: true
                                        lean_url:
                                          type: string
                                          format: uri
                                        venue_url:
                                          type: string
                                          nullable: true
                                          format: uri
                                        compatibility:
                                          type: string
                                          nullable: true
                                        resolution:
                                          type: object
                                          nullable: true
                                          properties:
                                            source:
                                              type: string
                                              nullable: true
                                              description: >-
                                                How the venue's resolution was recorded,
                                                such as the oracle event; null until it
                                                resolves.
                                            rules:
                                              type: string
                                              nullable: true
                                              description: >-
                                                The venue's resolution rules verbatim,
                                                secondary rules after a blank line.
                                            end_date:
                                              type: string
                                              nullable: true
                                              format: date-time
                                              description: >-
                                                When the venue market is scheduled to
                                                close, if the venue gives one.
                                          required:
                                            - source
                                            - rules
                                            - end_date
                                        fees:
                                          type: object
                                          nullable: true
                                          properties:
                                            formula:
                                              type: string
                                              enum:
                                                - price_curve
                                                - flat
                                                - notional_on_exit
                                              description: >-
                                                `price_curve`: every fill, buy or sell,
                                                pays quantity × rate × (price × (1 −
                                                price))^exponent. `notional_on_exit`: a
                                                buy pays nothing; a sell pays quantity ×
                                                price × rate, and each winning share
                                                pays rate × $1 at settlement.
                                            taker_rate:
                                              type: string
                                              pattern: ^\d+(?:\.\d+)?$
                                              description: >-
                                                The rate, as a fraction of 1, a fill
                                                that takes liquidity pays. For
                                                `notional_on_exit` (Hyperliquid) this is
                                                the base volume tier's rate, an upper
                                                bound: accounts on a discounted tier pay
                                                less.
                                            maker_rate:
                                              type: string
                                              pattern: ^\d+(?:\.\d+)?$
                                              description: >-
                                                The rate, as a fraction of 1, a resting
                                                order pays when it fills. For
                                                `notional_on_exit` (Hyperliquid) this is
                                                the base volume tier's rate, an upper
                                                bound: accounts on a discounted tier pay
                                                less.
                                            exponent:
                                              type: integer
                                              nullable: true
                                              description: >-
                                                The exponent of `price_curve`; null for
                                                `notional_on_exit`.
                                          required:
                                            - formula
                                            - taker_rate
                                            - maker_rate
                                            - exponent
                                      required:
                                        - market_id
                                        - no_market_id
                                        - venue
                                        - ticker
                                        - title
                                        - lean_url
                                        - venue_url
                                        - compatibility
                                        - resolution
                                        - fees
                                  rewards:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        venue:
                                          type: string
                                          minLength: 1
                                        ticker:
                                          type: string
                                          minLength: 1
                                        daily_rate_usd:
                                          type: string
                                          pattern: ^-?\d+(?:\.\d+)?$
                                        max_spread:
                                          type: string
                                          nullable: true
                                          pattern: ^-?\d+(?:\.\d+)?$
                                        min_size:
                                          type: string
                                          nullable: true
                                          pattern: ^-?\d+(?:\.\d+)?$
                                        end_date:
                                          type: string
                                          nullable: true
                                          format: date-time
                                      required:
                                        - venue
                                        - ticker
                                        - daily_rate_usd
                                        - max_spread
                                        - min_size
                                        - end_date
                                required:
                                  - is_recurring
                                  - series_ticker
                                  - recurrence
                                  - prior_settled_events
                                  - prior_settled_markets
                                  - upcoming_events
                                  - calibration
                                  - siblings
                                  - related_markets
                                  - rewards
                              livemode:
                                type: boolean
                            required:
                              - kind
                              - id
                              - title
                              - outcome
                              - line
                              - event
                              - legs
                              - equivalence
                              - series_context
                              - livemode
                      meta:
                        type: object
                        properties:
                          timestampMs:
                            type: integer
                            minimum: 0
                          requestId:
                            type: string
                            minLength: 1
                          traceId:
                            type: string
                            minLength: 1
                          cachedAtMs:
                            type: integer
                            minimum: 0
                          source:
                            type: string
                            enum:
                              - cache
                              - database
                              - clickhouse
                              - upstream
                              - fallback
                              - internal
                        required:
                          - timestampMs
                          - requestId
                    required:
                      - success
                      - data
                      - meta
                  - $ref: '#/components/schemas/ApiError'
              example:
                success: true
                data:
                  kind: sports
                  id: >-
                    mkt_bmZsOjIwMjYtMTAtMTE6REVOLUxBQwpzcHJlYWQ6Z2FtZTpERU46LTMuNQpERU4
                  title: >-
                    Denver Broncos at Los Angeles Chargers: DEN -3.5, Denver
                    Broncos -3.5
                  outcome: DEN
                  line: '-3.5'
                  fixture:
                    key: nfl:2026-10-11:DEN-LAC
                    sport: football
                    league: nfl
                    title: Denver Broncos at Los Angeles Chargers
                    starts_at: '2026-10-11T20:25:00.000Z'
                    scheduled_date: '2026-10-11'
                    participants:
                      - Denver Broncos
                      - Los Angeles Chargers
                    teams:
                      - key: DEN
                        name: Denver Broncos
                        role: away
                      - key: LAC
                        name: Los Angeles Chargers
                        role: home
                  group:
                    key: spread:game:DEN:-3.5
                    kind: spread
                    template: sports.handicap
                    label: DEN -3.5
                    period: game
                    subject: DEN
                    stat: null
                    line: '-3.5'
                  legs:
                    - venue: hyperliquid
                      ticker: hl:9999
                      side: 'yes'
                      status: open
                      tradable: true
                      yes_token: null
                      no_token: null
                      lean_url: https://lean.xyz/trade?ticker=hl%3A9999
                      venue_url: https://app.hyperliquid.xyz/trade
                      resolution:
                        source: null
                        rules: >-
                          Resolves YES if the Denver Broncos win by more than
                          3.5 points, overtime included.
                        end_date: '2026-10-12T04:00:00.000Z'
                        url: null
                        result: null
                      fees:
                        formula: notional_on_exit
                        taker_rate: '0.0007'
                        maker_rate: '0.0004'
                        exponent: null
                    - venue: polymarket
                      ticker: >-
                        pm:0x2222222222222222222222222222222222222222222222222222222222222222
                      side: 'yes'
                      status: open
                      tradable: true
                      yes_token: null
                      no_token: null
                      lean_url: >-
                        https://lean.xyz/trade?ticker=pm%3A0x2222222222222222222222222222222222222222222222222222222222222222
                      venue_url: null
                      resolution:
                        source: null
                        rules: >-
                          Resolves to Denver Broncos if they win by more than
                          3.5 points, overtime included.
                        end_date: '2026-10-12T04:00:00.000Z'
                        url: null
                        result: null
                      fees:
                        formula: price_curve
                        taker_rate: '0.03'
                        maker_rate: '0'
                        exponent: 1
                  equivalence: verified
                  series_context: null
                  livemode: true
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '400':
          description: Not a market id, or a venue symbol that names more than one market
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: >-
                    Not a market id, or a venue symbol that names more than one
                    market
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '401':
          description: Missing, invalid, expired or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: UNAUTHORIZED
                  message: Invalid, expired or revoked API key
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '403':
          description: The key lacks the scope this route needs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: FORBIDDEN
                  message: This API key lacks the scope this route needs
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '404':
          description: No market with this id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: NOT_FOUND
                  message: No market with this id
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '429':
          description: API error
          headers:
            Retry-After:
              description: Seconds remaining in the upstream read cooldown, when available
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: RATE_LIMITED
                  message: Too many requests for this API key
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '500':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: INTERNAL_ERROR
                  message: An internal error occurred.
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
components:
  schemas:
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - VALIDATION_ERROR
                - NOT_FOUND
                - UNAUTHORIZED
                - FORBIDDEN
                - CONFLICT
                - UPSTREAM_ERROR
                - RATE_LIMITED
                - INTERNAL_ERROR
                - FEATURE_DISABLED
                - CONDITIONAL_SELL_REJECTED
                - CONDITIONAL_SELL_ACTIVE
            message:
              type: string
              minLength: 1
            details:
              nullable: true
          required:
            - code
            - message
        meta:
          type: object
          properties:
            timestampMs:
              type: integer
              minimum: 0
            requestId:
              type: string
              minLength: 1
            traceId:
              type: string
              minLength: 1
            cachedAtMs:
              type: integer
              minimum: 0
            source:
              type: string
              enum:
                - cache
                - database
                - clickhouse
                - upstream
                - fallback
                - internal
          required:
            - timestampMs
            - requestId
      required:
        - success
        - error
        - meta
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A Lean API key, sent as `Authorization: Bearer <key>`. A test key
        (`lean_sk_test_...`) simulates orders and fills with no money; a live
        key (`lean_sk_live_...`) trades for real within the key's limits. Every
        successful response says which mode answered in `data.livemode`.

````

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