Skip to main content
GET
/
trader
/
{authority}
/
pnl
Get trader PnL
curl --request GET \
  --url https://perp-api.phoenix.trade/trader/{authority}/pnl
[
  {
    "cumulativeFundingPayment": 123,
    "cumulativePnl": 123,
    "cumulativeTakerFee": 123,
    "endTime": 123,
    "startTime": 123,
    "timestamp": 123,
    "unrealizedPnl": 123
  }
]

Path Parameters

authority
string
required

Authority pubkey

Query Parameters

resolution
enum<string>
required

Resolution/timeframe for sampling Time resolution for aggregated data queries

Available options:
1m,
5m,
15m,
1h,
4h,
1d,
1w,
1M
startTime
integer<int64>

Start time in milliseconds since Unix epoch

endTime
integer<int64>

End time in milliseconds since Unix epoch

limit
integer<int64>

Maximum number of data points to return (default: 1000)

symbols
string[]

Optional list of market symbols to filter by

includeEarliest
boolean

When true and resolution > 1m, replace the first data point with the earliest 1m data point

includeLatest
boolean

When true and resolution > 1m, append the latest 1m data point after the last bucket

Response

200 - application/json

Authority PnL

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