Wallet P&L time series
Wallet P&L
Wallet P&L Time Series
Realized P&L bucketed by hour, day, week, or month — chart-ready time series for a wallet.
GET
Wallet P&L time series
Returns wallet P&L buckets for charting. WithDocumentation Index
Fetch the complete documentation index at: https://docs.polynode.dev/llms.txt
Use this file to discover all available pages before exploring further.
period, after, or before, each row is a fixed time window (hour, day, week, or month). A running cumulative_pnl is included so the response can be plotted directly.
Without an explicit time filter, the endpoint returns a single all-time summary bucket that matches GET /v3/wallets/{address}/pnl.
In event-series mode, wins, losses, and events count realized P&L events in the selected window. In default summary mode, counts are position counts and the response includes count_type: "positions" and summary_bucket: true.
Rows at timestamp 0 or earlier are ignored in event-series mode, so explicit event windows start at Unix second 1.
Request
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
group | string | day | Bucket size: hour, day, week, month |
period | string | — | Shortcut for after: 1d, 7d, 30d, 1y |
after | integer | 1 | Start timestamp (Unix seconds, inclusive). Values below 1 are treated as 1. |
before | integer | now | End timestamp (Unix seconds, inclusive) |
limit | integer | 5000 | Max buckets returned, clamped 1-10000 |
after and period are both set, after wins.
Examples
All-time summary bucket
Daily P&L for the last 7 days
Hourly P&L for an explicit window
Weekly P&L for the last year
Response fields
| Field | Type | Description |
|---|---|---|
address | string | The wallet address (lowercased) |
granularity | string | Resolved bucket size (hour, day, week, month) |
after | integer | Start of the window (Unix seconds, inclusive) |
before | integer | End of the window (Unix seconds, inclusive) |
bucket_count | integer | Number of buckets returned |
buckets | array | Time-series rows, ordered oldest → newest |
buckets[].bucket | integer | Bucket start timestamp (Unix seconds, UTC, truncated to bucket boundary) |
buckets[].realized_pnl | number | Realized P&L in that bucket (USD) |
buckets[].cumulative_pnl | number | Running sum of realized_pnl over the returned series (USD) |
buckets[].gross_profit | number | Sum of winning events in that bucket (USD) |
buckets[].gross_loss | number | Sum of losing events in that bucket (USD, negative) |
buckets[].wins | integer | Count of winning events in that bucket |
buckets[].losses | integer | Count of losing events in that bucket |
buckets[].events | integer | Total P&L events in event-series mode; position count in default summary mode |
buckets[].position_count | integer | Position count. Present in default summary mode. |
buckets[].open_positions | integer | Open position count. Present in default summary mode. |
buckets[].unrealized_pnl | number | Current unrealized P&L. Present in default summary mode. |
buckets[].total_pnl | number | realized_pnl + unrealized_pnl. Present in default summary mode. |
buckets[].total_volume | number | Wallet volume from the summary source. Present in default summary mode. |
total_realized_pnl | number | Sum of realized_pnl across all returned buckets (USD) |
total_events | integer | Sum of events across all returned buckets |
total_wins | integer | Sum of wins across all returned buckets |
total_losses | integer | Sum of losses across all returned buckets |
source | string | Dataset label |
count_type | string | positions in default summary mode |
summary_bucket | boolean | true in default summary mode |
elapsed_ms | integer | Server-side query time in milliseconds |
Errors
| HTTP | When |
|---|---|
400 | Invalid wallet address (must be 0x + 40 hex) |
400 | Invalid group value (must be hour, day, week, or month) |
400 | after greater than before |
Authorizations
Path Parameters
Wallet address
Query Parameters
Bucket size
Available options:
hour, day, week, month Time window shortcut
Available options:
1d, 7d, 30d, 1y Unix timestamp lower bound. Values below 1 are clamped to 1.
Unix timestamp upper bound
Maximum bucket count
Response
Wallet P&L buckets

