Skip to main content
GET
/
v1
/
users
/
{user_pubkey}
/
collateral-history
Get user collateral history
curl --request GET \
  --url https://perp-api.phoenix.trade/v1/users/{user_pubkey}/collateral-history \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "amount": 123,
      "collateralAfter": 123,
      "eventIndex": 123,
      "eventType": "<string>",
      "slot": 123,
      "slotIndex": 123,
      "timestamp": "2023-11-07T05:31:56Z",
      "traderPdaIndex": 123,
      "traderSubaccountIndex": 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

limit
integer<int64>
required

Number of items to return (max 1000)

nextCursor
string

Cursor for older events (base64-encoded).

prevCursor
string

Cursor for newer events (base64-encoded).

cursor
string

Deprecated cursor parameter (older events).

Response

200 - application/json

Response for collateral event history queries

data
object[]
required

The data payload (array of items)

hasMore
boolean
required

Whether there are more results in the requested direction

nextCursor
string | null

Cursor for fetching older results

prevCursor
string | null

Cursor for fetching newer results