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

# List fills

> Executions on this key’s trading account, newest first, with price, quantity, fee and whether each fill made or took liquidity. Each fill names its `market_id`, `title` and `outcome`, or null when no market is listed for it. Filter by order, venue, market, time or text in the market title, and pass `next_cursor` back as `cursor` for the next page. A live key also sees fills of orders placed outside the API; a test key sees its simulated fills, including those of its limit chases. A limit chase’s fills have `order_id` `null`. Kalshi and Polymarket US fills belong to the user rather than one trading account, so every trading account of the user lists them. Reading a filled order with `GET /v1/orders/{id}` brings its fills into this list. A Polymarket fill whose trade Polygon has not confirmed yet, or a fill of an order you have not read, can be listed a few seconds after its order reads `filled`.



## OpenAPI

````yaml api-reference/openapi.json GET /fills
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:
  /fills:
    get:
      tags:
        - Orders
      summary: List fills
      description: >-
        Executions on this key’s trading account, newest first, with price,
        quantity, fee and whether each fill made or took liquidity. Each fill
        names its `market_id`, `title` and `outcome`, or null when no market is
        listed for it. Filter by order, venue, market, time or text in the
        market title, and pass `next_cursor` back as `cursor` for the next page.
        A live key also sees fills of orders placed outside the API; a test key
        sees its simulated fills, including those of its limit chases. A limit
        chase’s fills have `order_id` `null`. Kalshi and Polymarket US fills
        belong to the user rather than one trading account, so every trading
        account of the user lists them. Reading a filled order with `GET
        /v1/orders/{id}` brings its fills into this list. A Polymarket fill
        whose trade Polygon has not confirmed yet, or a fill of an order you
        have not read, can be listed a few seconds after its order reads
        `filled`.
      operationId: listFills
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          required: false
          name: limit
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 512
          required: false
          name: cursor
          in: query
        - schema:
            type: string
            format: uuid
            description: Only fills of this API order.
          required: false
          description: Only fills of this API order.
          name: order_id
          in: query
        - schema:
            type: string
            enum:
              - kalshi
              - polymarket
              - polymarket_us
              - hyperliquid
            description: Only fills on this venue.
          required: false
          description: Only fills on this venue.
          name: venue
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 512
            description: >-
              Only fills on this market. 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.
          required: false
          description: >-
            Only fills on this market. 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: market_id
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 100
            description: >-
              Text, in any letter case, found in the title or outcome of the
              market the fill trades.
          required: false
          description: >-
            Text, in any letter case, found in the title or outcome of the
            market the fill trades.
          name: search
          in: query
        - schema:
            type: string
            format: date-time
            description: Only fills at or after this time.
          required: false
          description: Only fills at or after this time.
          name: filled_after
          in: query
        - schema:
            type: string
            format: date-time
            description: Only fills before this time.
          required: false
          description: Only fills before this time.
          name: filled_before
          in: query
      responses:
        '200':
          description: Fills on this key's trading account, newest first
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      success:
                        type: boolean
                        enum:
                          - true
                      data:
                        type: object
                        properties:
                          fills:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 1
                                order_id:
                                  type: string
                                  nullable: true
                                  format: uuid
                                market_id:
                                  type: string
                                  nullable: true
                                  minLength: 1
                                  description: >-
                                    The market id from GET /markets, however the
                                    request named the market.
                                title:
                                  type: string
                                  nullable: true
                                  minLength: 1
                                outcome:
                                  type: string
                                  nullable: true
                                  minLength: 1
                                venue:
                                  type: string
                                  enum:
                                    - kalshi
                                    - polymarket
                                    - polymarket_us
                                    - hyperliquid
                                ticker:
                                  type: string
                                  minLength: 1
                                side:
                                  type: string
                                  enum:
                                    - 'yes'
                                    - 'no'
                                action:
                                  type: string
                                  enum:
                                    - buy
                                    - sell
                                price:
                                  type: string
                                quantity:
                                  type: string
                                  pattern: ^\d+(?:\.\d+)?$
                                fee_usd:
                                  type: string
                                  nullable: true
                                  pattern: ^-?\d+(?:\.\d+)?$
                                liquidity:
                                  type: string
                                  enum:
                                    - maker
                                    - taker
                                filled_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - order_id
                                - market_id
                                - title
                                - outcome
                                - venue
                                - ticker
                                - side
                                - action
                                - price
                                - quantity
                                - fee_usd
                                - liquidity
                                - filled_at
                          next_cursor:
                            type: string
                            nullable: true
                            minLength: 1
                            maxLength: 512
                          livemode:
                            type: boolean
                        required:
                          - fills
                          - next_cursor
                          - 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:
                  fills:
                    - id: fill_2c7e0a95d4b1
                      order_id: 8a1e5c07-4b3f-4d62-9f18-2c7e0a95d4b1
                      market_id: >-
                        mkt_bmZsOjIwMjYtMTAtMTE6REVOLUxBQwpzcHJlYWQ6Z2FtZTpERU46LTMuNQpERU4
                      title: >-
                        Denver Broncos at Los Angeles Chargers: DEN -3.5, Denver
                        Broncos -3.5
                      outcome: DEN
                      venue: hyperliquid
                      ticker: hl:9999
                      side: 'yes'
                      action: buy
                      price: '0.55'
                      quantity: '10'
                      fee_usd: '0.0022'
                      liquidity: taker
                      filled_at: '2026-10-29T18:00:00.000Z'
                  next_cursor: null
                  livemode: false
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '400':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: Invalid request
                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
        '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.