Skip to main content
GET
/
v1
/
traders
/
{trader_pubkey}
/
pnl
/
markets
Get trader market PnL
curl --request GET \
  --url https://perp-api.phoenix.trade/v1/traders/{trader_pubkey}/pnl/markets \
  --header 'Authorization: Bearer <token>'
[
  {
    "baseDecimals": 123,
    "marketId": 123,
    "points": [
      {
        "baseLots": 123,
        "cumulativeFundingPayment": 123,
        "cumulativePnl": 123,
        "cumulativeTakerFee": 123,
        "endTime": 123,
        "markPrice": 123,
        "realizedPnl": 123,
        "startTime": 123,
        "timestamp": 123,
        "totalTakerFee": 123,
        "unrealizedPnl": 123,
        "virtualQuoteLots": 123
      }
    ],
    "symbol": "<string>",
    "tickSize": 123
  }
]

Authorizations

Authorization
string
header
required

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

Path Parameters

trader_pubkey
string
required

Trader public key (base58 encoded)

Query Parameters

resolution
string
required

Resolution/timeframe: 1m, 5m, 15m, 1h, 4h, 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 per market (default: 1000, max: 1000)

symbols
string

Comma separated list of market symbols to filter (defaults to all)

Response

200 - application/json
baseDecimals
integer<int32>
required

Base decimals used for this market

marketId
integer<int64>
required

Market identifier

points
object[]
required

Time-series points

symbol
string
required

Market symbol (e.g. BTC, SOL, ETH)

tickSize
integer<int32>
required

Tick size in quote lots per base lot per tick