Documentation Index
Fetch the complete documentation index at: https://polynode.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Returns P&L data for a wallet in USD. Without a period parameter, returns all-time P&L. With period, returns realized P&L for that time window computed from individual trade events.
Request
GET /v3/wallets/{address}/pnl
Query parameters
| Parameter | Type | Default | Description |
|---|
period | string | — | Time window: 1d, 7d, 30d, 1y |
after | integer | — | Start timestamp (Unix seconds) |
before | integer | — | End timestamp (Unix seconds) |
tags | string | — | Comma-separated tag slugs to filter by, case-insensitive (e.g. politics,crypto, nfl, Iran) |
market | string | — | Filter by condition_id |
include_unrealized | string | false | Set to true to include unrealized P&L at the end of the time window. Reconstructs which positions were open at that date and prices them at the last fill price. Only applies to time-filtered queries. |
Examples
All-time P&L
curl https://api.polynode.dev/v3/wallets/0x56687bf447db6ffa42ffe2204a05edaa20f55839/pnl
{
"address": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
"net_realized_pnl": 22053845.825455,
"gross_profit": 22057977.181649,
"gross_loss": -4131.356194,
"unrealized_pnl": 0.000688755,
"total_pnl": 22053845.826143753,
"position_count": 22,
"open_positions": 1,
"total_volume": 43013258.515682,
"wins": 18,
"losses": 4,
"elapsed_ms": 41
}
30-day P&L
curl https://api.polynode.dev/v3/wallets/0xbddf61af533ff524d27154e589d2d7a81510c684/pnl?period=30d
{
"address": "0xbddf61af533ff524d27154e589d2d7a81510c684",
"realized_pnl": 1815261.28,
"gross_profit": 1918402.27,
"gross_loss": -103140.98,
"wins": 33039,
"losses": 58867,
"events": 91906,
"source": "pnl_event",
"period": "30d",
"after": 1776134996,
"before": 1778726996,
"elapsed_ms": 5902
}
30-day P&L with unrealized
Pass include_unrealized=true to reconstruct which positions were open at the end of the time window, price them at the last fill before that date, and compute unrealized P&L.
curl https://api.polynode.dev/v3/wallets/0xbddf61af533ff524d27154e589d2d7a81510c684/pnl?period=30d&include_unrealized=true
{
"address": "0xbddf61af533ff524d27154e589d2d7a81510c684",
"realized_pnl": 1815261.28,
"gross_profit": 1918402.27,
"gross_loss": -103140.98,
"unrealized_pnl": 14714.71,
"total_pnl": 1829975.99,
"open_positions_at_date": 363,
"wins": 33039,
"losses": 58867,
"events": 91906,
"source": "pnl_event",
"period": "30d",
"after": 1776135002,
"before": 1778727002,
"elapsed_ms": 3803
}
Response fields (all-time)
| Field | Type | Description |
|---|
net_realized_pnl | number | Net realized P&L (USD) |
gross_profit | number | Sum of winning positions (USD) |
gross_loss | number | Sum of losing positions (USD, negative) |
unrealized_pnl | number | Paper P&L from open positions (USD) |
total_pnl | number | net_realized_pnl + unrealized_pnl (USD) |
wins | integer | Winning position count |
losses | integer | Losing position count |
position_count | integer | Total positions |
open_positions | integer | Currently held positions |
total_volume | number | Total volume traded (USD) |
Response fields (with period)
| Field | Type | Description |
|---|
realized_pnl | number | Realized P&L in the time window (USD) |
gross_profit | number | Sum of winning events in the window (USD) |
gross_loss | number | Sum of losing events in the window (USD, negative) |
wins | integer | Winning event count |
losses | integer | Losing event count |
events | integer | Total P&L events in the window |
period | string | The requested period |
after | integer | Start timestamp (Unix seconds) |
before | integer | End timestamp (Unix seconds) |
source | string | Always pnl_event for time-windowed queries |
Additional fields (with include_unrealized=true)
| Field | Type | Description |
|---|
unrealized_pnl | number | Unrealized P&L of positions that were open at the end of the time window (USD). Computed by reconstructing position state from fills and pricing at the last fill before the cutoff date. |
total_pnl | number | realized_pnl + unrealized_pnl (USD) |
open_positions_at_date | integer | Number of positions that were open at the end of the time window |