> ## Documentation Index
> Fetch the complete documentation index at: https://whitebit-mintlify-spelling-grammar-fixes-1775434366.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Query executed order history

> Retrieve the history of fully and partially executed spot orders via the WhiteBIT V4 API.



## OpenAPI

````yaml /openapi/private/http-trade-v4.yaml POST /api/v4/trade-account/executed-history
openapi: 3.0.3
info:
  title: Private HTTP API V4 - Collateral Trading
  description: |
    WhiteBIT Private HTTP API V4 for collateral/margin trading operations.

    Base URL: https://whitebit.com

    All endpoints return time in Unix-time format.
    All endpoints return either a JSON object or array.
    For receiving responses from API calls please use http method POST.

    Authentication required for all endpoints.
  version: 4.0.0
  license:
    name: WhiteBIT Terms of Service
    url: https://whitebit.com/terms
servers:
  - url: https://whitebit.com
    description: WhiteBIT Global Server
  - url: https://whitebit.eu
    description: WhiteBIT EU Server
security:
  - ApiKeyAuth: []
    PayloadAuth: []
    SignatureAuth: []
tags:
  - name: Collateral Trading
    description: Endpoints for collateral/margin trading operations
  - name: Spot Trading
    description: Endpoints for spot trading operations
  - name: Market Fee
    description: Endpoints for querying trading fees
paths:
  /api/v4/trade-account/executed-history:
    post:
      tags:
        - Spot Trading
      summary: Query executed order history
      description: >
        The endpoint retrieves executed order history for all trading types —
        spot, margin, and futures — across all markets. Can be filtered by a
        single market if needed.


        <Warning>

        Rate limit: 12000 requests/10 sec.

        </Warning>


        <Warning>

        Requests with `limit` values above 100 return large payloads. Use high
        limits only when necessary and ensure the client application can handle
        large response sizes.

        </Warning>


        <Note>

        The endpoint can retrieve data not older than 6 months from the current
        month. For older data, use the Report on the History page.

        </Note>


        <Accordion title="Errors">

        ```json

        {
          "code": 30,
          "message": "Validation failed",
          "errors": {
            "limit": ["Limit field should be an integer."],
            "offset": ["Offset field should be an integer."]
          }
        }

        ```


        ```json

        {
          "code": 31,
          "message": "Validation failed",
          "errors": {
            "market": ["Market field format is invalid."]
          }
        }

        ```

        </Accordion>
      operationId: getExecutedOrderHistory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                market:
                  type: string
                  description: 'Requested [market](/glossary#market). Example: BTC_USDT'
                  example: BTC_USDT
                client_order_id:
                  type: string
                  description: Filter by custom order identifier
                  example: customId11
                startDate:
                  type: integer
                  description: Start date in Unix-time format
                  example: 1593233939
                endDate:
                  type: integer
                  description: End date in Unix-time format
                  example: 1593233939
                offset:
                  type: integer
                  default: 0
                  description: 'Starting line index (OFFSET). Default: 0, Min: 0'
                  example: 0
                limit:
                  type: integer
                  minimum: 1
                  maximum: 500
                  default: 50
                  description: >-
                    LIMIT is a special clause used to limit records a particular
                    query can return. Default: 50, Min: 1, Max: 500
                  example: 50
                request:
                  type: string
                  example: '{{request}}'
                nonce:
                  type: string
                  example: '{{nonce}}'
      responses:
        '200':
          description: >-
            Executed order history. Response shape depends on whether the market
            filter is provided: with market filter returns a flat array; without
            market filter returns an object keyed by market name.
          content:
            application/json:
              schema:
                oneOf:
                  - description: >-
                      Returned when the market request parameter is provided.
                      Flat array of deal objects for the specified market.
                    type: array
                    items:
                      $ref: '#/components/schemas/ExecutedDeal'
                  - description: >-
                      Returned when no market filter is provided. Object keyed
                      by market name (e.g., "BTC_USDT"), each value is an array
                      of deal objects for that market.
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        $ref: '#/components/schemas/ExecutedDeal'
        '400':
          description: Inner validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily unavailable
      security:
        - ApiKeyAuth: []
          PayloadAuth: []
          SignatureAuth: []
components:
  schemas:
    ExecutedDeal:
      type: object
      properties:
        id:
          type: integer
          description: Deal ID
        client_order_id:
          type: string
          description: Custom order ID (empty if not specified)
        time:
          type: number
          description: Timestamp of executed deal
        side:
          type: string
          enum:
            - buy
            - sell
        role:
          type: integer
          description: 1 - maker, 2 - taker
        amount:
          type: string
          description: >-
            Amount in stock (quote) currency. Always expressed in the
            stock/asset side of the market pair regardless of order direction.
        price:
          type: string
        deal:
          type: string
          description: Amount in money currency
        fee:
          type: string
          description: Paid fee
        order_id:
          type: integer
        feeAsset:
          type: string
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Error code
          example: 30
        message:
          type: string
          description: Error message
          example: Validation failed
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Detailed error information
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-TXC-APIKEY
      description: The public WhiteBIT API key.
    PayloadAuth:
      type: apiKey
      in: header
      name: X-TXC-PAYLOAD
      description: Base64-encoded JSON request body.
    SignatureAuth:
      type: apiKey
      in: header
      name: X-TXC-SIGNATURE
      description: >-
        HMAC-SHA512 signature of the payload, hex-encoded. Computed as
        hex(HMAC-SHA512(payload, api_secret)).

````