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

# Get user liquidation history

> Handles `GET /v1/users/{user_pubkey}/liquidation-history` via `get.v1.users.by_user_pubkey.liquidation_history`.



## OpenAPI

````yaml /openapi/phoenix-public-api.json get /v1/users/{user_pubkey}/liquidation-history
openapi: 3.1.0
info:
  title: Phoenix Eternal API
  description: >-
    RESTful API for accessing Phoenix Eternal perpetual trading data. Provides
    real-time orderbook levels, asset information, and market metadata.
  termsOfService: https://www.phoenix.trade/terms-of-service
  contact:
    name: Phoenix Development Team
    url: https://github.com/Ellipsis-Labs/phoenix
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://perp-api.phoenix.trade
    description: Phoenix Eternal Perp API
security: []
tags:
  - name: Auth
    description: Wallet and session authentication.
  - name: Exchange
    description: Exchange, market, candle, and no-referral register-instruction workflows.
  - name: Invite
    description: Invite validation, referral activation, and wallet allowlist checks.
  - name: Notifications
    description: Trader notification reads and acknowledgement helpers.
  - name: Trader
    description: Trader state, account history, and transaction builders.
externalDocs:
  url: https://docs.phoenix.trade
  description: Phoenix developer documentation
paths:
  /v1/users/{user_pubkey}/liquidation-history:
    get:
      tags:
        - Trader
      summary: Get user liquidation history
      description: >-
        Handles `GET /v1/users/{user_pubkey}/liquidation-history` via
        `get.v1.users.by_user_pubkey.liquidation_history`.
      operationId: get.v1.users.by_user_pubkey.liquidation_history
      parameters:
        - name: pdaIndex
          in: query
          description: Trader PDA index to scope history. Defaults to 0.
          required: false
          schema:
            type: integer
            format: int32
          example: 0
        - name: subaccountIndex
          in: query
          description: >-
            Optional subaccount index. If omitted, all subaccounts under the PDA
            are

            included.
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int32
        - name: symbol
          in: query
          description: Optional market symbol filter.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: limit
          in: query
          description: Maximum number of events to return (max 100, default 100).
          required: false
          schema:
            type: integer
            format: int64
          example: 100
        - name: cursor
          in: query
          description: Opaque cursor for older or newer pagination.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: user_pubkey
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponse_Vec_UserLiquidationHistoryPoint
      security:
        - PhoenixBearerAuth: []
components:
  schemas:
    PaginatedResponse_Vec_UserLiquidationHistoryPoint:
      type: object
      description: >-
        Generic paginated response wrapper with bidirectional cursor support.


        The cursor system supports both forward (newer) and backward (older)

        pagination:

        - `prev_cursor`: Use this cursor to poll for new items (items newer than
        the
          current result set)
        - `next_cursor`: Use this cursor to load more items (items older than
        the
          current result set)

        The direction is embedded in the cursor itself, so clients just need to
        pass

        the appropriate cursor to the `cursor` parameter.
      required:
        - data
        - hasMore
      properties:
        data:
          type: array
          items:
            type: object
            description: >-
              A normalized liquidation, backstop, or ADL event for one user
              authority.
            required:
              - kind
              - type
              - ixName
              - role
              - slot
              - slotIndex
              - eventIndex
              - timestamp
              - symbol
              - market
            properties:
              atLossCloseValue:
                type:
                  - string
                  - 'null'
              atLossCollateralChange:
                type:
                  - string
                  - 'null'
              baseLotsFilled:
                type:
                  - string
                  - 'null'
              caller:
                type:
                  - string
                  - 'null'
              closedLong:
                type:
                  - string
                  - 'null'
              closedShort:
                type:
                  - string
                  - 'null'
              eventIndex:
                type: integer
                format: int32
              haircutRateBps:
                type:
                  - integer
                  - 'null'
                format: int32
              inProfitAccount:
                type:
                  - string
                  - 'null'
              inProfitCloseValue:
                type:
                  - string
                  - 'null'
              inProfitCollateralChange:
                type:
                  - string
                  - 'null'
              ixName:
                type: string
                description: Indexed instruction name that emitted this event.
              kind:
                $ref: '#/components/schemas/UserLiquidationHistoryKind'
              liquidatee:
                type:
                  - string
                  - 'null'
              liquidateeCollateralChange:
                type:
                  - string
                  - 'null'
              liquidator:
                type:
                  - string
                  - 'null'
              liquidatorCollateralChange:
                type:
                  - string
                  - 'null'
              market:
                type: string
                description: >-
                  Alias for `symbol`, included for clients that present this
                  field as the

                  market.
              positionClosed:
                type:
                  - boolean
                  - 'null'
              price:
                type:
                  - string
                  - 'null'
              quoteLotsFilled:
                type:
                  - string
                  - 'null'
              quoteSize:
                type:
                  - string
                  - 'null'
              role:
                $ref: '#/components/schemas/UserLiquidationHistoryRole'
              side:
                type:
                  - string
                  - 'null'
              signature:
                type:
                  - string
                  - 'null'
              size:
                type:
                  - string
                  - 'null'
              slot:
                type: integer
                format: int64
              slotIndex:
                type: integer
                format: int32
              subaccountIndex:
                type:
                  - integer
                  - 'null'
                format: int32
              symbol:
                type: string
                description: Market symbol, for example `SOL-PERP`.
              timestamp:
                type: integer
                format: int64
              type:
                $ref: '#/components/schemas/UserLiquidationHistoryType'
                description: 'High-level event type: `market`, `adl`, or `backstop`.'
        hasMore:
          type: boolean
          description: Whether there are more results available after this page
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Opaque cursor for fetching the next page of older results.

            Pass this value as the `cursor` parameter in the next request to
            load

            more.
        prevCursor:
          type:
            - string
            - 'null'
          description: >-
            Opaque cursor for fetching newer items (for polling).

            Pass this value as the `cursor` parameter to get items newer than
            the

            first item in data.
    UserLiquidationHistoryKind:
      type: string
      description: User-scoped liquidation history event kind.
      enum:
        - market_order
        - adl
        - backstop
    UserLiquidationHistoryRole:
      type: string
      description: Role the requested user played in a liquidation-related event.
      enum:
        - liquidatee
        - backstop_liquidatee
        - adl_closed_short
        - adl_closed_long
        - adl_in_profit
        - adl_caller
    UserLiquidationHistoryType:
      type: string
      description: High-level liquidation-related event type.
      enum:
        - market
        - adl
        - backstop
  securitySchemes:
    PhoenixBearerAuth:
      type: http
      scheme: bearer
      description: Bearer access token issued by `/v1/auth/*` login endpoints.

````