Skip to main content
GET
/
v1
/
users
/
{user_pubkey}
/
pnl
Get user PnL
curl --request GET \
  --url https://perp-api.phoenix.trade/v1/users/{user_pubkey}/pnl \
  --header 'Authorization: Bearer <token>'
[
  {
    "cumulativeFundingPayment": 123,
    "cumulativePnl": 123,
    "cumulativeTakerFee": 123,
    "endTime": 123,
    "startTime": 123,
    "timestamp": 123,
    "unrealizedPnl": 123
  }
]

Authorizations

Authorization
string
header
required

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

Path Parameters

user_pubkey
string
required

User public key (base58 encoded)

Query Parameters

resolution
string
required

Resolution/timeframe: 1m, 1d

startTime
integer<int64>

Start time in milliseconds since Unix epoch (max range: 1 year)

endTime
integer<int64>

End time in milliseconds since Unix epoch (max range: 1 year)

limit
integer<int64>

Max number of data points (default: 1000, max: 1440)

Response

200 - application/json
cumulativeFundingPayment
number<double>
required

Cumulative funding payment up to this point

cumulativePnl
number<double>
required

Cumulative realized PnL up to this point

cumulativeTakerFee
number<double>
required

Cumulative taker fees paid up to this point

endTime
integer<int64>
required

End time in seconds since Unix epoch

startTime
integer<int64>
required

Start time in seconds since Unix epoch

timestamp
integer<int64>
required

Deprecated: Unix timestamp in seconds.

unrealizedPnl
number<double>
required

unrealized PnL up to this point