What it does
- Per-token buys, sells, SOL spent and received, realized profit, ROI, and what is still held.
- Open positions are valued at the current price, shown separately from cash profit so paper gains never look like real ones.
- Win rate over tokens that were both bought and sold in the window.
- Honest about the window: SOL from selling tokens bought before the window is shown as unmatched, not as profit.
Quick start
You need Node.js 22 or newer. Nothing else: no install step, no dependencies, no API keys.
npx -y github:blixtrade/solana-pnl-tracker <wallet>
Example output
Real output from a live run.
Wallet PnL BAqdbpSEci3MjiPqB7kdqKt5sKgFsE79MBvSDsXbexx3
60 transactions, 18 Nov, 16:26 to 18 Nov, 17:48 ยท 60 token trades in 2 tokens
Realized (cash) +1.546 SOL ($112)
Open positions cost 1.178 SOL, worth 1.257 SOL now (+0.079 SOL on paper)
Win rate 100% (1 of 1 tokens sold at a profit)
Bought / sold 74.069 SOL in, 101.089 SOL out
Network fees 0.0175 SOL
Unmatched sales 26.652 SOL came from tokens bought before this window or received by transfer. Not counted as profit.
Token Buys Sells Spent Received Realized ROI Open cost Open now Mint
DCTY 31 23 74.069 74.438 +1.546 +2% 1.178 1.257 9hjBLBrc7WZW2H8UQvBAvG5WiTZotXUv2Bdcn4f4pump
mihao 0 3 0.000 26.652 +0.000 - - - 4CxjZyMNoF1p6eXHXHv1TWpS2X47CuUmLwtGe18spump
All amounts in SOL. Only the 60 most recent transactions are counted; stablecoin trades are converted at the current SOL price.
How it works
- Uses the same trade parser as solana-wallet-tracker, then average-cost accounting per token.
- Only the sold share of what was bought inside the window is matched against its cost.
- Stablecoin trades are converted to SOL at the current SOL price.
Limits
- It reads the most recent
--txstransactions (default 100, up to 1,000). Older history is not counted. - Token-for-token swaps have no SOL price and are left out (the count is shown).
- On the free public RPC, 100 transactions take about two minutes. Set
SOLANA_RPC_URLfor speed.
Questions
How is profit calculated?
With average-cost accounting: each sale realizes profit only on the part of the position the wallet actually bought, and sales of tokens it never bought are tracked separately instead of counted as profit.
Does it include open positions?
Yes. Open positions are valued at current prices, next to the realized result and win rate.
Is it accurate for every wallet?
It reads a wallet's recent transactions, 1,000 at most, so very old trades are not included.
Contribute
It is a small, dependency-free codebase and the tests run offline. Pick a good first issue: each one names the exact files to change. Pull requests are reviewed the same day.
Want it live, with AI on every coin?
Solana PnL Tracker is the free, simple version. BLIX runs it live in the browser with AI ratings on every pump.fun launch, wallet and X tracking, and one-click trading at 0% fees.
More free tools
Solana Bubble Map
Who holds a token, and which top holders are secretly the same person.
Solana Wallet Tracker
Follow any wallets and see every buy and sell they make.
Solana Rug Checker
Authorities, Token-2022 traps, holders and liquidity, scored 0-100.
pump.fun Tracker
Every new pump.fun launch, live, the second it is created.
Solana Whale Tracker
Large trades on any token, net whale flow, top buyers and dumpers.
Solana Memecoin Screener
Trending, new and boosted tokens filtered by liquidity, mcap and volume.
Memecoin Alert Bot
New launches and graduations, filtered, in Telegram and Discord.
Memecoin Paper Trading
Trade any token with fake SOL at real Jupiter prices.
pump.fun MCP Server
Six read-only memecoin research tools for AI assistants.