Fetch Wallet PNLs

Get realized and unrealized PnL, win rate, trade volume, and per-token performance for any Solana wallet. All metrics are derived from vetted markets only—no junk pools or wash trading—so your copy-trading dashboards and portfolio analytics stay accurate.

Why This Endpoint?

Wallet PnL answers: "How is this wallet performing?"

The Vybe PnL endpoint provides:

  • Realized and unrealized PnL in USD over 1d, 7d, 30d, or full history
  • Win rate and trade counts (winning vs losing trades)
  • Per-token breakdown: buys/sells, volume, PnL per token
  • Best and worst performing tokens for the period
  • Optional PnL trend (e.g. 7-day series) for charts

Use it for copy-trading leaderboards, portfolio reviews, trader leaderboards, and any app that needs trusted wallet performance metrics.


Endpoint

GET /v4/wallets/{accountAddress}/pnl

Replaces: GET /account/pnl/{ownerAddress}


Parameters

ParameterTypeDescription
accountAddressstringWallet public key (path, required)
resolutionstringTime window: 1d, 7d, 30d, or Full. Default 1d
mintAddressstringFilter results to a single token (optional)
sortByAscstringSort ascending: e.g. realizedPnlUsd, tokenSymbol, tradesVolumeUsd
sortByDescstringSort descending (same fields). Only one of sortByAsc/sortByDesc
limitnumberEntries per page (max 1000). Default 1000
pagenumberPage number (0-indexed)

Example Request

curl "https://api.vybenetwork.com/v4/wallets/7Tar8QZTrRPwoGY5Ke9Vfwf6CmpBfekrNofERxgReza/pnl?resolution=7d&sortByDesc=realizedPnlUsd&limit=10" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "summary": {
    "winRate": 0.62,
    "realizedPnlUsd": "1234.56",
    "unrealizedPnlUsd": "89.12",
    "uniqueTokensTraded": 12,
    "averageTradeUsd": "456.78",
    "tradesCount": 84,
    "winningTradesCount": 52,
    "losingTradesCount": 32,
    "tradesVolumeUsd": "38369.52",
    "bestPerformingToken": { "mintAddress": "...", "symbol": "BONK", "realizedPnlUsd": "890.00" },
    "worstPerformingToken": { "mintAddress": "...", "symbol": "XYZ", "realizedPnlUsd": "-120.00" },
    "pnlTrendSevenDays": []
  },
  "tokenMetrics": [
    {
      "mintAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
      "tokenSymbol": "BONK",
      "buysTransactionCount": 5,
      "buysTokenAmount": "1000000",
      "buysVolumeUsd": "25.50",
      "sellsTransactionCount": 3,
      "sellsTokenAmount": "600000",
      "sellsVolumeUsd": "18.20",
      "realizedPnlUsd": "2.45",
      "unrealizedPnlUsd": "1.10"
    }
  ]
}

Response Fields Explained

Summary

FieldDescription
winRateFraction of trades that were profitable (0–1)
realizedPnlUsdRealized profit/loss in USD for the period
unrealizedPnlUsdUnrealized PnL on current holdings
uniqueTokensTradedNumber of distinct tokens traded
tradesCountTotal number of trades
winningTradesCount / losingTradesCountCounts of profitable vs losing trades
tradesVolumeUsdTotal USD volume of trades
bestPerformingToken / worstPerformingTokenToken with highest/lowest realized PnL
pnlTrendSevenDaysOptional time series for PnL-over-time charts

tokenMetrics (per token)

FieldDescription
mintAddressToken mint public key
tokenSymbolToken ticker
buysTransactionCount / sellsTransactionCountBuy/sell trade counts
buysVolumeUsd / sellsVolumeUsdBuy/sell volume in USD
realizedPnlUsd / unrealizedPnlUsdRealized and unrealized PnL for this token

Common Use Cases

Use CaseImplementation
Copy-trading dashboardShow PnL and win rate for leaderboard wallets
Portfolio reviewAggregate realized/unrealized PnL for a connected wallet
Token-level analysisFilter by mintAddress or sort by realizedPnlUsd
Top traders feedCombine with Top Traders for rankings
Tax / reportingUse resolution=Full and export tokenMetrics

Best Practices

Choose the right resolution

  • 1d – Daily performance, leaderboards
  • 7d – Weekly recap, short-term copy trading
  • 30d – Monthly reports
  • Full – All-time stats, tax or long-term analysis

Filter to one token

When building a “PnL for this token” view, pass mintAddress:

?v4/wallets/{address}/pnl?resolution=30d&mintAddress=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263

Sort for leaderboards

Sort by realized PnL descending to show top performers:

?resolution=7d&sortByDesc=realizedPnlUsd&limit=20

Related Endpoints