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

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

const data = await client.getWalletPnL('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF');
{
  "tokens": {
    "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263": {
      "holding": 34587.83040999995,
      "held": 569619.4014500001,
      "sold": 569619.4014500001,
      "sold_usd": 8.848779535217,
      "realized": 4.101715619389,
      "unrealized": -0.698268859628,
      "total": 3.403446759761,
      "total_sold": 8.848779535217,
      "total_invested": 5.919909387386,
      "average_buy_amount": 0.227688822592,
      "current_value": 0.474576611914,
      "cost_basis": 0.000033909195,
      "first_buy_time": 1750435283197,
      "last_buy_time": 1753194281458,
      "last_sell_time": 1754205433802,
      "last_trade_time": 1754205433802,
      "buy_transactions": 26,
      "sell_transactions": 23,
      "total_transactions": 49
    }
  }
}

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.getWalletPnL('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF');

授权

x-api-key
string
header
必填

用于鉴权的 API Key

路径参数

wallet
string
必填

查询参数

showHistoricPnL
boolean

附加 1 日、7 日、30 日区间的盈亏(测试版)。

holdingCheck
boolean

额外校验钱包内当前持仓估值。

hideDetails
boolean

仅返回汇总,不包含各代币明细。

响应

200 - application/json

Successful response

tokens
object
summary
object