Skip to main content
GET
/
wallets
/
{w}
/
pnl
/
basic
FIFO realized and unrealized PnL
curl --request GET \
  --url https://api.dexploit.dev/wallets/{w}/pnl/basic \
  --header 'X-API-Key: <api-key>'
{
  "wallet": "<string>",
  "window": "<string>",
  "realized_sol": 123,
  "unrealized_sol": 123,
  "total_volume_sol": 123,
  "win_rate": 123,
  "sell_count": 123,
  "warning": "<string>",
  "realized_usd": 123,
  "unrealized_usd": 123,
  "oracle": {}
}

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

Pyth SOL/USD oracle snapshot used for USD conversion.