Skip to main content
The wallet portfolio group gives you a complete picture of a single Solana wallet: what it holds right now, how it got there, and what it’s worth. Seven endpoints cover on-chain holdings, trade history, a daily-value chart, realized/unrealized PnL, native SOL balance, and aggregate stats.

Two holdings sources

The wallet group exposes two holdings endpoints with different accuracy/speed trade-offs.

/wallets/{w}/holdings — authoritative, slower

This endpoint reads the wallet’s current on-chain token balances from an external data provider. Because it reads chain state it captures every token the wallet holds — including airdrops, transfers, and tokens bought through platforms that Dexploit doesn’t index. For each token it overlays:
  • Current value — latest-candle price from Dexploit’s OHLCV index, converted to USD via Dexploit’s SOL/USD rate, derived from on-chain SOL/stablecoin swaps.
  • FIFO cost-basis — if Dexploit has swap records for this wallet and mint, it reconstructs the average cost per token using the FIFO engine. Tokens with no swap history (airdrops, off-platform transfers) get cost_basis_sol: null and no_cost_basis: true.
  • Unrealized PnL — current_value_sol − cost_basis_sol, present only when both values are known.
When the on-chain balance lookup is temporarily unavailable the endpoint falls back to the FIFO-derived token list and returns holdings_source: "fifo_fallback" so callers can surface the appropriate caveat. It does not return a 5xx for that. Response is cached 30 seconds per wallet.

/wallets/{w}/holdings/basic — fast, our data only

This endpoint runs the FIFO engine over the wallet’s swap history in Dexploit’s own index, with no external calls. It returns holdings with cost-basis and unrealized PnL but only for tokens the wallet traded through indexed DEXes (pump.fun, pumpswap, Raydium, Meteora, Orca). Airdrops and off-platform positions are invisible here. Use /holdings/basic when you need a quick snapshot and completeness is less important than latency (~30 ms cold; cached 15 seconds per wallet).

Chart freshness

/wallets/{w}/chart returns a daily portfolio-value series, computed when you ask for it. It is deprecated: use /v2/pnl/wallets/{wallet}/chart for a PnL chart with a summary header. When you request the chart:
  1. Closed days are returned as stored. A past day’s value does not change once it has been computed, because the wallet’s swap history for that day can’t change.
  2. Missing days are computed on request. If days are missing between the last stored point and yesterday (because the wallet hasn’t been queried recently), they are computed now: the wallet’s swaps up to the end of each day are replayed through the FIFO engine and the resulting holdings are priced at that day’s close. They are stored, so the next request is faster.
  3. Today is computed, not stored. The current day hasn’t closed. It appears in the response as today with provisional: true, valued at current prices rather than a daily close.
Closed days never go stale. The assembled series is kept for 5 minutes, so today’s point can be that old; for up to 60 seconds after that it is served at once with X-Cache: stale while it refreshes (see Stale responses). USD basis note. value_usd in the series uses the current SOL/USD rate for all points, including historical ones. Dexploit does not keep a daily SOL/USD history. If you need historically accurate USD values, apply your own SOL/USD rate to value_sol, which is computed from actual historical prices.

PnL basic — FIFO realized PnL

/wallets/{w}/pnl/basic runs a FIFO lot-matching engine over the wallet’s swap history: buy lots are pushed in time order; each sell matches against the earliest open lots and realizes proceeds − cost_matched. The result includes realized PnL, unrealized PnL on remaining lots, win rate, and volume. The response always includes a warning field stating that this is basic FIFO realized PnL. FIFO is a good approximation for single-wallet trading activity, but it misses cross-wallet position transfers and is not suitable for tax calculations. For position-level cost basis use GET /v2/pnl/wallets/{wallet}.

Reserved parameters on trade history

/wallets/{w}/trades accepts hide_arb and parse_jupiter query parameters. They are reserved: they are accepted without error but currently have no effect. The response includes a coverage_note saying so.
  • hide_arb — reserved.
  • parse_jupiter — reserved.
from_token and to_token both filter on the swap’s token mint.