curl --request GET \
--url https://public-api.birdeye.so/wallet/v2/pnl/summary \
--header 'X-API-KEY: <api-key>'import requests
url = "https://public-api.birdeye.so/wallet/v2/pnl/summary"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://public-api.birdeye.so/wallet/v2/pnl/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"summary": {
"unique_tokens": 2,
"counts": {
"total_buy": 11,
"total_sell": 3,
"total_trade": 14,
"total_win": 0,
"total_loss": 0,
"win_rate": 0
},
"cashflow_usd": {
"total_invested": 175666.37823969766,
"total_sold": 87670.81375594059
},
"pnl": {
"realized_profit_usd": 6045.934178885913,
"realized_profit_percent": 0.07406974699642274,
"unrealized_usd": -74830.62425247866,
"total_usd": -68784.69007359275,
"avg_profit_per_trade_usd": -4913.192148113768
}
}
}
}{
"success": false,
"message": "Bad request"
}{
"success": false,
"message": "Unauthorized"
}{
"success": false,
"message": "Access Denied"
}{
"success": false,
"message": "Too many requests"
}{
"success": false,
"message": "Internal Server Error"
}Wallet - PnL
Retrieve a wallet’s overall PnL and trading statistics, including trade counts, win rate, cash flow, and realized and unrealized profit.
curl --request GET \
--url https://public-api.birdeye.so/wallet/v2/pnl/summary \
--header 'X-API-KEY: <api-key>'import requests
url = "https://public-api.birdeye.so/wallet/v2/pnl/summary"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://public-api.birdeye.so/wallet/v2/pnl/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": {
"summary": {
"unique_tokens": 2,
"counts": {
"total_buy": 11,
"total_sell": 3,
"total_trade": 14,
"total_win": 0,
"total_loss": 0,
"win_rate": 0
},
"cashflow_usd": {
"total_invested": 175666.37823969766,
"total_sold": 87670.81375594059
},
"pnl": {
"realized_profit_usd": 6045.934178885913,
"realized_profit_percent": 0.07406974699642274,
"unrealized_usd": -74830.62425247866,
"total_usd": -68784.69007359275,
"avg_profit_per_trade_usd": -4913.192148113768
}
}
}
}{
"success": false,
"message": "Bad request"
}{
"success": false,
"message": "Unauthorized"
}{
"success": false,
"message": "Access Denied"
}{
"success": false,
"message": "Too many requests"
}{
"success": false,
"message": "Internal Server Error"
}- Usage Note
- Accessibility
- Chain Supported
Wallet-level PnL summary.
- Notes on data: trade data per protocol are not fully backfilled and can affect calculated PnL.
durationacceptsall,90d,30d,7d, and24h.position_scopecontrols whether the summary uses duration-only or cumulative position interpretation.pnl_methodsupportsnetcashandwac. Use it when you need PnL to follow a specific accounting method.- Insights in the response:
counts:total_buy: Total number of buy trades.total_sell: Total number of sell trades.total_trade: Combined total of buys and sells.total_win: Total trades have profit. Only account for fully realized tokens.total_loss: Total trades in loss. Only account for fully realized tokens.win_rate: Winning rate. Only account for fully realized tokens.cashflow_usd:total_invested: USD spent on all buys.total_sold: USD received from sales.current_value: Current position value in USD.pnl:realized_profit_usd: Profit/loss from completed trades.realized_profit_percent: % gain/loss relative to sold cost basis.unrealized_usd: Profit/loss of current holdings (mark-to-market).total_usd: Sum of realized + unrealized profit in USD.avg_profit_per_trade_usd: Average profit/loss per trade.
- Standard
- Lite
- Starter
- Premium
- Business
- Enterprise
SVM ⛓️ ✨
EVM ⛓️ ✨
Compute Unit ⚙️
Compute Unit ⚙️
- This endpoint consumes
20 CUper request.
Use Cases 💡
Use Cases 💡
- Get a fast wallet PnL summary without requesting token-by-token detail.
- Measure win rate, realized profit, unrealized exposure, and cash flow in one response.
- Power wallet overview cards, trader profile pages, and quick performance checks.
How to Use 🛠️
How to Use 🛠️
- Set the supported PnL chain in
x-chain. - Pass the wallet address in
wallet. - Choose
durationandposition_scopebased on whether you want recent or all-time context. - Set
pnl_method=netcashorpnl_method=wacto match the accounting logic used by your app or report. - Use this summary endpoint before opening detailed breakdowns.
Best Practices ✅
Best Practices ✅
- Compare realized and unrealized values together; a high total PnL can hide very different risk profiles.
- Keep the selected duration visible in product UI so users do not confuse recent and all-time performance.
- Use the detail endpoint when the summary reveals something worth investigating.
Authorizations
API key for authentication
Headers
The chain support PNL data.
solana, ethereum, arbitrum, avalanche, bsc, optimism, polygon, base, zksync, monad, hyperevm, mantle, megaeth, robinhood Query Parameters
The wallet of the account.
Time period used to aggregate wallet transactions and calculate PnL statistics.
all, 90d, 30d, 7d, 24h Calculation mode for PnL. duration_only calculates PnL only for each selected time bucket. cumulative calculates realized_pnl cumulatively from the start time, while unrealized_pnl is based on the all-time open position. Defaults to duration_only.
duration_only, cumulative PNL calculation method. wac (Weighted Average Cost): calculates PNL for each sell against the average cost of the position held at the time of the sell. Buys only re-average the cost of the remaining inventory, and previously realized sell PNL is not affected by later trades. netcash (Net Cash): calculates PNL across the full trade history using the spread between cumulative average sell price and cumulative average buy price. The buy average includes all buys and is not reduced by sells, so later buys can change the reported PNL.
wac, net_cash Was this page helpful?

