import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getPnlV2WalletTokenPosition('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
curl --request GET \
--url https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token} \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}', 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/wallets/{wallet}/tokens/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"wallet": "CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"identity": {
"name": "Cented",
"twitter": "@Cented7",
"avatar": "https://kol-avatar.solanatracker.io/CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"platforms": [
"axiom",
"bloom"
],
"type": "kol",
"tags": [
"kol",
"axiom",
"bloom"
]
},
"pnlMode": "strict",
"token": "41kjWDNs9gfJww2FtTUYKk3ZRLRvokSxHNhfXTsapump",
"pnl": {
"realized": 62.77,
"realizedRaw": 62.77,
"unrealized": 0,
"total": 62.77
},
"invested": 305.23,
"proceeds": 368,
"roi": 20.56,
"current": {
"balance": 0,
"costBasis": 0,
"value": 0,
"price": 0.000002870182480858,
"avgCost": 0
},
"volume": {
"tokensBought": 27789808.22406,
"tokensSold": 27789808.22406,
"buyUsd": 305.23,
"sellUsd": 368
},
"averages": {
"buy": 101.74,
"sell": 368
},
"counts": {
"buys": 3,
"sells": 1,
"total": 4
},
"timing": {
"firstBuy": 1779724371752,
"lastBuy": 1779724381730,
"firstSell": 1779724398824,
"lastSell": 1779724398824,
"firstTrade": 1779724371752,
"lastTrade": 1779724398824,
"holdTimeSecs": 27
},
"meta": {
"symbol": "T&J",
"name": "Tom & Jerry",
"price": 0.000002870182480858,
"marketCap": 2870.18,
"liquidity": 5620.34,
"primaryMarket": "pumpfun"
}
}{
"error": "<string>"
}{
"error": "<string>"
}Get Wallet Token Position
Posición completa del par cartera–token, con dirección, identidad resuelta y pnlMode aplicado.
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getPnlV2WalletTokenPosition('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
curl --request GET \
--url https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token} \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}', 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/wallets/{wallet}/tokens/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/pnl/wallets/{wallet}/tokens/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"wallet": "CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"identity": {
"name": "Cented",
"twitter": "@Cented7",
"avatar": "https://kol-avatar.solanatracker.io/CyaE1VxvBrahnPWkqm5VsdCvyS2QmNht2UFrKJHga54o",
"platforms": [
"axiom",
"bloom"
],
"type": "kol",
"tags": [
"kol",
"axiom",
"bloom"
]
},
"pnlMode": "strict",
"token": "41kjWDNs9gfJww2FtTUYKk3ZRLRvokSxHNhfXTsapump",
"pnl": {
"realized": 62.77,
"realizedRaw": 62.77,
"unrealized": 0,
"total": 62.77
},
"invested": 305.23,
"proceeds": 368,
"roi": 20.56,
"current": {
"balance": 0,
"costBasis": 0,
"value": 0,
"price": 0.000002870182480858,
"avgCost": 0
},
"volume": {
"tokensBought": 27789808.22406,
"tokensSold": 27789808.22406,
"buyUsd": 305.23,
"sellUsd": 368
},
"averages": {
"buy": 101.74,
"sell": 368
},
"counts": {
"buys": 3,
"sells": 1,
"total": 4
},
"timing": {
"firstBuy": 1779724371752,
"lastBuy": 1779724381730,
"firstSell": 1779724398824,
"lastSell": 1779724398824,
"firstTrade": 1779724371752,
"lastTrade": 1779724398824,
"holdTimeSecs": 27
},
"meta": {
"symbol": "T&J",
"name": "Tom & Jerry",
"price": 0.000002870182480858,
"marketCap": 2870.18,
"liquidity": 5620.34,
"primaryMarket": "pumpfun"
}
}{
"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.getPnlV2WalletTokenPosition('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
Autorizaciones
Clave API
Parámetros de ruta
Dirección cartera Solana (base58, 32–44 caracteres)
^[1-9A-HJ-NP-Za-km-z]{32,44}$Dirección mint (base58, 32–44 caracteres)
^[1-9A-HJ-NP-Za-km-z]{32,44}$Parámetros de consulta
Marcadas por heurística de PnL inválido: strict pone a cero; adjusted limita según coste; raw no toca PnL realizado. También pnl_mode y mode.
strict, adjusted, raw Respuesta
Successful response.
A single token position for a wallet.
Unified wallet identity. Only fields with known values are returned; a wallet can carry multiple tags at once.
Show child attributes
Show child attributes
strict, adjusted, raw Token mint address (base58).
Realized, unrealized, and total profit/loss in USD.
Show child attributes
Show child attributes
Total cost basis (USD spent buying this token).
Total USD received from sales of this token.
Return on investment percentage.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Basic token metadata and current market data.
Show child attributes
Show child attributes
This position's value as a percentage of the wallet's total holdings value. Only present on the positions endpoint.
¿Esta página le ayudó?