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

# Get Liquidation History

> Returns a paginated history of liquidation events for the authenticated account. For how liquidations work, see [Liquidations](/def).



## OpenAPI

````yaml /api-reference/rest-spec.json get /v1/perps/liquidation_history
openapi: 3.0.3
info:
  title: Ondo Perps REST API
  version: '1.0'
  description: >-
    REST API for Ondo Perps: account, wallet, deposits/withdrawals, API keys,
    and perpetual futures trading.
servers:
  - url: https://api.ondoperps.xyz
security:
  - BearerAuth: []
paths:
  /v1/perps/liquidation_history:
    get:
      tags:
        - Margin Account
      summary: Get Liquidation History
      description: >-
        Returns a paginated history of liquidation events for the authenticated
        account. For how liquidations work, see [Liquidations](/def).
      operationId: getLiquidationHistory
      parameters:
        - name: market
          in: query
          description: Filter by market
          required: false
          schema:
            type: string
            example: AAPL-USD.P
        - name: limit
          in: query
          description: Maximum number of results to return
          required: false
          schema:
            type: integer
            example: 100
        - name: cursor
          in: query
          description: Pagination cursor
          required: false
          schema:
            type: string
            example: NQ5WWO3THN3Q====
        - name: startTime
          in: query
          description: Start time filter (UTC milliseconds)
          required: false
          schema:
            type: integer
            example: 1684814400000
        - name: endTime
          in: query
          description: End time filter (UTC milliseconds)
          required: false
          schema:
            type: integer
            example: 1672549200000
      responses:
        '200':
          description: Paginated list of liquidation events
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GenericResponse'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/LiquidationEvent'
                      pageInfo:
                        $ref: '#/components/schemas/PageInfo'
              example:
                success: true
                result:
                  - id: liq_70a37d8f972f2494837f9dba8364cbb4
                    time: '2025-02-15T08:00:00Z'
                    initiatedAt: '2025-02-15T07:59:55Z'
                    accountId: '10458932786832481'
                    status: finished
                    insuranceFundUsed: '0.00'
                    adl: false
                    retryCount: 0
                    filledQuoteSize: '5000.00'
                    filledQuantity: '22.00'
                    reclaimOrderMargin: false
                pageInfo: {}
        '400':
          description: Bad request. The request was malformed or failed validation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    description: Human-readable error message
                  error_code:
                    type: string
                    enum:
                      - bad_query_param
                      - failed_to_parse_timestamp
                      - invalid_cursor
              example:
                success: false
                error: Description of the error
                error_code: bad_query_param
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    GenericResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: Whether the request was successful
          example: true
        error:
          type: string
          description: Error message, present only on failure
          example: ''
        error_code:
          type: string
          description: >-
            Semantic error code. See each endpoint's error responses for the
            specific codes it can return.
        deprecated:
          type: string
          description: Deprecation notice, if applicable
          example: ''
    LiquidationEvent:
      type: object
      required:
        - id
        - time
        - initiatedAt
        - accountId
        - status
        - insuranceFundUsed
        - adl
        - retryCount
      properties:
        id:
          type: string
          description: Liquidation event ID
          example: liq_70a37d8f972f2494837f9dba8364cbb4
        time:
          type: string
          format: date-time
          description: Time the liquidation completed
          example: '2024-01-04T16:13:34Z'
        initiatedAt:
          type: string
          format: date-time
          description: Time the liquidation was initiated
          example: '2024-01-04T16:13:30Z'
        accountId:
          type: string
          description: Account that was liquidated
          example: '10458932786832481'
        status:
          type: string
          description: Status of the liquidation event
          example: start
          enum:
            - queued
            - start
            - retry
            - stop
        insuranceFundUsed:
          type: string
          description: Amount drawn from the insurance fund to cover losses
          example: '0.00'
        adl:
          type: boolean
          description: Whether auto-deleveraging (ADL) was triggered
          example: false
        retryCount:
          type: integer
          description: Number of retry attempts before the liquidation completed
          example: 0
        triggeringPositions:
          type: array
          description: >-
            Positions that triggered the liquidation (populated for events after
            August 2024)
          items:
            $ref: '#/components/schemas/ApiPosition'
        filledQuoteSize:
          type: string
          description: >-
            Total quote value of positions closed during liquidation (populated
            for events after February 2025)
          example: '5000.00'
        filledQuantity:
          type: string
          description: >-
            Total base quantity of positions closed during liquidation
            (populated for events after February 2025)
          example: '0.25'
        reclaimOrderMargin:
          type: boolean
          description: >-
            If true, the liquidation only cancelled resting orders to free up
            margin without closing positions
          example: false
    PageInfo:
      type: object
      properties:
        prevCursor:
          type: string
          description: Cursor value to get the previous page of results
          example: O4ZTGM3RGM2DG===
        nextCursor:
          type: string
          description: Cursor value to get the next page of results
          example: NQ5WWO3THN3Q====
    ApiPosition:
      type: object
      required:
        - market
        - direction
        - netQuantity
        - averageEntryPrice
        - usedMargin
        - unrealizedPnl
        - markPrice
        - liquidationPrice
        - bankruptcyPrice
        - maintenanceMargin
        - notionalValue
        - leverage
        - netFundingSinceNeutral
        - returnOnEquity
      properties:
        market:
          type: string
          description: Perps market
          example: AAPL-USD.P
        direction:
          type: string
          description: Position direction
          enum:
            - long
            - short
            - neutral
          example: short
        netQuantity:
          type: string
          description: Size of the position in base currency
          example: '1.5489'
        averageEntryPrice:
          type: string
          description: Average entry price
          example: '20566.84'
        usedMargin:
          type: string
          description: Margin used for the position
          example: '2566.84'
        unrealizedPnl:
          type: string
          description: >-
            Unrealized PNL relative to the mark price. Positive is profit,
            negative is loss.
          example: '-900.54'
        markPrice:
          type: string
          description: Current mark price
          example: '20000.54'
        liquidationPrice:
          type: string
          description: Price at which the position will be liquidated
          example: '9000.87'
        bankruptcyPrice:
          type: string
          description: Price at which bankruptcy occurs during liquidation
          example: '6000.11'
        maintenanceMargin:
          type: string
          description: Maintenance margin required for this position
          example: '1500.22'
        notionalValue:
          type: string
          description: Notional value of the position
          example: '30000.00'
        leverage:
          type: string
          description: Current effective leverage for this position
          example: '10.0'
        netFundingSinceNeutral:
          type: string
          description: Net funding payments since the position was opened
          example: '-12.34'
        returnOnEquity:
          type: string
          description: Return on equity for this position
          example: '-0.35'
        stopLossTriggerPrice:
          type: string
          description: Triggering price for stop loss order (optional)
          example: '18000.00'
        takeProfitTriggerPrice:
          type: string
          description: Triggering price for take profit order (optional)
          example: '25000.00'
  responses:
    Unauthorized:
      description: Authentication required. Provide a valid JWT or API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: string
                description: Human-readable error message
              error_code:
                type: string
                enum:
                  - api_key_not_found
                  - auth_expired
                  - auth_invalid
                  - auth_missing
                  - failed_to_decode_hex_signature
                  - failed_to_parse_timestamp
                  - signature_mismatch
                  - timestamp_too_far
          example:
            success: false
            error: Description of the error
            error_code: auth_missing
    Forbidden:
      description: Access denied. The authenticated account does not have permission.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: string
                description: Human-readable error message
              error_code:
                type: string
                enum:
                  - account_closed
                  - account_not_allowed
                  - forbidden
                  - ip_not_permitted
                  - key_doesnt_have_scope
          example:
            success: false
            error: Description of the error
            error_code: account_not_allowed
    TooManyRequests:
      description: Rate limit exceeded. Slow down request frequency.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: string
                description: Human-readable error message
              error_code:
                type: string
                enum:
                  - too_many_requests
          example:
            success: false
            error: Description of the error
            error_code: too_many_requests
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: string
                description: Human-readable error message
              error_code:
                type: string
                enum:
                  - server_is_busy
                  - service_unavailable
                  - unknown
          example:
            success: false
            error: Description of the error
            error_code: unknown
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY-ID

````