跳转到主要内容
GET
/
v2
/
pnl
/
wallets
/
{wallet}
/
tokens
/
{token}
SDK
import { Client } from '@solana-tracker/data-api';

const client = new Client({ apiKey: 'YOUR_API_KEY' });

const data = await client.getPnlV2WalletTokenPosition('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
{
  "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"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt

Use this file to discover all available pages before exploring further.

SDK Example

import { Client } from '@solana-tracker/data-api';

const client = new Client({ apiKey: 'YOUR_API_KEY' });

const data = await client.getPnlV2WalletTokenPosition('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');

授权

x-api-key
string
header
必填

用于鉴权的 API Key

路径参数

wallet
string
必填

Solana 钱包地址(Base58,约 32–44 字符)

Pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
token
string
必填

Solana 代币 mint 地址(Base58,约 32–44 字符)

Pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$

查询参数

pnlMode
enum<string>
默认值:strict

对被无效 PnL 启发式标记的仓位:strict 归零;adjusted 按成本基础封顶;raw 不改动已实现盈亏。API 也接受别名 pnl_modemode

可用选项:
strict,
adjusted,
raw

响应

Successful response.

A single token position for a wallet.

wallet
string
identity
object

Unified wallet identity. Only fields with known values are returned; a wallet can carry multiple tags at once.

pnlMode
enum<string>
可用选项:
strict,
adjusted,
raw
token
string

Token mint address (base58).

pnl
object

Realized, unrealized, and total profit/loss in USD.

invested
number | null

Total cost basis (USD spent buying this token).

proceeds
number | null

Total USD received from sales of this token.

roi
number | null

Return on investment percentage.

current
object
volume
object
averages
object
counts
object
timing
object
meta
object

Basic token metadata and current market data.

portfolioPercent
number | null

This position's value as a percentage of the wallet's total holdings value. Only present on the positions endpoint.