Skip to main content
GET
Wallet - PnL (Per Token)

Per-token wallet PnL.

  • Maximum number of tokens per request is 50.
  • Notes on data: trade data per protocol aren’t backfilled and might affect the calculation of PnL.
  • pnl_method supports netcash and wac so you can align the response with your accounting method.
  • meta:
  • address: wallet address.
  • currency: the currency in which PnL is calculated, such as USD.
  • tokens[<token_address>] includes counts, quantity, cashflow, PnL, and pricing blocks for each token.
  • Insights in the response:
  • counts:
  • total_buy: Total number of buy trades.
  • total_sell: Total number of sell trades.
  • total_trade: Combined total of buys and sells.
  • total_win: Total trades have profit. Only account for fully realized tokens.
  • total_loss: Total trades in loss. Only account for fully realized tokens.
  • win_rate: Winning rate. Only account for fully realized tokens.
  • cashflow_usd:
  • total_invested: USD spent on all buys.
  • total_sold: USD received from sales.
  • current_value: Current position value in USD.
  • pnl:
  • realized_profit_usd: Profit/loss from completed trades.
  • realized_profit_percent: % gain/loss relative to sold cost basis.
  • unrealized_usd: Profit/loss of current holdings (mark-to-market).
  • total_usd: Sum of realized + unrealized profit in USD.
  • avg_profit_per_trade_usd: Average profit/loss per trade.
  • Quantity fields are already normalized by token decimals.
  • Batch CU is calculated as ceil(10 * wallet_count^0.8).
  • Break a wallet’s PnL down token by token.
  • Identify which assets drove gains, losses, and current unrealized exposure.
  • Power wallet analytics views that need realized and unrealized PnL per holding.
  • Set the supported PnL chain in x-chain.
  • Pass the wallet address in wallet.
  • Pass up to 50 token addresses in token_addresses.
  • Set pnl_method explicitly when the output needs to match another reporting workflow or PnL view.
  • Read pricing, cashflow_usd, and pnl together to understand both execution and current exposure.
  • Use this endpoint when you already know which token set you want to evaluate.
  • Compare current_value with total_invested and total_sold to separate realized outcomes from open positions.
  • Treat this endpoint as deprecated over time and prefer newer summary/detail flows where they better fit the product.

Authorizations

X-API-KEY
string
header
required

API key for authentication

Headers

x-chain
enum<string>
default:solana

The chain support PNL data.

Available options:
solana,
ethereum,
arbitrum,
avalanche,
bsc,
optimism,
polygon,
base,
zksync,
monad,
hyperevm,
mantle,
megaeth,
robinhood

Query Parameters

wallet
string
required

The wallet of the account.

token_addresses
string
required

List of token address.

pnl_method
enum<string>
default:net_cash

PNL calculation method. wac (Weighted Average Cost): calculates PNL for each sell against the average cost of the position held at the time of the sell. Buys only re-average the cost of the remaining inventory, and previously realized sell PNL is not affected by later trades. netcash (Net Cash): calculates PNL across the full trade history using the spread between cumulative average sell price and cumulative average buy price. The buy average includes all buys and is not reduced by sells, so later buys can change the reported PNL.

Available options:
wac,
net_cash

Response

JSON object containing a wallet’s PnL per token

success
boolean
required

Whether the request succeeded.

data
object
required