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

# Fills

> Read paginated trade executions for an account.

Read paginated trade executions for an account. This is an unsigned `POST /account` query with
`type: "fills"`, not a separate endpoint.

## Query target

Use a master, sub-account, or physical isolated-account public key.

HTTP history provides `slot`, `sequence`, `orderIdMaker`, and `orderIdTaker`, not the WebSocket `tradeId`. Retain the queried account and isolated identity when reconciling live fills.

## Pagination

Rows are newest-first. Start with optional inclusive `startSlot` and `endSlot`
bounds and `limit` (1–5000; default 5000). Continue with `page.nextCursor`,
keeping `user` and `type` unchanged; you may change `limit` but must omit slot
bounds. Stop when `hasMore` is false. Newer events need a new first-page request.

HTTP `206` can carry partial or unknown coverage. Neither an empty page nor
`hasMore: false` proves complete history. On `409`, preserve the coverage gap;
on `410`, restart and deduplicate; on `503`, back off and retry. See the shared
[history rules](https://docs.bulk.trade/api-reference/getAccount.md#history-queries) for errors and coverage.


## OpenAPI

````yaml api-reference/account/openapi-fills.yaml POST /account
openapi: 3.0.3
info:
  title: Bulk Trade API - Fills
  version: 1.0.0
servers:
  - url: https://mainnet-api1.bulk.trade/api/v1
    description: Mainnet
  - url: https://exchange-api.bulk.trade/api/v1
    description: Testnet
security: []
paths:
  /account:
    post:
      summary: Fills
      description: >-
        Read paginated trade executions for an account. No signature required.
        Use a master, sub-account, or physical isolated-account public key.
        First-page slot bounds are inclusive. A continuation keeps type and
        user, uses the returned cursor, and cannot include slot bounds.
      operationId: queryAccountFills
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - type
                - user
              not:
                anyOf:
                  - required:
                      - cursor
                      - startSlot
                  - required:
                      - cursor
                      - endSlot
              properties:
                type:
                  type: string
                  enum:
                    - fills
                  default: fills
                user:
                  type: string
                  description: >-
                    Paste the account public key (base58). No account is
                    selected for you.
                limit:
                  type: integer
                  minimum: 1
                  maximum: 5000
                  default: 5000
                  description: Optional page size for history queries
                  example: 2
                startSlot:
                  type: integer
                  format: int64
                  minimum: 0
                  description: >-
                    Optional inclusive lower slot bound for the first history
                    page
                endSlot:
                  type: integer
                  format: int64
                  minimum: 0
                  description: >-
                    Optional inclusive upper slot bound for the first history
                    page
                cursor:
                  type: string
                  description: >-
                    Opaque history continuation; cannot be combined with slot
                    bounds
            example:
              type: fills
              user: ''
              limit: 2
      responses:
        '200':
          description: >-
            Typed history page; inspect page coverage independently of
            pagination; illustrative example, not live data for the supplied
            account
          content:
            application/json:
              example:
                data: []
                page:
                  nextCursor: null
                  hasMore: false
                  asOfSlot: 13000
                  startSlot: 12000
                  endSlot: 13000
                  coverage: complete
              schema:
                type: object
                required:
                  - data
                  - page
                properties:
                  data:
                    type: array
                    items:
                      allOf:
                        - type: object
                          description: Trade execution (fill)
                          required:
                            - maker
                            - taker
                            - orderIdMaker
                            - orderIdTaker
                            - isBuy
                            - symbol
                            - amount
                            - price
                            - makerFee
                            - takerFee
                            - fee
                            - reasonCode
                            - slot
                            - timestamp
                            - sequence
                            - iso
                          properties:
                            maker:
                              type: string
                              description: Maker public key (base58)
                            taker:
                              type: string
                              description: Taker public key (base58)
                            orderIdMaker:
                              type: string
                              description: Maker order ID (base58)
                            orderIdTaker:
                              type: string
                              description: Taker order ID (base58)
                            isBuy:
                              type: boolean
                              description: Queried account side on paginated history
                            symbol:
                              type: string
                            amount:
                              type: number
                              description: Trade size
                            price:
                              type: number
                              description: Execution price
                            makerFee:
                              type: number
                              description: >-
                                Maker fee (negative is a charge, positive is a
                                rebate)
                            takerFee:
                              type: number
                              description: >-
                                Taker fee (negative is a charge, positive is a
                                rebate)
                            fee:
                              type: number
                              description: >-
                                Effective fee for queried row (`makerFee` for
                                maker row, `takerFee` for taker row)
                            reasonCode:
                              type: integer
                              format: int32
                              enum:
                                - 0
                                - 1
                                - 2
                                - 3
                              description: >-
                                Fill reason code: `0=normal`, `1=liquidation`,
                                `2=adl`, `3=liquidation_sweep`
                            reason:
                              type: string
                              enum:
                                - liquidation
                                - adl
                                - liquidation_sweep
                              description: Fill reason label (present only if non-normal)
                            counterpartyHint:
                              type: string
                              description: >-
                                Short counterparty key hint for the queried user
                                (`xxxx..yyyy`)
                            slot:
                              type: integer
                              format: int64
                              description: Slot number
                            timestamp:
                              type: integer
                              format: int64
                              description: Execution time (nanoseconds)
                            sequence:
                              type: integer
                              format: int64
                              description: Event sequence inside slot
                            iso:
                              type: boolean
                              description: >-
                                `true` if this row belongs to a per-instrument
                                isolated account, otherwise `false`
                            isoPubkey:
                              type: string
                              nullable: true
                              description: >-
                                Present only when `iso=true`; isolated-lane
                                account pubkey (base58)
                        - type: object
                          required:
                            - maker
                            - taker
                            - orderIdMaker
                            - orderIdTaker
                            - isBuy
                            - symbol
                            - amount
                            - price
                            - makerFee
                            - takerFee
                            - fee
                            - reasonCode
                            - iso
                            - slot
                            - timestamp
                            - sequence
                  page:
                    type: object
                    required:
                      - nextCursor
                      - hasMore
                      - asOfSlot
                      - startSlot
                      - endSlot
                      - coverage
                    properties:
                      nextCursor:
                        type: string
                        nullable: true
                        description: >-
                          Opaque exclusive continuation; null exactly when
                          hasMore is false
                      hasMore:
                        type: boolean
                      asOfSlot:
                        type: integer
                        format: int64
                        minimum: 0
                      startSlot:
                        type: integer
                        format: int64
                        minimum: 0
                      endSlot:
                        type: integer
                        format: int64
                        minimum: 0
                      coverage:
                        type: string
                        enum:
                          - complete
                          - partial
                          - unknown
                        description: >-
                          Coverage of the effective inclusive range. Backfill
                          proof is fixed at its inclusive cutoff and is not
                          advanced by newer live rows.
                      minAvailableSlot:
                        type: integer
                        format: int64
                        minimum: 0
                        description: >-
                          Earliest authoritative slot for this direct or
                          aggregate history scope; primary and parent-alias
                          retention floors are independent. Omitted when
                          unknown.
        '206':
          description: >-
            Incomplete history page when partial reads are enabled; inspect page
            coverage
          headers:
            X-Bulk-History-Status:
              description: Coverage status
              schema:
                type: string
                enum:
                  - partial
                  - unknown
            X-Bulk-History-Min-Available-Slot:
              description: Earliest authoritative available slot; omitted when unknown
              schema:
                type: integer
                format: int64
                minimum: 0
          content:
            application/json:
              schema:
                $ref: 161432d3-4c0e-4c3d-a82c-5bb998bcdbc2
        '400':
          description: >-
            Invalid current-state request or malformed history query, limit,
            slot range, or cursor
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        enum:
                          - INVALID_HISTORY_QUERY
                          - INVALID_HISTORY_LIMIT
                          - INVALID_SLOT_RANGE
                          - CURSOR_INVALID
                          - ACCOUNT_NOT_FOUND
                          - HISTORY_NOT_COVERED
                          - CURSOR_EXPIRED
                          - HISTORY_STATE_NOT_READY
                          - HISTORY_BUSY
                          - HISTORY_STORAGE_ERROR
                      message:
                        type: string
        '404':
          description: >-
            The current-state account or history scope was not found. History
            requests return the structured error envelope when a JSON body is
            present.
          content:
            application/json:
              schema:
                $ref: b900f454-2d8b-4fd8-ad44-5f3d0dfca448
        '408':
          description: >-
            Response timeout (60 seconds for orders, 5 seconds for current-state
            snapshot requests). An order may still execute; reconcile before
            submitting a replacement.
        '409':
          description: Strict coverage cannot satisfy the requested history range
          content:
            application/json:
              schema:
                $ref: b900f454-2d8b-4fd8-ad44-5f3d0dfca448
        '410':
          description: >-
            History scope, coverage, backfill, or retention changed after cursor
            issuance
          content:
            application/json:
              schema:
                $ref: b900f454-2d8b-4fd8-ad44-5f3d0dfca448
        '429':
          description: >-
            Request or action rate limit reached. Back off before retrying; the
            body may be plain text or empty.
        '500':
          description: >-
            Current-state request failure or history storage/decoding failure.
            History requests return the structured error envelope when a JSON
            body is present.
          content:
            application/json:
              schema:
                $ref: b900f454-2d8b-4fd8-ad44-5f3d0dfca448
        '503':
          description: >-
            History state is not ready, bounded read capacity is saturated, or
            the API is locked
          content:
            application/json:
              schema:
                oneOf:
                  - 0304b2a7-c25b-4145-8919-92b214671b69
                  - type: object
                    required:
                      - code
                      - error
                    properties:
                      code:
                        type: string
                        enum:
                          - API_LOCKED
                      error:
                        type: string
      security: []

````

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