Skip to main content
GET
/
v1
/
view
/
trader
/
{pubkey}
Get trader
curl --request GET \
  --url https://perp-api.phoenix.trade/v1/view/trader/{pubkey} \
  --header 'Authorization: Bearer <token>'
{
  "accumulatedFunding": "<string>",
  "authority": "<string>",
  "cancelMargin": "<string>",
  "capabilities": {
    "depositCollateral": {
      "immediate": true,
      "viaColdActivation": true
    },
    "placeLimitOrder": {
      "immediate": true,
      "viaColdActivation": true
    },
    "placeMarketOrder": {
      "immediate": true,
      "viaColdActivation": true
    },
    "riskIncreasingTrade": {
      "immediate": true,
      "viaColdActivation": true
    },
    "riskReducingTrade": {
      "immediate": true,
      "viaColdActivation": true
    },
    "withdrawCollateral": {
      "immediate": true,
      "viaColdActivation": true
    }
  },
  "collateralBalance": "<string>",
  "discountedUnrealizedPnl": "<string>",
  "effectiveCollateral": "<string>",
  "effectiveCollateralForWithdrawals": "<string>",
  "flags": 1,
  "initialMargin": "<string>",
  "initialMarginForWithdrawals": "<string>",
  "isInActiveTraders": true,
  "lastDepositSlot": 1,
  "limitOrders": {},
  "maintenanceMargin": "<string>",
  "makerFeeOverrideMultiplier": 123,
  "maxPositions": 1,
  "numMarketsWithSplines": 1,
  "portfolioValue": "<string>",
  "positions": [
    {
      "accumulatedFunding": "<string>",
      "backstopMargin": "<string>",
      "discountedUnrealizedPnl": "<string>",
      "entryPrice": "<string>",
      "initialMargin": "<string>",
      "limitOrderMargin": "<string>",
      "liquidationPrice": "<string>",
      "maintenanceMargin": "<string>",
      "positionInitialMargin": "<string>",
      "positionSize": "<string>",
      "positionValue": "<string>",
      "symbol": "<string>",
      "unrealizedPnl": "<string>",
      "unsettledFunding": "<string>",
      "virtualQuotePosition": "<string>",
      "stopLossPrice": "<string>",
      "takeProfitPrice": "<string>"
    }
  ],
  "slot": 1,
  "slotIndex": 1,
  "takerFeeOverrideMultiplier": 123,
  "traderKey": "<string>",
  "traderPdaIndex": 1,
  "traderSubaccountIndex": 1,
  "unrealizedPnl": "<string>",
  "unsettledFundingOwed": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

pubkey
string
required

Base58 encoded trader account pubkey

Response

Phoenix Eternal trader

Trader view with all trading information

accumulatedFunding
string
required

Accumulated funding amount.

authority
string
required

Trader authority public key.

cancelMargin
string
required

Margin threshold used for cancellation checks.

capabilities
object
required

Derived capability matrix.

collateralBalance
string
required

Collateral balance.

discountedUnrealizedPnl
string
required

Discounted unrealized PnL used in risk calculations.

effectiveCollateral
string
required

Effective collateral used for risk checks.

effectiveCollateralForWithdrawals
string
required

Effective collateral used for withdrawal checks.

flags
integer<int32>
required

Raw trader capability flags.

Required range: x >= 0
initialMargin
string
required

Required initial margin.

initialMarginForWithdrawals
string
required

Initial margin used for withdrawal checks.

isInActiveTraders
boolean
required

Whether trader is currently in the active-trader buffer.

lastDepositSlot
integer<int64>
required

Last collateral deposit slot.

Required range: x >= 0
limitOrders
object
required

Open limit orders grouped by symbol.

maintenanceMargin
string
required

Required maintenance margin.

makerFeeOverrideMultiplier
number<double>
required

Maker fee multiplier (1.0 = default, <1.0 = discount, >1.0 = premium).

maxPositions
integer<int64>
required

Maximum number of positions allowed.

Required range: x >= 0
numMarketsWithSplines
integer<int32>
required

Number of markets where this trader has registered splines

Required range: x >= 0
portfolioValue
string
required

Current portfolio value.

positions
object[]
required

Open positions.

riskState
enum<string>
required

Current risk state.

Available options:
healthy,
unhealthy,
underwater,
zeroCollateralNoPositions
riskTier
enum<string>
required

Current risk tier.

Available options:
safe,
atRisk,
cancellable,
liquidatable,
backstopLiquidatable,
highRisk
slot
integer<int64>
required

Solana slot of the state snapshot used to build this trader view.

Required range: x >= 0
slotIndex
integer<int32>
required

Intra-slot sequence index of the state snapshot used to build this trader view.

Required range: x >= 0
state
enum<string>
required

Derived high-level trader state.

Available options:
uninitialized,
cold,
active,
reduceOnly,
frozen
takerFeeOverrideMultiplier
number<double>
required

Taker fee multiplier (1.0 = default, <1.0 = discount, >1.0 = premium).

traderKey
string
required

Trader PDA public key.

traderPdaIndex
integer<int32>
required

Trader PDA index under the authority.

Required range: x >= 0
traderSubaccountIndex
integer<int32>
required

Trader subaccount index.

Required range: x >= 0
unrealizedPnl
string
required

Total unrealized PnL.

unsettledFundingOwed
string
required

Unsettled funding amount owed to the trader.

  • Positive value = funding you will receive when settled (increases collateral)
  • Negative value = funding you owe when settled (decreases collateral)