Skip to main content
GET
/
v2
/
pnl
/
wallets
/
{wallet}
Wallet cost-basis PnL summary
curl --request GET \
  --url https://api.dexploit.dev/v2/pnl/wallets/{wallet} \
  --header 'X-API-Key: <api-key>'
{
  "wallet": "<string>",
  "pnl_mode": "<string>",
  "realized_sol": 123,
  "unrealized_sol": 123,
  "cost_basis_sol": 123,
  "open_positions": 123,
  "closed_positions": 123,
  "realized_usd": 123,
  "unrealized_usd": 123,
  "oracle": {
    "price": 123,
    "confidence": 123,
    "published_at": 123,
    "source": "<string>"
  },
  "positions": [
    {
      "mint": "<string>",
      "balance_atomic": 123,
      "realized_sol": 123,
      "unrealized_sol": 123,
      "is_arbitrageur": true
    }
  ]
}

Authorizations

X-API-Key
string
header
required

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

Path Parameters

wallet
string
required

Wallet address (base58, 32–44 characters).

Query Parameters

pnl_mode
enum<string>
default:adjusted

PnL accounting mode. strict (FIFO) and adjusted (weighted-avg cost) are realized-PnL figures; raw is net cash-flow (Σ sells − Σ buys), not realized PnL. Unknown values fall back to adjusted.

Available options:
raw,
strict,
adjusted

Response

PnL summary

Cost-basis PnL summary for a wallet (Phase 8 engine). All *_sol fields are SOL. unrealized_sol is read-time spot Σ(price−avg_cost)*balance; null-priced mints contribute 0. Wallets with no positions return zeros and an empty positions array.

wallet
string
pnl_mode
string
realized_sol
number
unrealized_sol
number

Read-time spot unrealized PnL (null-priced mints contribute 0).

cost_basis_sol
number
open_positions
integer

Count of positions with balance > 0 and not a quote mint.

closed_positions
integer

Count of positions with balance == 0.

realized_usd
number | null
unrealized_usd
number | null
oracle
object

Pyth SOL/USD oracle snapshot used for USD conversion. null when the oracle is unavailable.

positions
object[]

Compact per-position rows.