Skip to main content
GET
/
v1
/
users
/
{user_pubkey}
/
liquidation-history
Get user liquidation history
curl --request GET \
  --url https://perp-api.phoenix.trade/v1/users/{user_pubkey}/liquidation-history \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "eventIndex": 123,
      "ixName": "<string>",
      "market": "<string>",
      "slot": 123,
      "slotIndex": 123,
      "symbol": "<string>",
      "timestamp": 123,
      "atLossCloseValue": "<string>",
      "atLossCollateralChange": "<string>",
      "baseLotsFilled": "<string>",
      "caller": "<string>",
      "closedLong": "<string>",
      "closedShort": "<string>",
      "haircutRateBps": 123,
      "inProfitAccount": "<string>",
      "inProfitCloseValue": "<string>",
      "inProfitCollateralChange": "<string>",
      "liquidatee": "<string>",
      "liquidateeCollateralChange": "<string>",
      "liquidator": "<string>",
      "liquidatorCollateralChange": "<string>",
      "positionClosed": true,
      "price": "<string>",
      "quoteLotsFilled": "<string>",
      "quoteSize": "<string>",
      "side": "<string>",
      "signature": "<string>",
      "size": "<string>",
      "subaccountIndex": 123
    }
  ],
  "hasMore": true,
  "nextCursor": "<string>",
  "prevCursor": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer access token issued by /v1/auth/* login endpoints.

Path Parameters

user_pubkey
string
required

Query Parameters

pdaIndex
integer<int32>

Trader PDA index to scope history. Defaults to 0.

subaccountIndex
integer<int32> | null

Optional subaccount index. If omitted, all subaccounts under the PDA are included.

symbol
string | null

Optional market symbol filter.

limit
integer<int64>

Maximum number of events to return (max 100, default 100).

cursor
string | null

Opaque cursor for older or newer pagination.

Response

200 - application/json

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.

data
object[]
required
hasMore
boolean
required

Whether there are more results available after this page

nextCursor
string | null

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
string | null

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.