Solana Wallet PnL Profit & Loss

Fetch Solana wallet PnL, realized and unrealized profit, win rate, trade volume, and per-token performance for trading analytics using Vybe’s API.

Most wallet analytics tools start with balances. But balances do not tell the whole story.

A wallet can hold valuable tokens and still be a bad trader. It can have high activity and still lose money. It can show one big winning position while hiding poor performance across the rest of its trades. If you want to understand wallet performance, you need profit and loss, win rate, trade volume, token-level attribution, and a clear time window.

Vybe’s Wallet PnL endpoint is built for that exact workflow.

The underlying endpoint is: GET /v4/wallets/{ownerAddress}/pnl

It returns realized PnL, win rate, trade volume, and position-level details for a Solana wallet. The OpenAPI spec describes the endpoint as returning portfolio metrics and detailed per-token statistics for a wallet.

Try the live demo: https://solana-trader-pnl-api.vybenetwork.com

The companion repo, Solana Trader PnL API, shows how that endpoint becomes a usable wallet performance interface. It focuses on wallet search, wallet PnL, per-token performance, sorting, time windows, and related wallet discovery around realized PnL.

It maps directly to the relevant Vybe pages

Why wallet PnL matters

Wallet PnL turns wallet activity into performance.

Instead of only asking “what does this wallet hold,” the better question is: how well has this wallet traded?

That means looking at:

  • realized PnL

  • unrealized PnL

  • win rate

  • trade volume

  • trade count

  • token-level profit and loss

  • buys and sells by token

  • selected time window

That is what makes a wallet PnL API useful. It is not just a portfolio snapshot. It is a way to understand whether a wallet is actually performing.

The project reinforces that product angle. It is not just a wrapper around a single API call. It turns wallet PnL into a dashboard where users can search a wallet, choose a window, sort token-level rows, and understand where profit or loss came from.

What the API call actually looks like

The wallet performance flow starts with Vybe’s GET /v4/wallets/{ownerAddress}/pnl endpoint, documented in the Wallet PnL endpoint reference.

A basic request looks like this:

curl "https://api.vybenetwork.xyz/v4/wallets/<OWNER_ADDRESS>/pnl?resolution=30d&sortByDesc=realizedPnlUsd&limit=100" \
  -H "X-API-Key: YOUR_API_KEY"

To filter wallet PnL to one token, add mintAddress:

curl "https://api.vybenetwork.xyz/v4/wallets/<OWNER_ADDRESS>/pnl?mintAddress=<TOKEN_MINT>&resolution=30d&sortByDesc=realizedPnlUsd&limit=100" \
  -H "X-API-Key: YOUR_API_KEY"

That gives the product a clean path: pick a wallet, choose a time window, optionally filter by token, and rank the wallet’s token-level results by the metric that matters.

The parameters that matter most

The Wallet PnL endpoint keeps the request model focused, but each parameter changes the type of performance view you get.

  • ownerAddress is required and identifies the Solana wallet.

  • resolution controls the PnL window, with values such as 1d, 7d, 30d, and Full.

  • mintAddress filters the requested PnL data to one token.

  • sortByAsc sorts token rows ascending.

  • sortByDesc sorts token rows descending.

  • limit controls the number of rows returned.

  • page handles pagination.

The OpenAPI spec lists supported sort fields including mintAddress, tokenSymbol, buysTransactionCount, buysTokenAmount, buysVolumeUsd, sellsTransactionCount, sellsTokenAmount, sellsVolumeUsd, realizedPnlUsd, and unrealizedPnlUsd. It also notes that only one of sortByAsc or sortByDesc can be used at a time.

That parameter model is exactly what a wallet PnL dashboard needs. A user can start with a 30-day PnL view, then sort by realized profit, inspect unrealized positions, filter to one token, or paginate through a larger set of traded assets.

What the response gives you

The response is built around wallet-level summary metrics and per-token performance.

The OpenAPI spec describes the response as an overall summary plus token metrics. It returns an AccountTradesSummaryReturn shape with a summary object and a tokenMetrics array, where each token row represents metrics for a token’s trading performance.

That response shape gives the interface two layers at once:

  • Summary: the wallet’s overall performance

  • Attribution: which tokens contributed to the result

That is the key difference between a generic wallet page and a PnL product. A wallet balance tells you what is currently held. Wallet PnL tells you how the wallet performed and where that performance came from.

What this docs page gives you

The center of this article is the Wallet PnL endpoint.

The endpoint gives developers a direct way to fetch wallet profit and loss data without rebuilding trade attribution from scratch. It supports time windows, token filters, sorting, limits, and pagination. The OpenAPI description says it returns realized PnL, win rate, trade volume, and position details for a wallet.

That combination is useful in production because the same endpoint can support multiple product views:

  • wallet PnL summaries

  • per-token performance tables

  • realized profit rankings

  • unrealized PnL views

  • token-specific wallet analysis

  • win-rate and volume analysis

  • wallet performance dashboards

The endpoint gives you the PnL data. The product decides how users explore performance.

The interface starts with wallet search

The product starts with the wallet.

A user enters a wallet address or search query, chooses the endpoint mode, selects a resolution, and loads wallet PnL. The live demo includes controls for wallet address or name search, realtime versus historical mode, resolution, sort field, sort direction, limit, and page.

That matters because wallet analytics needs to be interactive. A user may start with one wallet, change the time window, sort by a different metric, or narrow the view to a specific token.

Realized and unrealized PnL tell different stories

A good wallet PnL page should separate realized and unrealized performance.

Realized PnL shows profit or loss that has already been locked in through trades. Unrealized PnL shows profit or loss still sitting in open positions. Both are important, but they answer different questions.

Realized PnL helps answer:

  • has this wallet actually taken profit?

  • how much profit has been closed?

  • which tokens produced realized gains or losses?

  • how consistent is the wallet over the selected window?

Unrealized PnL helps answer:

  • what open positions are still profitable or underwater?

  • how much performance is still exposed to market movement?

  • is the wallet sitting on paper gains or paper losses?

That distinction matters because a wallet with large unrealized profit may not have proven it can exit. A wallet with strong realized PnL has already converted trades into actual profit.

Token-level attribution is the core product surface

The wallet PnL table is where the product becomes useful.

Each row should make it easy to compare token-level performance by:

  • token mint

  • token symbol

  • buy transaction count

  • buy token amount

  • buy volume in USD

  • sell transaction count

  • sell token amount

  • sell volume in USD

  • realized PnL

  • unrealized PnL

Those are the same fields exposed through the endpoint’s sorting model, which means the table can be shaped around the exact questions users ask.

A user might sort by realized PnL to find the wallet’s best trades. They might sort by unrealized PnL to inspect open exposure. They might sort by buy or sell volume to understand where most trading activity happened.

That is what turns the endpoint into a workflow.

Sorting changes the analysis

The same wallet PnL data can tell different stories depending on how it is sorted.

Sorting by realizedPnlUsd highlights tokens where the wallet already locked in gains or losses. Sorting by unrealizedPnlUsd highlights open positions. Sorting by buysVolumeUsd or sellsVolumeUsd highlights where the wallet deployed or exited the most value. Sorting by transaction count highlights trading frequency.

That gives users several ways to interpret wallet performance:

  • profit-driven ranking

  • open-exposure ranking

  • volume-driven ranking

  • activity-driven ranking

  • token-specific ranking

A good wallet PnL dashboard needs that flexibility because there is no single definition of wallet performance.

Wallet PnL timeseries adds the historical view

The primary endpoint gives the wallet’s PnL summary and token-level breakdown. The related Wallet PnL Timeseries endpoint adds chartable history.

The timeseries endpoint is: GET /v4/wallets/{ownerAddress}/pnl-ts

The OpenAPI spec describes it as returning realized PnL bucketed into daily, weekly, or monthly periods. It defaults to daily resolution over the last 30 days and is designed for charting wallet trading performance over time.

That is useful when the product needs to show performance trend, not just current summary.

A wallet may have strong 30-day PnL but most of that performance may have happened in one day. A timeseries view helps users see whether performance was consistent, volatile, or concentrated in a short burst.

The repo turns the endpoint into a usable workflow

The repo is useful because it turns wallet PnL into an interface.

The implementation shows how to:

  • search for a wallet

  • load wallet PnL

  • choose realtime or historical mode

  • select 1d, 7d, 30d, or full-window views

  • sort token-level performance

  • paginate through results

  • compare realized and unrealized PnL

  • surface related wallets by realized PnL

  • run the app locally with a Vybe API key

That is the real value of the project. It gives developers a practical starting point for building wallet performance dashboards, smart-money tools, portfolio analytics products, and PnL attribution interfaces.

Why this makes a strong example for our users

The endpoint defines the primitive: wallet profit and loss.

The repo shows what that primitive becomes when it is turned into a product:

  • wallet search at the top

  • PnL filters and time windows

  • summary metrics for performance

  • token-level attribution in the main table

  • sorting by realized PnL, unrealized PnL, volume, and transaction count

  • optional historical performance charts

That is what makes this a useful example. It is focused, practical, and directly tied to the Wallet PnL API.

Final takeaway

A good wallet PnL API is not just a balance endpoint.

It is a way to make wallet performance measurable.

Vybe’s GET /v4/wallets/{ownerAddress}/pnl endpoint gives developers a clean way to fetch realized PnL, unrealized PnL, win rate, trade volume, and token-level performance for a Solana wallet. The repo shows how to turn that endpoint into a practical interface for wallet analytics, trader evaluation, and PnL attribution.

That is the real value here.

Not just what a wallet holds, but how well it has traded.

Further reading


Did this page help you?