Skip to main content
POST
/
v2
/
pnl
/
positions
/
batch
Batch positions by (wallet, mint) pairs
curl --request POST \
  --url https://api.dexploit.dev/v2/pnl/positions/batch \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "pairs": [
    {
      "wallet": "<string>",
      "mint": "<string>"
    }
  ]
}
'
{
  "pnl_mode": "<string>",
  "count": 123,
  "positions": [
    {
      "mint": "<string>",
      "balance_atomic": 123,
      "avg_cost_per_token": 123,
      "cost_basis_sol": 123,
      "realized_sol": 123,
      "unrealized_sol": 123,
      "current_value_sol": 123,
      "total_buys_sol": 123,
      "total_sells_sol": 123,
      "total_buy_count": 123,
      "total_sell_count": 123,
      "largest_buy_sol": 123,
      "largest_sell_sol": 123,
      "fastest_flip_seconds": 123,
      "longest_hold_seconds": 123,
      "first_trade_ts": 123,
      "last_trade_ts": 123,
      "is_arbitrageur": true,
      "tags": [
        "<string>"
      ],
      "realized_usd": 123,
      "unrealized_usd": 123,
      "current_value_usd": 123,
      "cost_basis_usd": 123,
      "realized_breakdown": {
        "raw": 123,
        "strict": 123,
        "adjusted": 123
      }
    }
  ]
}

Authorizations

X-API-Key
string
header
required

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

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

Body

application/json
pairs
object[]
required
Required array length: 1 - 200 elements

Response

Batch positions

pnl_mode
string
count
integer

Equals input pairs length.

positions
(object | null)[]

Aligned to input order; null where no position exists.

A single (wallet, mint) cost-basis position. All *_sol fields are already SOL (lamports/1e9). avg_cost_per_token and any spot price are lamports per atomic token unit. first_trade_ts/last_trade_ts are epoch milliseconds.