Skip to main content
GET
/
pnl
/
{wallet}
/
{token}
SDK
import { Client } from '@solana-tracker/data-api';

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

const data = await client.getTokenPnL('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
{
  "holding": 34587.83040999995,
  "held": 569619.4014500001,
  "sold": 569619.4014500001,
  "sold_usd": 8.848779535217,
  "realized": 4.101715619389,
  "unrealized": -0.696452596669,
  "total": 3.40526302272,
  "total_sold": 8.848779535217,
  "total_invested": 5.919909387386,
  "average_buy_amount": 0.227688822592,
  "current_value": 0.476392874873,
  "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.getTokenPnL('FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF', '6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

wallet
string
required
token
string
required

Response

200 - application/json

Successful response

holding
number
held
number
sold
number
sold_usd
number
realized
number
unrealized
number
total
number
total_sold
number
total_invested
number
average_buy_amount
number
current_value
number
cost_basis
number
first_buy_time
integer
last_buy_time
integer
last_sell_time
integer
last_trade_time
integer
buy_transactions
integer
sell_transactions
integer
total_transactions
integer