SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.batchPnlV2TokenWalletPositions('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', ['FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF']);curl --request POST \
--url https://data.solanatracker.io/v2/pnl/tokens/{token}/positions/batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"wallets": [
"CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"
]
}
'import requests
url = "https://data.solanatracker.io/v2/pnl/tokens/{token}/positions/batch"
payload = { "wallets": ["CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o", "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"] }
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({
wallets: [
'CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o',
'vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg'
]
})
};
fetch('https://data.solanatracker.io/v2/pnl/tokens/{token}/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://data.solanatracker.io/v2/pnl/tokens/{token}/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([
'wallets' => [
'CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o',
'vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg'
]
]),
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://data.solanatracker.io/v2/pnl/tokens/{token}/positions/batch"
payload := strings.NewReader("{\n \"wallets\": [\n \"CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o\",\n \"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg\"\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://data.solanatracker.io/v2/pnl/tokens/{token}/positions/batch")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n \"CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o\",\n \"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/pnl/tokens/{token}/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 \"wallets\": [\n \"CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o\",\n \"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"token": "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump",
"pnlMode": "strict",
"count": 1,
"positions": [
{
"wallet": "CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"identity": {
"name": "Cented",
"twitter": "@Cented7",
"avatar": "https://kol-avatar.solanatracker.io/CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"platforms": [
"axiom",
"bloom"
],
"type": "developer",
"tags": [
"kol",
"developer",
"axiom",
"bloom"
],
"developer": {
"token": "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump",
"via": [
"token_creator"
]
}
},
"token": "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump",
"pnl": {
"token": {
"realized": 88872.66,
"realizedRaw": 88872.66,
"unrealized": 0,
"total": 88872.66
},
"wallet": {
"realized": 10705447.32,
"unrealized": 1395.74,
"total": 10706843.06,
"invested": 49779099.94,
"proceeds": 60484547.26,
"totalTrades": 334803,
"tokensTraded": 78676
}
},
"invested": 3071.27,
"proceeds": 91943.94,
"roi": 2893.67,
"current": {
"balance": 0,
"costBasis": 0,
"value": 0,
"price": 0.001572798005924808,
"avgCost": 0
},
"volume": {
"tokensBought": 46026806.173715,
"tokensSold": 46026806.173715,
"buyUsd": 3071.27,
"sellUsd": 91943.94
},
"averages": {
"buy": 341.25,
"sell": 1242.49
},
"counts": {
"buys": 9,
"sells": 74,
"total": 83
},
"timing": {
"firstBuy": 1746044721229,
"lastBuy": 1772031549416,
"firstSell": 1746044751527,
"lastSell": 1772032040873,
"firstTrade": 1746044721229,
"lastTrade": 1772032040873,
"holdTimeSecs": 25987320
},
"meta": {
"symbol": "gork",
"name": "New XAI gork",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fipfs-forward.solanatracker.io%2Fipfs%2FQmXkHvTBRFMyY5ozYHXcF7JHqqLBTorca3dXAdF3ooD5e3",
"decimals": 6,
"price": 0.001572798005924808,
"snapshotPrice": 0.001666646257827002,
"marketCap": 1572419.01,
"liquidity": 381495.96,
"primaryMarket": "pumpfun-amm"
}
}
],
"notFound": [
"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"
]
}{
"error": "<string>"
}{
"error": "<string>"
}Token
Get Token Batch Positions
Returns positions for multiple wallets on one token mint in a single request. Wallets with no matching position are returned in notFound. Max 200 wallets.
POST
/
v2
/
pnl
/
tokens
/
{token}
/
positions
/
batch
SDK
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.batchPnlV2TokenWalletPositions('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', ['FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF']);curl --request POST \
--url https://data.solanatracker.io/v2/pnl/tokens/{token}/positions/batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"wallets": [
"CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"
]
}
'import requests
url = "https://data.solanatracker.io/v2/pnl/tokens/{token}/positions/batch"
payload = { "wallets": ["CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o", "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"] }
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({
wallets: [
'CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o',
'vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg'
]
})
};
fetch('https://data.solanatracker.io/v2/pnl/tokens/{token}/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://data.solanatracker.io/v2/pnl/tokens/{token}/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([
'wallets' => [
'CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o',
'vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg'
]
]),
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://data.solanatracker.io/v2/pnl/tokens/{token}/positions/batch"
payload := strings.NewReader("{\n \"wallets\": [\n \"CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o\",\n \"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg\"\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://data.solanatracker.io/v2/pnl/tokens/{token}/positions/batch")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n \"CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o\",\n \"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/pnl/tokens/{token}/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 \"wallets\": [\n \"CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o\",\n \"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"token": "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump",
"pnlMode": "strict",
"count": 1,
"positions": [
{
"wallet": "CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"identity": {
"name": "Cented",
"twitter": "@Cented7",
"avatar": "https://kol-avatar.solanatracker.io/CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"platforms": [
"axiom",
"bloom"
],
"type": "developer",
"tags": [
"kol",
"developer",
"axiom",
"bloom"
],
"developer": {
"token": "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump",
"via": [
"token_creator"
]
}
},
"token": "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump",
"pnl": {
"token": {
"realized": 88872.66,
"realizedRaw": 88872.66,
"unrealized": 0,
"total": 88872.66
},
"wallet": {
"realized": 10705447.32,
"unrealized": 1395.74,
"total": 10706843.06,
"invested": 49779099.94,
"proceeds": 60484547.26,
"totalTrades": 334803,
"tokensTraded": 78676
}
},
"invested": 3071.27,
"proceeds": 91943.94,
"roi": 2893.67,
"current": {
"balance": 0,
"costBasis": 0,
"value": 0,
"price": 0.001572798005924808,
"avgCost": 0
},
"volume": {
"tokensBought": 46026806.173715,
"tokensSold": 46026806.173715,
"buyUsd": 3071.27,
"sellUsd": 91943.94
},
"averages": {
"buy": 341.25,
"sell": 1242.49
},
"counts": {
"buys": 9,
"sells": 74,
"total": 83
},
"timing": {
"firstBuy": 1746044721229,
"lastBuy": 1772031549416,
"firstSell": 1746044751527,
"lastSell": 1772032040873,
"firstTrade": 1746044721229,
"lastTrade": 1772032040873,
"holdTimeSecs": 25987320
},
"meta": {
"symbol": "gork",
"name": "New XAI gork",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fipfs-forward.solanatracker.io%2Fipfs%2FQmXkHvTBRFMyY5ozYHXcF7JHqqLBTorca3dXAdF3ooD5e3",
"decimals": 6,
"price": 0.001572798005924808,
"snapshotPrice": 0.001666646257827002,
"marketCap": 1572419.01,
"liquidity": 381495.96,
"primaryMarket": "pumpfun-amm"
}
}
],
"notFound": [
"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"
]
}{
"error": "<string>"
}{
"error": "<string>"
}SDK Example
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.batchPnlV2TokenWalletPositions('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', ['FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF']);
Authorizations
API Key for authentication
Path Parameters
Solana token mint address (base58, 32-44 characters).
Pattern:
^[1-9A-HJ-NP-Za-km-z]{32,44}$Query Parameters
How to treat positions flagged by the invalid PnL heuristic. strict zeros them out, adjusted caps them to a cost-basis-aware value, and raw leaves realized PnL untouched. Aliases pnl_mode and mode are also accepted by the API.
Available options:
strict, adjusted, raw Body
application/json
Wallet addresses to look up. Max 200.
Maximum array length:
200Example:
[
"CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"
]Response
Positions found. Wallets that never traded this token appear in notFound.
Was this page helpful?
⌘I