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

# Activity History

> Read paginated account activity.

Read paginated account activity. This is an unsigned `POST /account` query with
`type: "activityHistory"`, not a separate endpoint.

## Query target

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

Use the event fields to distinguish activity types. An empty page does not establish that no earlier activity exists; inspect coverage metadata.

## 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-activity-history.yaml POST /account
openapi: 3.0.3
info:
  title: Bulk Trade API - Activity History
  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: Activity History
      description: >-
        Read paginated account activity. 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: queryAccountActivityHistory
      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:
                    - activityHistory
                  default: activityHistory
                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: activityHistory
              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: >-
                            Account activity history row (transfers, deposits,
                            builder-code fee credits)
                          required:
                            - activityType
                            - status
                            - from
                            - to
                            - symbol
                            - amount
                            - iso
                            - slot
                            - timestamp
                            - sequence
                          properties:
                            activityType:
                              type: string
                              enum:
                                - transferInternal
                                - transferExternal
                                - deposit
                                - withdrawal
                                - builderCode
                                - unknown
                            status:
                              type: string
                              enum:
                                - completed
                                - failed
                                - ongoing
                                - unknown
                            from:
                              type: string
                              description: Source account pubkey (base58)
                            to:
                              type: string
                              description: Destination account pubkey (base58)
                            symbol:
                              type: string
                              description: Margin asset symbol
                            amount:
                              type: number
                            reason:
                              type: string
                              nullable: true
                              description: Optional failure/details string
                            iso:
                              type: boolean
                              description: >-
                                `true` if the row belongs to an implicit
                                isolated-lane owner stream
                            isoPubkey:
                              type: string
                              nullable: true
                              description: >-
                                Present only when `iso=true`; isolated-lane
                                account pubkey (base58)
                            slot:
                              type: integer
                              format: int64
                            timestamp:
                              type: integer
                              format: int64
                              description: Event timestamp (nanoseconds)
                            sequence:
                              type: integer
                              format: int64
                        - type: object
                          required:
                            - activityType
                            - status
                            - from
                            - to
                            - symbol
                            - amount
                            - 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: a487e9e2-8b78-4ff1-9c94-cb77d5cf4de3
        '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: 620a5536-d329-41ef-a21d-8f5ed166877b
        '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: 620a5536-d329-41ef-a21d-8f5ed166877b
        '410':
          description: >-
            History scope, coverage, backfill, or retention changed after cursor
            issuance
          content:
            application/json:
              schema:
                $ref: 620a5536-d329-41ef-a21d-8f5ed166877b
        '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: 620a5536-d329-41ef-a21d-8f5ed166877b
        '503':
          description: >-
            History state is not ready, bounded read capacity is saturated, or
            the API is locked
          content:
            application/json:
              schema:
                oneOf:
                  - 73e9c645-06fa-4d06-a23e-a59f0bce4a80
                  - 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.