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

# Historical

> Provides historical liquidation data for futures instruments, including timestamps, order details, price, volume, and position type for each liquidation event across exchanges.

<Accordion title="BitMEX Volume Calculation Warning">
  <Warning>
    BitMEX’s `volume` field represents the **number of contracts traded**, not the volume in the base asset.

    To obtain the correct volume, users must adjust for **contract size** using the `underlyingToPositionMultiplier` from our [Reference endpoint](/http/md/futures-exchanges-reference).

    For details on this calculation and how to retrieve the correct values, see our [Changelog Update](/changelog/bitmex-volume-mapping).
  </Warning>
</Accordion>

<Warning>
  The maximum time range (difference between `startDate` and `endDate`) is **731 days (2 years)**.
</Warning>

<Note>
  If the startDate and endDate query parameters are not provided, the API will return the data from the previous 24 hours.
</Note>


## OpenAPI

````yaml get /futures/liquidations/{instrument}
openapi: 3.1.0
info:
  title: market-api
  version: '2'
servers:
  - url: https://api.amberdata.com/markets
security:
  - ApiKeyAuth: []
paths:
  /futures/liquidations/{instrument}:
    get:
      summary: Historical
      description: >-
        Provides historical liquidation data for futures instruments, including
        timestamps, order details, price, volume, and position type for each
        liquidation event across exchanges.
      operationId: futures-liquidations-historical
      parameters:
        - name: instrument
          in: path
          description: The futures instrument for which data will be retrieved.
          schema:
            type: string
            default: BTCUSDT
          required: true
        - name: exchange
          in: query
          description: >-
            The exchange for which data should be retrieved. Only **1** exchange
            is allowed.
          required: true
          schema:
            type: string
            default: binance
        - name: startDate
          in: query
          description: >-
            **[Optional]** Payload only includes data after this date
            (inclusive). **[Formats]** `seconds | milliseconds | iso8601`
            **[Examples]** `1578531600 | 1578531600000 | 2020-09-01T01:00:00`
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          description: >-
            **[Optional]** Payload only includes data before this date
            (exclusive). **[Formats]** `seconds | milliseconds | iso8601`
            **[Examples]** `1578531600 | 1578531600000 | 2020-09-01T01:00:00`
          schema:
            type: string
            format: date-time
        - name: timeFormat
          in: query
          description: '**[Optional]** Time format of the timestamps in the return payload.'
          schema:
            type: string
            enum:
              - milliseconds
              - ms*
              - iso
              - iso8601
              - hr
              - human_readable
            default: hr
        - name: sortDirection
          in: query
          description: >-
            **[Optional]** Specifies the direction in which the data is sorted
            (by timestamp).   **[Defaults]** asc (ascending order).   **[Usage
            Conditions]** This parameter can only be used if the `startDate` and
            `endDate` timeframe is within the most recent 24 hours, or if the
            `startDate` and `endDate` parameters are not used at all.  
            **[Examples]** ascending | descending | asc | desc
          schema:
            type: string
        - name: Accept-Encoding
          in: header
          required: true
          description: ''
          schema:
            type: string
            default: gzip, deflate, br
        - name: api-version
          in: header
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      metadata:
                        next: >-
                          https://api.amberdata.com/markets/futures/liquidations/BTCUSDT?cursor=N4IgpgHgxgFghgOwOZhALhAIwJYMVVAGhCgFcAnAZwHtz0FSAbR4ygFznLYBE43U0ARgDsIgKxiADAE5hADkEAmOcTAIAJr37oRIgGySALIKWHF04riiNS6sAFUElUgAcXtfuoCi0eMjCU6ABmcIyUYMRs2AC2YABitNF86CDR2MzY4VDUGoHEQYnJGABWNAggrB4A0mAAnim6whIy8kpyAPqS7Th4CATtAEIAKgDC9gDK3EPtogDMgmIAdAudi5JGIAC%2BQA
                        api-version: '2023-09-30'
                      data:
                        - instrument: BTCUSDT
                          exchange: binance
                          exchangeTimestamp: 1717517743430
                          exchangeTimestampNanoseconds: 0
                          action: null
                          orderId: null
                          side: BUY
                          status: FILLED
                          timeInForce: IOC
                          type: LIMIT
                          price: 70913.39
                          volume: 0.002
                          unit: base_asset
                          positionType: SHORT
                        - instrument: BTCUSDT
                          exchange: binance
                          exchangeTimestamp: 1717517764608
                          exchangeTimestampNanoseconds: 0
                          action: null
                          orderId: null
                          side: BUY
                          status: FILLED
                          timeInForce: IOC
                          type: LIMIT
                          price: 70929.32
                          volume: 0.002
                          unit: base_asset
                          positionType: SHORT
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  title:
                    type: string
                  description:
                    type: string
                  payload:
                    type: object
                    properties:
                      metadata:
                        type: object
                        properties:
                          next:
                            type: string
                          api-version:
                            type: string
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            instrument:
                              type: string
                            exchange:
                              type: string
                            exchangeTimestamp:
                              type: integer
                            exchangeTimestampNanoseconds:
                              type: integer
                            action:
                              type: string
                            orderId:
                              type: string
                            side:
                              type: string
                            status:
                              type: string
                            timeInForce:
                              type: string
                            type:
                              type: string
                            price:
                              type: number
                            volume:
                              type: number
                            unit:
                              type: string
                            positionType:
                              type: string
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````