Skip to main content

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

ParameterTypeDefaultDescription
periodstringTime window: 1d, 7d, 30d, 1y
afterintegerStart timestamp (Unix seconds)
beforeintegerEnd timestamp (Unix seconds)
tagsstringComma-separated tag slugs to filter by, case-insensitive (e.g. politics,crypto, nfl, Iran)
marketstringFilter by condition_id
include_unrealizedstringfalseSet 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)

FieldTypeDescription
net_realized_pnlnumberNet realized P&L (USD)
gross_profitnumberSum of winning positions (USD)
gross_lossnumberSum of losing positions (USD, negative)
unrealized_pnlnumberPaper P&L from open positions (USD)
total_pnlnumbernet_realized_pnl + unrealized_pnl (USD)
winsintegerWinning position count
lossesintegerLosing position count
position_countintegerTotal positions
open_positionsintegerCurrently held positions
total_volumenumberTotal volume traded (USD)

Response fields (with period)

FieldTypeDescription
realized_pnlnumberRealized P&L in the time window (USD)
gross_profitnumberSum of winning events in the window (USD)
gross_lossnumberSum of losing events in the window (USD, negative)
winsintegerWinning event count
lossesintegerLosing event count
eventsintegerTotal P&L events in the window
periodstringThe requested period
afterintegerStart timestamp (Unix seconds)
beforeintegerEnd timestamp (Unix seconds)
sourcestringAlways pnl_event for time-windowed queries

Additional fields (with include_unrealized=true)

FieldTypeDescription
unrealized_pnlnumberUnrealized 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_pnlnumberrealized_pnl + unrealized_pnl (USD)
open_positions_at_dateintegerNumber of positions that were open at the end of the time window