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.
TL;DR — which PnL field do you actually want?
This endpoint returns two different PnL numbers that can look very different for the same wallet. Pick the right one for your use case:| Field | What it answers | When to use |
|---|---|---|
total_realized_pnl_usdc | ”Did this wallet make money trading?” | Default for customer-facing UI. Closest to what other trading platforms call “PnL”. Equivalent to summing per-position WAVG-realized PnL across every position the wallet touched. |
actual_pnl_usdc | ”How much net cash moved through this wallet’s USDC balance from trading?” | Diagnostic / slippage-analysis. Used internally to compute slippage_* fields. Inflated for active wallets that hold inventory. |
Path parameters
The Polymarket wallet address (Safe proxy or EOA, lowercased internally).
Query parameters
Convenience window preset. One of:
7d, 14d, 30d, 60d, 90d, 180d. Anchored to “now”. If you pass period, you don’t need from.Start of the window. Accepts
YYYY-MM-DD (UTC midnight) or unix seconds. Overrides period if both are passed.End of the window. Same format as
from. Defaults to current time when omitted.When
1 or true, response includes a trades array with one entry per fill (ts, side, price, shares, actual_usd, backtest_usd). Useful for transparency and debugging.Response fields
| Field | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
wallet | string | Echo of the requested wallet (lowercased) | ||||||
total_realized_pnl_usdc | number | Realized PnL: signed sum of per-position WAVG-realized P/L across every position the matcher touched in the window. Counts only profit/loss on positions the wallet actually closed (or partially closed). Recommended primary “PnL” for customer UI. | ||||||
actual_pnl_usdc | number | Cashflow PnL over the window: -buys + sells + settlements. Counts every USDC inflow/outflow from trading. Includes inventory bought but not yet sold (so often very negative for active buyers). Used as input to slippage formula. | ||||||
backtest_copy_pnl_usdc | number | Same cashflow walk with 2% slippage applied to buys (capped at $1) and sells. Settlements unchanged. | ||||||
slippage_amount_usdc | number | actual_pnl_usdc − backtest_copy_pnl_usdc. The dollar friction the copier eats. | ||||||
slippage_cost_rate_pct | number | null | slippage / abs(actual_pnl) × 100. null when abs(actual_pnl) < 1 (denominator unstable). | ||||||
toxic_for_copying | boolean | true when slippage_cost_rate_pct > 15. | ||||||
trade_count | int | Number of fills walked in the window. | ||||||
positions_closed | int | Count of positions that contributed non-zero realized PnL in the window. | ||||||
avg_entry_prob_weighted | number | null | PnL-weighted average entry probability across closed positions. `Σ(entry_price × | realized | ) / Σ | realized | . Null when Σ | realized | < $1`. |
avg_hold_seconds_weighted | number | null | PnL-weighted average hold duration. Currently always null (WAVG matcher doesn’t track per-segment timestamps; planned for future). | ||||||
pnl_definition | string | Always "cashflow" for actual_pnl_usdc. Reminds callers actual_pnl_usdc differs from PM website PnL (which marks open positions). | ||||||
applied_filters | object | Resolved from (unix), to (unix), and window_days (only set when default 30d window was used). | ||||||
partial | boolean | true if the underlying walk hit the 30s budget and returned incomplete data. | ||||||
sources | object | Breakdown: window_trades, window_activity, per-event-type counts, cashflow_breakdown (buys/sells/settlements), fifo_breakdown (matcher diagnostics including total_realized_pnl_usdc). For transparency. | ||||||
trades | array | Only present when include_trades=1. One entry per fill. |
Understanding cashflow PnL vs realized PnL
The most common source of confusion with this endpoint is “why don’tactual_pnl_usdc and total_realized_pnl_usdc agree?” — they’re answering different questions.
Worked example. A wallet’s first 30 days:
actual_pnl_usdc = -$16— the wallet paid out $16 more USDC than it received over the 30 days.total_realized_pnl_usdc = +$17.20— actual trading profit on the 130 shares the wallet closed.- The wallet still HOLDS 70 shares (cost basis $32.20). Cashflow counts that as money “spent”. Realized ignores it.
cashflow_pnl + cost_basis_of_open_positions ≈ realized_pnl. In this example: -$16 + $32.20 = $16.20 ≈ $17.20 (small rounding from WAVG cost basis updates).
Which to use:
- For “did the wallet make money trading?” →
total_realized_pnl_usdc. This is what trading platforms typically call “PnL” and what users intuitively expect. - For “how much net cash flowed through this wallet?” →
actual_pnl_usdc. Useful for liquidity analysis and the slippage formula, but not what most people mean by “PnL”. - For copy-trading slippage analysis → use
slippage_*fields (which are derived from cashflow). The slippage formula needs apples-to-apples cashflow comparison; this is whyactual_pnl_usdcis defined as cashflow.
Example: default 30-day window
Request:200 OK):
total_realized_pnl_usdc — and the answer is no.
Example: 7-day window via preset
Request:200 OK):
Example: explicit date range
Request — score the window from April 15 to April 25 inclusive:200 OK):
Example: per-fill drill-down
Request:200 OK, truncated):
Errors
400 Invalid period:
401 No API key:
403 Free tier:
429 Rate limited:
Retry-After header (in seconds, rounded up) is also set on 429 responses. The rate limit is shared across all /v2/copy-pnl/* calls per API key — calling the endpoint with different wallets or different params still counts toward the same 1 req per 5 seconds budget.
Notes
- Wallet address is case-insensitive. Internally lowercased.
- Time precision: when
fromisYYYY-MM-DD, it resolves to that date at 00:00 UTC. Pass unix seconds for sub-day precision. - Settlement events (redemption, merge, split, neg_risk_conversion) are processed at face value on both
actual_pnlandbacktest_copy_pnl, so they cancel out inslippage_amountbut remain in the absolute PnL numbers. - High-volume wallets: the underlying walk is paginated by time bucket and runs in parallel. Wallets with up to ~1.6M fills in the window have been validated. Beyond that, pass a tighter window or expect
partial: true.

