import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getPnlV2WalletPositions('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', { limit: 50 });curl --request GET \
--url https://data.solanatracker.io/v2/pnl/wallets/{wallet}/positions \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/pnl/wallets/{wallet}/positions"
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}/positions', 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}/positions",
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}/positions"
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}/positions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/pnl/wallets/{wallet}/positions")
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"
]
},
"positions": [
{
"token": "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump",
"pnl": {
"realized": 88872.66,
"unrealized": 0,
"total": 88872.66
},
"invested": 3071.27,
"proceeds": 91943.94,
"roi": 2893.67,
"current": {
"balance": 0,
"costBasis": 0,
"value": 0,
"price": 0.001490308105474092,
"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.001490308105474092,
"snapshotPrice": 0.001666646257827002,
"marketCap": 1489948.99,
"liquidity": 371378.83,
"primaryMarket": "pumpfun-amm"
},
"portfolioPercent": 0
},
{
"token": "84cAEWqiDsV5xXh6CB69Hi3HcnumBbdjH4THfyorpump",
"pnl": {
"realized": 50791.19,
"unrealized": 0,
"total": 50791.19
},
"invested": 2621.72,
"proceeds": 53412.92,
"roi": 1937.32,
"current": {
"balance": 0,
"costBasis": 0,
"value": 0,
"price": 0.000016173713662274,
"avgCost": 0
},
"volume": {
"tokensBought": 96296057.47450998,
"tokensSold": 96296057.47451006,
"buyUsd": 2621.72,
"sellUsd": 53412.92
},
"averages": {
"buy": 70.86,
"sell": 346.84
},
"counts": {
"buys": 37,
"sells": 154,
"total": 191
},
"timing": {
"firstBuy": 1774277622281,
"lastBuy": 1774294723039,
"firstSell": 1774277870173,
"lastSell": 1774296331666,
"firstTrade": 1774277622281,
"lastTrade": 1774296331666,
"holdTimeSecs": 18709
},
"meta": {
"symbol": "7",
"name": "The 7 Wanderers",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fedge.uxento.io%2Fimage%2FBxu1Dr8rLNBDyEutHRapKLdquDLeZkn8zkiUn9Avpump",
"decimals": 6,
"price": 0.000016173713662274,
"snapshotPrice": 0.000022584238960459607,
"marketCap": 16168.06,
"liquidity": 14118.7,
"primaryMarket": "pumpfun-amm"
},
"portfolioPercent": 0
}
],
"stats": {
"total": 78195,
"filtered": 78195,
"holding": 67,
"sold": 77978,
"profitable": 47817,
"losing": 30175
},
"pagination": {
"hasMore": true,
"nextCursor": "eyJzb3J0VmFsdWUiOjUwNzkxLjE5Mzc4MjkwNzc5NCwidGllQnJlYWtlciI6Ijg0Y0FFV3FpRHNWNXhYaDZDQjY5SGkzSGNudW1CYmRqSDRUSGZ5b3JwdW1wIn0=",
"count": 2,
"total": 78195,
"pnlMode": "strict"
}
}{
"error": "<string>"
}{
"error": "<string>"
}Get Wallet Positions
Returns paginated token positions for a wallet. Each list item exposes the same trade-activity fields as /v2/pnl/wallets/:wallet/tokens/:token (volume, counts, timing, and related PnL fields). Supports sorting plus filters for holding state, PnL, ROI, invested capital, market, liquidity, market cap, and token list.
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: 'YOUR_API_KEY' });
const data = await client.getPnlV2WalletPositions('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', { limit: 50 });curl --request GET \
--url https://data.solanatracker.io/v2/pnl/wallets/{wallet}/positions \
--header 'x-api-key: <api-key>'import requests
url = "https://data.solanatracker.io/v2/pnl/wallets/{wallet}/positions"
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}/positions', 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}/positions",
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}/positions"
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}/positions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.solanatracker.io/v2/pnl/wallets/{wallet}/positions")
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"
]
},
"positions": [
{
"token": "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump",
"pnl": {
"realized": 88872.66,
"unrealized": 0,
"total": 88872.66
},
"invested": 3071.27,
"proceeds": 91943.94,
"roi": 2893.67,
"current": {
"balance": 0,
"costBasis": 0,
"value": 0,
"price": 0.001490308105474092,
"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.001490308105474092,
"snapshotPrice": 0.001666646257827002,
"marketCap": 1489948.99,
"liquidity": 371378.83,
"primaryMarket": "pumpfun-amm"
},
"portfolioPercent": 0
},
{
"token": "84cAEWqiDsV5xXh6CB69Hi3HcnumBbdjH4THfyorpump",
"pnl": {
"realized": 50791.19,
"unrealized": 0,
"total": 50791.19
},
"invested": 2621.72,
"proceeds": 53412.92,
"roi": 1937.32,
"current": {
"balance": 0,
"costBasis": 0,
"value": 0,
"price": 0.000016173713662274,
"avgCost": 0
},
"volume": {
"tokensBought": 96296057.47450998,
"tokensSold": 96296057.47451006,
"buyUsd": 2621.72,
"sellUsd": 53412.92
},
"averages": {
"buy": 70.86,
"sell": 346.84
},
"counts": {
"buys": 37,
"sells": 154,
"total": 191
},
"timing": {
"firstBuy": 1774277622281,
"lastBuy": 1774294723039,
"firstSell": 1774277870173,
"lastSell": 1774296331666,
"firstTrade": 1774277622281,
"lastTrade": 1774296331666,
"holdTimeSecs": 18709
},
"meta": {
"symbol": "7",
"name": "The 7 Wanderers",
"image": "https://image.solanatracker.io/proxy?url=https%3A%2F%2Fedge.uxento.io%2Fimage%2FBxu1Dr8rLNBDyEutHRapKLdquDLeZkn8zkiUn9Avpump",
"decimals": 6,
"price": 0.000016173713662274,
"snapshotPrice": 0.000022584238960459607,
"marketCap": 16168.06,
"liquidity": 14118.7,
"primaryMarket": "pumpfun-amm"
},
"portfolioPercent": 0
}
],
"stats": {
"total": 78195,
"filtered": 78195,
"holding": 67,
"sold": 77978,
"profitable": 47817,
"losing": 30175
},
"pagination": {
"hasMore": true,
"nextCursor": "eyJzb3J0VmFsdWUiOjUwNzkxLjE5Mzc4MjkwNzc5NCwidGllQnJlYWtlciI6Ijg0Y0FFV3FpRHNWNXhYaDZDQjY5SGkzSGNudW1CYmRqSDRUSGZ5b3JwdW1wIn0=",
"count": 2,
"total": 78195,
"pnlMode": "strict"
}
}{
"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.getPnlV2WalletPositions('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', { limit: 50 });
授权
用于鉴权的 API Key
路径参数
Solana 钱包地址(Base58,约 32–44 字符)
^[1-9A-HJ-NP-Za-km-z]{32,44}$查询参数
对被无效 PnL 启发式标记的仓位:strict 归零;adjusted 按成本基础封顶;raw 不改动已实现盈亏。API 也接受别名 pnl_mode 与 mode。
strict, adjusted, raw 持仓排序字段
last_trade, pnl, realized, unrealized, roi, value, holding, invested, cost, proceeds, buys, sells 排序方向
asc, desc 分页游标,取自上一页响应的 pagination.nextCursor
每页条数(1–200)
x <= 200按持仓状态筛选
all, holding, active, sold, profitable, losing 仅显示该时间段内有活动的仓位
1d, 7d, 14d, 30d, 90d, all 筛选用的代币 mint 地址列表(逗号分隔),最多 100 个
仓位当前价值下限(美元)
仓位当前价值上限(美元)
总盈亏下限(美元)
总盈亏上限(美元)
总投入下限(美元)
总投入上限(美元)
最低 ROI(%)
最高 ROI(%)
最低成交笔数
最低代币余额(原生单位)
按主要市场/DEX 筛选(如 Raydium、Orca)
代币最低流动性(美元)
代币最低市值(美元)
响应
Successful response.
Unified wallet identity. Only fields with known values are returned; a wallet can carry multiple tags at once.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Position counts across the entire wallet (not just this page).
Show child attributes
Show child attributes
Cursor-based pagination metadata.
Show child attributes
Show child attributes
此页面对您有帮助吗?