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 remaining open lots.

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 the Pyth oracle. null when oracle unavailable.

unrealized_usd
number | null

Unrealized PnL in USD via the Pyth oracle. null when oracle unavailable.

oracle
object | null

Pyth SOL/USD oracle snapshot used for USD conversion.