Pnl

Get PnL position for a trading address and token

get

Returns the materialized cost basis position for chart overlay.

  • source: amm | sodax

  • avgCostBasis: USD per display token unit

  • totalQty: remaining display token quantity

  • Returns zeroed fields when no position exists.

Query parameters
sourcestring · enumRequiredPossible values:
tokenIdstringRequired
Responses
chevron-right
200Success

No content

get
/api/pnl/position
200Success

No content

Get PnL balances for a trading address

get

Returns all non-zero positions with live unrealized PnL for the Balances tab.

  • AMM and SODAX positions are returned as separate items (source field).

  • unrealizedPnl = (currentPrice − avgCostBasis) × totalQty (USD)

  • Fully closed positions (totalQty = 0) are excluded.

Responses
chevron-right
200Success

No content

get
/api/pnl/balances
200Success

No content

Last updated