> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polynode.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Changelog — May 1, 2026

> Archived PolyNode API and SDK changes from May 1, 2026.

[← Back to the current changelog](/changelog)

## 2026-05-01 — Cursor pagination on `/v2/onchain/*/trades`

The two trade-history endpoints now support **cursor pagination** in addition to offset:

* `GET /v2/onchain/markets/{token_id}/trades?cursor=<lastTs>:<lastId>`
* `GET /v2/onchain/wallets/{address}/trades?cursor=<lastTs>:<lastId>`

**Why it matters:** offset pagination slows down the deeper you page — page 500 means the database walks 50,000 rows of wasted work to find your starting point. Cursor pagination loads page 1000 just as fast as page 1 — typically \~1 second per page, regardless of how deep you go.

**How to use:**

1. First page: pass `?cursor=` (empty value) instead of `?offset=0`.
2. Response includes a `pagination` block with `cursor` and `has_more`.
3. Subsequent pages: pass that `cursor` back as `?cursor=<value>`.
4. Stop when `has_more` is `false`.

**Available on every paid tier** — no Growth restriction.

**Compatibility:** purely additive. The existing `?offset=` mode is unchanged and remains fully supported. Existing integrations don't need to change anything — switch to cursor when you next touch the integration.

See the updated docs for full examples: [Trade History (Market)](/api-reference/onchain/market-trades) · [Trade History (Wallet)](/api-reference/onchain/wallet-trades).

***

## 2026-05-01 — Bulk trade-export endpoints (Growth plan and above)

Two new endpoints return the **entire** trade history for a market token or wallet in a **single response** — no client-side pagination required:

* `GET /v2/onchain/markets/{token_id}/trades/all`
* `GET /v2/onchain/wallets/{address}/trades/all`

The endpoint walks the full history for you. Optional `from` and `to` query parameters narrow the window.

**Limits:**

* Hard cap **250,000 trades** per call. Beyond that, response includes `"partial": true` with `"partial_reason": "hard_cap_250000"`.
* Wall-clock budget **180 seconds**. First cold-cache calls on busy markets/heavy wallets may take **1-3 minutes**. Subsequent calls hit Redis cache and return in **under 1 second**.
* Typical payload **1-50 MB**. Worst case (capped): **100-200 MB JSON**.
* Cache TTL **5 minutes** per `(scope, from, to)` combination. Partial results are **not cached**.

**Tier requirement:** **Growth plan (\$200/mo) or above.** Starter and free tier requests receive `403`. The bulk endpoints are gated to paid plans because of their large query and payload sizes.

**Compatibility:** purely additive. The standard paginated `/trades` endpoints are unchanged and remain available on all paid tiers.

Updated the request timeout to 180 seconds so cold-cache calls complete cleanly.

***

## 2026-05-01 — Backtest Copy PnL: new `total_realized_pnl_usdc` field

Added `total_realized_pnl_usdc` to `/v2/copy-pnl/{wallet}` responses. This is the **signed sum of WAVG-realized PnL across every position the matcher touched in the window** — the closest single number to "did this wallet make money trading?" and the recommended primary "PnL" field for customer-facing UI.

Existing `actual_pnl_usdc` is unchanged but is now documented as a **cashflow** metric (USDC delta in/out of the wallet over the window), which is intentionally different from realized PnL — see the [endpoint docs](/api-reference/backtesting/copy-pnl#understanding-cashflow-pnl-vs-realized-pnl) for the worked example.

Also fixed a long-standing bug in the cashflow accounting where neg-risk-conversion events were over-counting `settlement_in` (treating share counts as USDC). NRC-active wallets see corrected numbers across all four periods (`14d`, `30d`, `60d`, `180d`) on the next BYOB cycle refresh.

***
