Skip to main content
The solana.assets.pnl table holds transaction-level PNL records.

Table Details

PNL calculation and Methodology

See here for details.

Key Fields

The PNL model provides several important fields for analysis:
  • average_cost: The current weighted average cost per token unit, calculated as cumulative_costs / cumulative_quantities
  • cumulative_costs: The total USD cost basis remaining after accounting for sales (reduces proportionally when tokens are sold)
  • cumulative_quantities: The remaining token quantity after accounting for sales
  • realized_pnl: The cumulative realized profit/loss from all sales transactions for this token
  • unrealized_pnl: The unrealized profit/loss based on the token price at the time of the transaction
  • unrealized_pnl_latest: The current unrealized profit/loss using the latest available token price
This query shows how to get daily PNL snapshots for a wallet
This query shows how to get aggregated PNL across multiple address and/or tokens for portfolio-level analysis.

Table Columns