Skip to main content
GET
FIFO realized and unrealized PnL

Authorizations

X-API-Key
string
header
required

Preferred for swaps-api endpoints (/swaps/*, /stats/*, /trending, /pool-events).

Path Parameters

w
string
required

Wallet address (base58, 32–44 characters).

Query Parameters

window
enum<string>
default:all

Time window to compute PnL over.

Available options:
30d,
90d,
1y,
all
dex
integer

Filter to a single DEX by integer ID. See DexId for the mapping.

Response

FIFO PnL summary

FIFO realized + unrealized PnL for a wallet. Includes a warning pointing to Phase 8 for full multi-lot PnL.

wallet
string
required
window
string
required

The time window used (all, 30d, 90d, 1y).

realized_sol
number
required

Total FIFO realized PnL in SOL across all closed positions.

unrealized_sol
number
required

Unrealized PnL in SOL on the remaining open lots the wallet is confirmed to still HOLD on chain, summed over those with a live spot price. The FIFO replay set is reconciled against on-chain holdings first, so bags exited outside the indexed venues do not contribute; coverage_position_set says whether that reconciliation succeeded, and unpriced_* say what the price window excluded.

total_volume_sol
number
required

Total SOL volume traded.

win_rate
number
required

Fraction of sells that were profitable (0.0–1.0).

sell_count
integer
required

Number of sell transactions included.

warning
string
required

Always present. Explains that this is basic FIFO PnL and that full cost-basis ships in Phase 8.

realized_usd
number | null

Realized PnL in USD via Dexploit's SOL/USD rate. null when the rate is unavailable.

unrealized_usd
number | null

Unrealized PnL in USD via Dexploit's SOL/USD rate. null when the rate is unavailable.

oracle
object | null

SOL/USD rate snapshot used for USD conversion.

unrealized_price_basis
enum<string>

How much of the open book unrealized_sol covers. spot = every counted position had a live spot price; partial = some were excluded; none = nothing was priced, so unrealized_sol is 0 for lack of data, NOT because the wallet is flat. Distinct from unrealized_basis, which answers whether the whole position LIST was looked at.

Available options:
spot,
partial,
none
priced_position_count
integer

Open positions that had a live spot price and are therefore included in unrealized_sol.

unpriced_position_count
integer

Open positions with NO live spot price inside spot_price_max_age_secs. They are EXCLUDED from unrealized_sol — not valued at zero and not assumed break-even, both of which would be wrong in a direction the caller cannot detect.

unpriced_cost_basis_sol
number

Total cost basis, in SOL, of the excluded positions — the magnitude of what unrealized_sol does not cover.

unpriced_cost_basis_usd
number | null

unpriced_cost_basis_sol in USD via Dexploit's SOL/USD rate. null when the rate is unavailable.

spot_price_max_age_secs
integer

Maximum age of a trade for it to count as a live spot price (seconds).

coverage_position_set
enum<string>

WHICH set the coverage counts describe. onchain_held = every counted position was confirmed still held on chain. replay_unreconciled = on-chain truth was unavailable, so the counts come from the raw replay/ledger set and include bags the wallet may already have exited; treat them as an UPPER bound on the open book. This route serves only these two values; onchain_held_basis_drift (see PnlV2Summary) is a /v2 value.

Available options:
onchain_held,
replay_unreconciled
unrealized_floor_sol
number | null

Lower bound on the wallet's true unrealized PnL in SOL: unrealized_sol with every unpriced bag valued at zero. Non-null only when coverage_position_set is onchain_held; with replay_unreconciled the priced side can contain phantom gains, so no bound holds and this is null.

unrealized_floor_usd
number | null

unrealized_floor_sol in USD via Dexploit's SOL/USD rate. null when there is no floor or the rate is unavailable.

reconciled
boolean

Whether the open-position set was checked against on-chain holdings. false ⇒ the raw FIFO replay set was served and coverage_position_set is replay_unreconciled.

reconciliation_source
string

What supplied on-chain truth (shyft), or unavailable when the response is not reconciled.