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>"
}
]
}
'import requests
url = "https://api.dexploit.dev/v2/pnl/positions/batch"
payload = { "pairs": [
{
"wallet": "<string>",
"mint": "<string>"
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pairs: [{wallet: '<string>', mint: '<string>'}]})
};
fetch('https://api.dexploit.dev/v2/pnl/positions/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dexploit.dev/v2/pnl/positions/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pairs' => [
[
'wallet' => '<string>',
'mint' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dexploit.dev/v2/pnl/positions/batch"
payload := strings.NewReader("{\n \"pairs\": [\n {\n \"wallet\": \"<string>\",\n \"mint\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dexploit.dev/v2/pnl/positions/batch")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pairs\": [\n {\n \"wallet\": \"<string>\",\n \"mint\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dexploit.dev/v2/pnl/positions/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pairs\": [\n {\n \"wallet\": \"<string>\",\n \"mint\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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
}
}
]
}{
"success": false,
"error": {
"code": "INVALID_PARAM",
"message": "use pair_address; see /api/v1/pairs?token_address=X to discover pools"
}
}{
"success": false,
"error": {
"code": "INVALID_PARAM",
"message": "use pair_address; see /api/v1/pairs?token_address=X to discover pools"
}
}{
"success": false,
"error": {
"code": "INVALID_PARAM",
"message": "use pair_address; see /api/v1/pairs?token_address=X to discover pools"
}
}Batch positions by (wallet, mint) pairs
Fetch many (wallet, mint) positions in one call. De-dups internally but aligns output to the original input order (duplicates echo the same object). realized_breakdown always present. Uncached. 1–200 pairs; empty → 400, >200 → 400.
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>"
}
]
}
'import requests
url = "https://api.dexploit.dev/v2/pnl/positions/batch"
payload = { "pairs": [
{
"wallet": "<string>",
"mint": "<string>"
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pairs: [{wallet: '<string>', mint: '<string>'}]})
};
fetch('https://api.dexploit.dev/v2/pnl/positions/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dexploit.dev/v2/pnl/positions/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pairs' => [
[
'wallet' => '<string>',
'mint' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dexploit.dev/v2/pnl/positions/batch"
payload := strings.NewReader("{\n \"pairs\": [\n {\n \"wallet\": \"<string>\",\n \"mint\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dexploit.dev/v2/pnl/positions/batch")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pairs\": [\n {\n \"wallet\": \"<string>\",\n \"mint\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dexploit.dev/v2/pnl/positions/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pairs\": [\n {\n \"wallet\": \"<string>\",\n \"mint\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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
}
}
]
}{
"success": false,
"error": {
"code": "INVALID_PARAM",
"message": "use pair_address; see /api/v1/pairs?token_address=X to discover pools"
}
}{
"success": false,
"error": {
"code": "INVALID_PARAM",
"message": "use pair_address; see /api/v1/pairs?token_address=X to discover pools"
}
}{
"success": false,
"error": {
"code": "INVALID_PARAM",
"message": "use pair_address; see /api/v1/pairs?token_address=X to discover pools"
}
}Authorizations
Preferred for swaps-api endpoints (/swaps/*, /stats/*, /trending, /pool-events).
Query Parameters
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.
raw, strict, adjusted Body
1 - 200 elementsShow child attributes
Show child attributes
Response
Batch positions
Equals input pairs length.
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.
Show child attributes
Show child attributes

