Calculate a wallet’s gross trading cash flow and the cash flow of a simulated copier using Polynode’s indexed fills and settlement events. This replaces the deprecated V2 on-demand endpoint.
0x followed by 40 hexadecimal characters. Normalized to lowercase.
max_trades
Query
50000
Integer from 1 to 50000. Maximum number of recent wallet-owned order fills to include.
history
Query
recent
recent, auto, or full. In auto, max_trades is the fallback cap; in full, it is the initial scan size, not a limit on the returned fill count.
period
Query
None
7d, 14d, 30d, 60d, 90d, or 180d, ending at to or the calculation snapshot.
from
Query
None
Inclusive start, as Unix seconds or YYYY-MM-DD at UTC midnight. Overrides period.
to
Query
Snapshot
Exclusive end, in the same formats. from must be earlier than to.
The cap counts fills, not positions, tokens, transactions, or distinct orders. The calculation selects the wallet’s own signed-order fill records, including its taker-order execution record. It avoids counting that wallet again as the counterparty to other matched orders. This attribution is different from requesting both address roles on the raw trades endpoint.There is no default date window. With history=recent, active wallets can reach 50,000 fills quickly; quieter wallets can cover years. Date filters apply before the fill cap, including to settlement events. A wallet with fewer matching fills returns all matching indexed fills. coverage.history_truncated tells you whether older fills inside the requested date window were excluded by the fill selection.
recent: return up to max_trades recent fills. This preserves the original V3 default.
auto: first complete the recent calculation, then spend up to two additional seconds extending toward all matching history, within the overall calculation deadline. Return full history if it completes; otherwise return the original completed recent calculation with an explicit fallback reason.
full: require all matching indexed history. If the work or time limit is reached, return an error instead of a recent-window fallback.
Full-history work is bounded at 500,000 fills and 100,000 settlement events per wallet. Both auto and full can return more than 50,000 fills. max_trades remains limited to 50,000 and controls the initial recent calculation. A successful full result contains all matching history, never the first 500,000 fills of a larger history.For example, request a complete historical month with ?history=full&from=2026-08-01&to=2026-09-01, or use ?history=auto&period=90d to allow an explicit recent-window fallback.Read coverage.requested_history, served_history (full or recent), and fallback_reason on every result. served_history=full means the requested date window is complete; lifetime_history_included is true only when no date filters or fill truncation restrict the indexed history. Automatic fallback reasons are query_timeout, query_work_limit, activity_limit_exceeded, or history_limit_exceeded. If the initial recent calculation fails, there is no valid fallback and the request returns an error.
Buy: the copier pays min(price × 1.02, 1.00) × shares.
Sell: the copier receives price × 0.98 × shares.
Splits consume collateral; merges and redemptions release collateral. Neg-risk conversions include released collateral according to their selected outcomes. These settlement flows receive no simulated slippage.
The 2% assumption is relative to each execution price. It is a fixed screening model, not a measured execution cost or a forecast. When the absolute gross cash flow is below 1 USDC, both the percentage and toxic_for_copying are null.
pnl_definition is cashflow. Fees are excluded, opening inventory is not valued, and open positions are not marked to market. Sales or redemptions of inventory acquired before the selected window can therefore make this differ substantially from realized or total portfolio PnL. Deposits, withdrawals, and token transfers are outside this calculation. It covers spot order fills, not combo or perpetual trading.
If older matching fills are excluded, settlement inclusion begins at the exact block and log of the first included fill, inclusive. Otherwise, all indexed settlement history within the requested dates is eligible, including events before the first fill. A wallet with settlement activity and no fills can still return a cash-flow result. Explicit timestamps are checked exactly; the database snapshot bounds which events are visible.
realized_pnl_context provides the wallet’s stored lifetime realized profit and position counts alongside the cash-flow simulation. Its total_realized_pnl_usdc is actual realized profit from the wallet summary; it is not the copier’s simulated realized profit and is not used in the slippage or copying flag formulas.This context always has scope: "lifetime_wallet" and date_filters_applied: false. It is not rewound by from or to and is not a realized-profit result for a historical backtest window. Read updated_at, updated_block, and refresh_age_seconds to see the summary’s last update. latest_indexed_fill_block supports the freshness indicator: behind_indexed_fills, no_newer_indexed_fills, unknown, or unavailable. No newer fills does not prove all settlement or valuation inputs are current.If no summary is available, available is false and its profit/count/update fields are null, rather than zero. position_count and open_positions describe the stored lifetime summary. They do not reproduce V2’s count of positions with nonzero realized PnL.
Money and percentages are decimal strings with six fractional digits. Event timestamps are Unix seconds. snapshot_at is a UTC timestamp. For a truncated history, window_start contains type: "inclusive_trade_cursor", block_number and log_index as strings, and timestamp in Unix seconds. A complete window with a start date uses type: "inclusive_timestamp" and timestamp. window_end is either an exclusive_timestamp or a database_snapshot. applied_filters reports the resolved date bounds; without explicit dates, its to records the snapshot time in whole seconds. An empty wallet has zero cash-flow amounts and null first/last event timestamps.Results may be cached for 30 seconds after calculation, separately for each wallet and set of options. cache.status is miss, hit, or coalesced (shared in-progress work). cache.age_ms measures time since the calculation’s snapshot; data.query_ms describes that calculation, including any attempted history expansion, while elapsed_ms describes the current request. Each wallet has its own snapshot, including in a batch. Relative periods are anchored to that calculation; supply explicit from and to to fix the same date window across wallets.
Available on paid V3 plans under the account’s normal REST limits and monthly usage policy. The V2-specific one-request-per-five-seconds limit does not apply. Each HTTP request counts as one API request, including a batch. Cache hits still count as requests. Database capacity is bounded; account request limits are not a guarantee of uncached calculation throughput.
Use GET /v3/wallets/{address}/copy-pnl or V3 Copy PnL Batch. Read the summary from data; batch input uses wallets instead of addresses. period, from, and to are supported. V2 defaulted to 30 days; send period=30d explicitly to request that window in V3. Use history=full when the whole requested window is required, or auto when an explicit recent-window fallback is acceptable.Read actual lifetime realized PnL from realized_pnl_context.total_realized_pnl_usdc, with the scope and freshness limitations above. This does not restore V2’s window-specific weighted-average position metrics. include_trades, individual trade arrays, weighted entry/holding metrics, and V2’s BYOB tracked-wallet pool, snapshot, and leaderboard remain outside these endpoints.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"PolyNode","colors":{"primary":"#3b82f6","light":"#60a5fa","dark":"#2563eb"},"logo":{"light":"https://mintcdn.com/polynode/zluszUOhqmSDk1RK/images/logo-light.png?fit=max\u0026auto=format\u0026n=zluszUOhqmSDk1RK\u0026q=85\u0026s=fc49b798da5a361cb76f4733f13230dd","dark":"https://mintcdn.com/polynode/zluszUOhqmSDk1RK/images/logo-dark.png?fit=max\u0026auto=format\u0026n=zluszUOhqmSDk1RK\u0026q=85\u0026s=6d316edd9113e88a6c4e2973cc12438d"},"favicon":"https://mintcdn.com/polynode/zluszUOhqmSDk1RK/images/favicon.png?fit=max\u0026auto=format\u0026n=zluszUOhqmSDk1RK\u0026q=85\u0026s=0bf4f722dd9d5dddb849158b764adad4","api":{"playground":{}},"navbar":{"links":[{"href":"https://api.polynode.dev/v1/status","label":"API Status"}],"primary":{"type":"button","label":"Get API Key","href":"https://polynode.dev"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"polynode","hasAudioNarration":false,"actualSubdomain":"polynode","customDomains":["docs.polynode.dev"],"gitSource":{"type":"github","owner":"joinquantish","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ada22f99679105657d59077","collectionId":"8c9d36d2-df53-461a-8fcc-1f6971746979","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ada22f99679105657d59077"},"entitlements":{},"buildId":"6ada22f99679105657d59077","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"API Reference","count":245},{"language":"default","tag":"Query Catalog","count":67},{"language":"default","tag":"SDKs","count":51},{"language":"default","tag":"Guides","count":35},{"language":"default","tag":"Webhooks","count":26},{"language":"default","tag":"Changelog","count":23},{"language":"default","tag":"Archive","count":22},{"language":"default","tag":"WebSocket","count":21},{"language":"default","tag":"Perps Market Data","count":16},{"language":"default","tag":"Event Types","count":16}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"data/wallets/copy-pnl","slug":"/data/wallets/copy-pnl","pageMetadata":{"title":"Copy PnL","openapi":"GET /v3/wallets/{address}/copy-pnl","description":"Estimate copying slippage with date filters, optional full history, and lifetime realized-PnL context.","href":"/data/wallets/copy-pnl"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Estimate copying slippage with date filters, optional full history, and lifetime realized-PnL context.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Calculate a wallet’s gross trading cash flow and the cash flow of a simulated copier using Polynode’s indexed fills and settlement events. This replaces the deprecated `,_jsx(_components.a,{href:`/api-reference/backtesting/copy-pnl`,children:`V2 on-demand endpoint`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: pn_live_YOUR_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v3/wallets/0xab03f377164c3726d498e56f7a9398cd8eb74494/copy-pnl\"`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Location`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`address`})}),_jsx(_components.td,{children:`Path`}),_jsx(_components.td,{children:`Required`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`0x`}),` followed by 40 hexadecimal characters. Normalized to lowercase.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`max_trades`})}),_jsx(_components.td,{children:`Query`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`50000`})}),_jsxs(_components.td,{children:[`Integer from `,_jsx(_components.code,{children:`1`}),` to `,_jsx(_components.code,{children:`50000`}),`. Maximum number of recent wallet-owned order fills to include.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`history`})}),_jsx(_components.td,{children:`Query`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`recent`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`recent`}),`, `,_jsx(_components.code,{children:`auto`}),`, or `,_jsx(_components.code,{children:`full`}),`. In `,_jsx(_components.code,{children:`auto`}),`, `,_jsx(_components.code,{children:`max_trades`}),` is the fallback cap; in `,_jsx(_components.code,{children:`full`}),`, it is the initial scan size, not a limit on the returned fill count.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`period`})}),_jsx(_components.td,{children:`Query`}),_jsx(_components.td,{children:`None`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`7d`}),`, `,_jsx(_components.code,{children:`14d`}),`, `,_jsx(_components.code,{children:`30d`}),`, `,_jsx(_components.code,{children:`60d`}),`, `,_jsx(_components.code,{children:`90d`}),`, or `,_jsx(_components.code,{children:`180d`}),`, ending at `,_jsx(_components.code,{children:`to`}),` or the calculation snapshot.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`from`})}),_jsx(_components.td,{children:`Query`}),_jsx(_components.td,{children:`None`}),_jsxs(_components.td,{children:[`Inclusive start, as Unix seconds or `,_jsx(_components.code,{children:`YYYY-MM-DD`}),` at UTC midnight. Overrides `,_jsx(_components.code,{children:`period`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`to`})}),_jsx(_components.td,{children:`Query`}),_jsx(_components.td,{children:`Snapshot`}),_jsxs(_components.td,{children:[`Exclusive end, in the same formats. `,_jsx(_components.code,{children:`from`}),` must be earlier than `,_jsx(_components.code,{children:`to`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The cap counts `,_jsx(_components.strong,{children:`fills`}),`, not positions, tokens, transactions, or distinct orders. The calculation selects the wallet’s own signed-order fill records, including its taker-order execution record. It avoids counting that wallet again as the counterparty to other matched orders. This attribution is different from requesting both address roles on the raw trades endpoint.`]}),`\n`,_jsxs(_components.p,{children:[`There is no default date window. With `,_jsx(_components.code,{children:`history=recent`}),`, active wallets can reach 50,000 fills quickly; quieter wallets can cover years. Date filters apply before the fill cap, including to settlement events. A wallet with fewer matching fills returns all matching indexed fills. `,_jsx(_components.code,{children:`coverage.history_truncated`}),` tells you whether older fills `,_jsx(_components.strong,{children:`inside the requested date window`}),` were excluded by the fill selection.`]}),`\n`,_jsx(Heading,{level:`2`,id:`history-modes`,children:`History modes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`recent`}),`: return up to `,_jsx(_components.code,{children:`max_trades`}),` recent fills. This preserves the original V3 default.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`auto`}),`: first complete the recent calculation, then spend up to two additional seconds extending toward all matching history, within the overall calculation deadline. Return full history if it completes; otherwise return the original completed recent calculation with an explicit fallback reason.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`full`}),`: require all matching indexed history. If the work or time limit is reached, return an error instead of a recent-window fallback.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Full-history work is bounded at 500,000 fills and 100,000 settlement events per wallet. Both `,_jsx(_components.code,{children:`auto`}),` and `,_jsx(_components.code,{children:`full`}),` can return more than 50,000 fills. `,_jsx(_components.code,{children:`max_trades`}),` remains limited to 50,000 and controls the initial recent calculation. A successful `,_jsx(_components.code,{children:`full`}),` result contains all matching history, never the first 500,000 fills of a larger history.`]}),`\n`,_jsxs(_components.p,{children:[`For example, request a complete historical month with `,_jsx(_components.code,{children:`?history=full\u0026from=2026-08-01\u0026to=2026-09-01`}),`, or use `,_jsx(_components.code,{children:`?history=auto\u0026period=90d`}),` to allow an explicit recent-window fallback.`]}),`\n`,_jsxs(_components.p,{children:[`Read `,_jsx(_components.code,{children:`coverage.requested_history`}),`, `,_jsx(_components.code,{children:`served_history`}),` (`,_jsx(_components.code,{children:`full`}),` or `,_jsx(_components.code,{children:`recent`}),`), and `,_jsx(_components.code,{children:`fallback_reason`}),` on every result. `,_jsx(_components.code,{children:`served_history=full`}),` means the requested date window is complete; `,_jsx(_components.code,{children:`lifetime_history_included`}),` is true only when no date filters or fill truncation restrict the indexed history. Automatic fallback reasons are `,_jsx(_components.code,{children:`query_timeout`}),`, `,_jsx(_components.code,{children:`query_work_limit`}),`, `,_jsx(_components.code,{children:`activity_limit_exceeded`}),`, or `,_jsx(_components.code,{children:`history_limit_exceeded`}),`. If the initial recent calculation fails, there is no valid fallback and the request returns an error.`]}),`\n`,_jsx(Heading,{level:`2`,id:`calculation`,children:`Calculation`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Buy: the copier pays `,_jsx(_components.code,{children:`min(price × 1.02, 1.00) × shares`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Sell: the copier receives `,_jsx(_components.code,{children:`price × 0.98 × shares`}),`.`]}),`\n`,_jsx(_components.li,{children:`Splits consume collateral; merges and redemptions release collateral. Neg-risk conversions include released collateral according to their selected outcomes. These settlement flows receive no simulated slippage.`}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`actual_pnl_usdc = sells - buys + settlement_in - settlement_out`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`backtest_copy_pnl_usdc = actual_pnl_usdc - slippage_amount_usdc`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`slippage_cost_rate_pct = slippage_amount_usdc / abs(actual_pnl_usdc) × 100`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`toxic_for_copying = slippage_cost_rate_pct > 15`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The 2% assumption is relative to each execution price. It is a fixed screening model, not a measured execution cost or a forecast. When the absolute gross cash flow is below 1 USDC, both the percentage and `,_jsx(_components.code,{children:`toxic_for_copying`}),` are `,_jsx(_components.code,{children:`null`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`pnl_definition`}),` is `,_jsx(_components.code,{children:`cashflow`}),`. Fees are excluded, opening inventory is not valued, and open positions are not marked to market. Sales or redemptions of inventory acquired before the selected window can therefore make this differ substantially from realized or total portfolio PnL. Deposits, withdrawals, and token transfers are outside this calculation. It covers spot order fills, not combo or perpetual trading.`]})}),`\n`,_jsx(_components.p,{children:`If older matching fills are excluded, settlement inclusion begins at the exact block and log of the first included fill, inclusive. Otherwise, all indexed settlement history within the requested dates is eligible, including events before the first fill. A wallet with settlement activity and no fills can still return a cash-flow result. Explicit timestamps are checked exactly; the database snapshot bounds which events are visible.`}),`\n`,_jsx(Heading,{level:`2`,id:`realized-pnl-context`,children:`Realized-PnL context`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`realized_pnl_context`}),` provides the wallet’s stored lifetime realized profit and position counts alongside the cash-flow simulation. Its `,_jsx(_components.code,{children:`total_realized_pnl_usdc`}),` is actual realized profit from the wallet summary; it is not the copier’s simulated realized profit and is not used in the slippage or copying flag formulas.`]}),`\n`,_jsxs(_components.p,{children:[`This context always has `,_jsx(_components.code,{children:`scope: \"lifetime_wallet\"`}),` and `,_jsx(_components.code,{children:`date_filters_applied: false`}),`. It is `,_jsxs(_components.strong,{children:[`not rewound by `,_jsx(_components.code,{children:`from`}),` or `,_jsx(_components.code,{children:`to`})]}),` and is not a realized-profit result for a historical backtest window. Read `,_jsx(_components.code,{children:`updated_at`}),`, `,_jsx(_components.code,{children:`updated_block`}),`, and `,_jsx(_components.code,{children:`refresh_age_seconds`}),` to see the summary’s last update. `,_jsx(_components.code,{children:`latest_indexed_fill_block`}),` supports the `,_jsx(_components.code,{children:`freshness`}),` indicator: `,_jsx(_components.code,{children:`behind_indexed_fills`}),`, `,_jsx(_components.code,{children:`no_newer_indexed_fills`}),`, `,_jsx(_components.code,{children:`unknown`}),`, or `,_jsx(_components.code,{children:`unavailable`}),`. No newer fills does not prove all settlement or valuation inputs are current.`]}),`\n`,_jsxs(_components.p,{children:[`If no summary is available, `,_jsx(_components.code,{children:`available`}),` is false and its profit/count/update fields are null, rather than zero. `,_jsx(_components.code,{children:`position_count`}),` and `,_jsx(_components.code,{children:`open_positions`}),` describe the stored lifetime summary. They do not reproduce V2’s count of positions with nonzero realized PnL.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:`The following is an illustrative two-fill calculation: a buy costing 5 USDC followed by a sale returning 8 USDC, with no settlement flows.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`56`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`56`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"wallet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x1111111111111111111111111111111111111111\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"actual_pnl_usdc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3.000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"backtest_copy_pnl_usdc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2.740000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slippage_amount_usdc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0.260000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slippage_cost_rate_pct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"8.666667\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"toxic_for_copying\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"trade_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pnl_definition\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cashflow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fees_included\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"opening_inventory_valued\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"open_positions_marked_to_market\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slippage_bps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"buy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"sell\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"buy_price_capped_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1.000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cashflows\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"buy_cost_usdc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5.000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sell_revenue_usdc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"8.000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"settlement_in_usdc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0.000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"settlement_out_usdc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0.000000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"event_counts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"buys\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"sells\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"splits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"merges\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"redemptions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"neg_risk_conversions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"coverage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"selection\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"latest_wallet_order_fills\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"max_trades\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`50000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"history_truncated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requested_history\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"recent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"served_history\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"full\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fallback_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"lifetime_history_included\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"window_start\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"beginning_of_indexed_history\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"window_end\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"database_snapshot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"snapshot_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-07T01:00:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"first_included_event_timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1788652800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_included_event_timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1788739200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"snapshot_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-07T01:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"applied_filters\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"period\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"from\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1788742800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"realized_pnl_context\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"available\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"scope\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lifetime_wallet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date_filters_applied\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"api.wallet_pnl_current\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pnl_definition\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"realized\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_realized_pnl_usdc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3.000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"position_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"open_positions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updated_block\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"93350000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updated_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-07T00:59:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"refresh_age_seconds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"latest_indexed_fill_block\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"93350000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"freshness\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"no_newer_indexed_fills\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"query_ms\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`800`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cache\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"miss\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"age_ms\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"elapsed_ms\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`805`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Money and percentages are decimal strings with six fractional digits. Event timestamps are Unix seconds. `,_jsx(_components.code,{children:`snapshot_at`}),` is a UTC timestamp. For a truncated history, `,_jsx(_components.code,{children:`window_start`}),` contains `,_jsx(_components.code,{children:`type: \"inclusive_trade_cursor\"`}),`, `,_jsx(_components.code,{children:`block_number`}),` and `,_jsx(_components.code,{children:`log_index`}),` as strings, and `,_jsx(_components.code,{children:`timestamp`}),` in Unix seconds. A complete window with a start date uses `,_jsx(_components.code,{children:`type: \"inclusive_timestamp\"`}),` and `,_jsx(_components.code,{children:`timestamp`}),`. `,_jsx(_components.code,{children:`window_end`}),` is either an `,_jsx(_components.code,{children:`exclusive_timestamp`}),` or a `,_jsx(_components.code,{children:`database_snapshot`}),`. `,_jsx(_components.code,{children:`applied_filters`}),` reports the resolved date bounds; without explicit dates, its `,_jsx(_components.code,{children:`to`}),` records the snapshot time in whole seconds. An empty wallet has zero cash-flow amounts and `,_jsx(_components.code,{children:`null`}),` first/last event timestamps.`]}),`\n`,_jsxs(_components.p,{children:[`Results may be cached for 30 seconds after calculation, separately for each wallet and set of options. `,_jsx(_components.code,{children:`cache.status`}),` is `,_jsx(_components.code,{children:`miss`}),`, `,_jsx(_components.code,{children:`hit`}),`, or `,_jsx(_components.code,{children:`coalesced`}),` (shared in-progress work). `,_jsx(_components.code,{children:`cache.age_ms`}),` measures time since the calculation’s snapshot; `,_jsx(_components.code,{children:`data.query_ms`}),` describes that calculation, including any attempted history expansion, while `,_jsx(_components.code,{children:`elapsed_ms`}),` describes the current request. Each wallet has its own snapshot, including in a batch. Relative periods are anchored to that calculation; supply explicit `,_jsx(_components.code,{children:`from`}),` and `,_jsx(_components.code,{children:`to`}),` to fix the same date window across wallets.`]}),`\n`,_jsx(Heading,{level:`2`,id:`access-and-errors`,children:`Access and errors`}),`\n`,_jsxs(_components.p,{children:[`Available on paid V3 plans under the account’s normal `,_jsx(_components.a,{href:`/guides/rate-limits`,children:`REST limits`}),` and monthly usage policy. The V2-specific one-request-per-five-seconds limit does `,_jsx(_components.strong,{children:`not`}),` apply. Each HTTP request counts as one API request, including a batch. Cache hits still count as requests. Database capacity is bounded; account request limits are not a guarantee of uncached calculation throughput.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP status`}),_jsx(_components.th,{children:`Error code`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`invalid_wallet`}),`, `,_jsx(_components.code,{children:`invalid_max_trades`}),`, `,_jsx(_components.code,{children:`invalid_history`}),`, `,_jsx(_components.code,{children:`invalid_period`}),`, `,_jsx(_components.code,{children:`invalid_timestamp`}),`, `,_jsx(_components.code,{children:`invalid_window`}),`, `,_jsx(_components.code,{children:`duplicate_parameter`}),`, `,_jsx(_components.code,{children:`unknown_parameter`})]}),_jsx(_components.td,{children:`Invalid input. Trade-detail flags remain unsupported.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`activity_limit_exceeded`})}),_jsx(_components.td,{children:`More than 100,000 settlement events fall in the selected window. No partial financial total is returned.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`unsupported_accounting_data`}),`, `,_jsx(_components.code,{children:`query_work_limit`})]}),_jsx(_components.td,{children:`Unsupported accounting inputs or calculation work limit reached. No partial total is returned.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`history_limit_exceeded`})}),_jsx(_components.td,{children:`More than 500,000 fills are required for full history. No partial total is returned.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`503`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`server_busy`}),`, `,_jsx(_components.code,{children:`database_unavailable`})]}),_jsx(_components.td,{children:`Capacity or data access is temporarily unavailable.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`504`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`query_timeout`})}),_jsx(_components.td,{children:`The calculation or queue deadline was exceeded.`})]})]})]}),`\n`,_jsx(_components.p,{children:`Authentication, plan access, monthly usage, and account rate-limit failures use the normal V3 edge responses. Do not treat an error as zero PnL.`}),`\n`,_jsx(Heading,{level:`2`,id:`migrating-from-v2`,children:`Migrating from V2`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`GET /v3/wallets/{address}/copy-pnl`}),` or `,_jsx(_components.a,{href:`/data/wallets/copy-pnl-batch`,children:`V3 Copy PnL Batch`}),`. Read the summary from `,_jsx(_components.code,{children:`data`}),`; batch input uses `,_jsx(_components.code,{children:`wallets`}),` instead of `,_jsx(_components.code,{children:`addresses`}),`. `,_jsx(_components.code,{children:`period`}),`, `,_jsx(_components.code,{children:`from`}),`, and `,_jsx(_components.code,{children:`to`}),` are supported. V2 defaulted to 30 days; send `,_jsx(_components.code,{children:`period=30d`}),` explicitly to request that window in V3. Use `,_jsx(_components.code,{children:`history=full`}),` when the whole requested window is required, or `,_jsx(_components.code,{children:`auto`}),` when an explicit recent-window fallback is acceptable.`]}),`\n`,_jsxs(_components.p,{children:[`Read actual lifetime realized PnL from `,_jsx(_components.code,{children:`realized_pnl_context.total_realized_pnl_usdc`}),`, with the scope and freshness limitations above. This does not restore V2’s window-specific weighted-average position metrics. `,_jsx(_components.code,{children:`include_trades`}),`, individual trade arrays, weighted entry/holding metrics, and V2’s BYOB tracked-wallet pool, snapshot, and leaderboard remain outside these endpoints.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Copy PnL","openapi":"GET /v3/wallets/{address}/copy-pnl","description":"Estimate copying slippage with date filters, optional full history, and lifetime realized-PnL context.","href":"/data/wallets/copy-pnl"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request","slug":"request","depth":2,"children":[]},{"title":"History modes","slug":"history-modes","depth":2,"children":[]},{"title":"Calculation","slug":"calculation","depth":2,"children":[]},{"title":"Realized-PnL context","slug":"realized-pnl-context","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Access and errors","slug":"access-and-errors","depth":2,"children":[]},{"title":"Migrating from V2","slug":"migrating-from-v2","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/polynode/0d40c5db9faacad8/slug-calculator.js"],"openApiReferenceData":{"operation":{"summary":"Copy PnL","operationId":"getV3CopyPnl","tags":["V3 Copy PnL"],"description":"Estimate copying slippage with date filters, optional full history, and lifetime realized-PnL context.","parameters":["bfc2c710-5b46-4af2-9b77-30104ab9f117","33ebcecf-211a-418d-aaa6-366c823d60eb","daf6ec44-ef39-4899-a6a7-6347cdc918a6","189baabb-771a-4c9b-9cd2-6fbf6287c01e","e901346d-2d02-406a-a588-08021add5b75","0d0cbf26-3367-49b5-a71e-fbabb32cdc7f"],"responses":{"200":"7822c4ed-9fef-4b6d-b942-b16607485255","400":"347fd4bf-14d4-4a9f-9eb2-7ed3969d0b6a","422":"3466dd75-3c0f-480f-9af2-21ebf16eddca","503":"bd16b7ce-5a87-4f11-93b4-1357a0ac83f4","504":"a9ffa585-5074-4e5c-a335-3f48ce7df5b6"},"method":"get","type":"path","servers":["509b9636-8ccf-4ece-bfc3-51e4d357e7ee"],"security":["59b9af09-131b-4e28-9460-5edee0526e6c"],"path":"/v3/wallets/{address}/copy-pnl","baseUrlOptions":["https://api.polynode.dev"],"title":"Copy PnL","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"bfc2c710-5b46-4af2-9b77-30104ab9f117":{"name":"address","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"33ebcecf-211a-418d-aaa6-366c823d60eb":{"name":"max_trades","in":"query","schema":{"type":"integer","minimum":1,"maximum":50000,"default":50000,"description":"Recent/fallback fill cap per wallet; initial scan size in full mode. Auto/full may return more fills, up to the 500000-fill work limit.","uniqueKey":"","typeLabel":"integer"},"description":"Recent/fallback fill cap per wallet; initial scan size in full mode. Auto/full may return more fills, up to the 500000-fill work limit."},"daf6ec44-ef39-4899-a6a7-6347cdc918a6":{"name":"history","in":"query","schema":{"type":"string","enum":["recent","auto","full"],"default":"recent","description":"recent keeps the cap; auto attempts full history with an explicit recent fallback; full requires complete matching history or returns an error.","uniqueKey":"","typeLabel":"enum\u003cstring>"},"description":"recent keeps the cap; auto attempts full history with an explicit recent fallback; full requires complete matching history or returns an error."},"189baabb-771a-4c9b-9cd2-6fbf6287c01e":{"name":"period","in":"query","schema":{"type":"string","enum":["7d","14d","30d","60d","90d","180d"],"description":"Optional window ending at to or the calculation snapshot. No default period. Explicit from overrides period.","uniqueKey":"","typeLabel":"enum\u003cstring>"},"description":"Optional window ending at to or the calculation snapshot. No default period. Explicit from overrides period."},"e901346d-2d02-406a-a588-08021add5b75":{"name":"from","in":"query","schema":{"oneOf":[{"type":"integer","maximum":253402300799,"minimum":0,"description":"Inclusive start: Unix seconds or YYYY-MM-DD at UTC midnight. Applies to fills and settlement events, not lifetime realized-PnL context.","uniqueKey":"oneOf.0","typeLabel":"integer"},{"type":"string","pattern":"^(\\d+|\\d{4}-\\d{2}-\\d{2})$","description":"Inclusive start: Unix seconds or YYYY-MM-DD at UTC midnight. Applies to fills and settlement events, not lifetime realized-PnL context.","uniqueKey":"oneOf.1","typeLabel":"string"}],"uniqueKey":"","typeLabel":"integer | string"},"description":"Inclusive start: Unix seconds or YYYY-MM-DD at UTC midnight. Applies to fills and settlement events, not lifetime realized-PnL context."},"0d0cbf26-3367-49b5-a71e-fbabb32cdc7f":{"name":"to","in":"query","schema":{"oneOf":[{"type":"integer","maximum":253402300799,"minimum":0,"description":"Exclusive end: Unix seconds or YYYY-MM-DD at UTC midnight. Defaults to the calculation snapshot.","uniqueKey":"oneOf.0","typeLabel":"integer"},{"type":"string","pattern":"^(\\d+|\\d{4}-\\d{2}-\\d{2})$","description":"Exclusive end: Unix seconds or YYYY-MM-DD at UTC midnight. Defaults to the calculation snapshot.","uniqueKey":"oneOf.1","typeLabel":"string"}],"uniqueKey":"","typeLabel":"integer | string"},"description":"Exclusive end: Unix seconds or YYYY-MM-DD at UTC midnight. Defaults to the calculation snapshot."}},"responses":{"7822c4ed-9fef-4b6d-b942-b16607485255":{"description":"Complete bounded wallet calculation","content":{"application/json":{"schema":{"type":"object","required":["data","cache","elapsed_ms"],"properties":{"data":{"type":"object","properties":{"wallet":{"type":"string","isRequired":true,"uniqueKey":"data.wallet","typeLabel":"string"},"actual_pnl_usdc":{"type":"string","isRequired":true,"uniqueKey":"data.actual_pnl_usdc","typeLabel":"string"},"backtest_copy_pnl_usdc":{"type":"string","isRequired":true,"uniqueKey":"data.backtest_copy_pnl_usdc","typeLabel":"string"},"slippage_amount_usdc":{"type":"string","isRequired":true,"uniqueKey":"data.slippage_amount_usdc","typeLabel":"string"},"slippage_cost_rate_pct":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.slippage_cost_rate_pct.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.slippage_cost_rate_pct.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.slippage_cost_rate_pct","typeLabel":"string | null"},"toxic_for_copying":{"oneOf":[{"type":"boolean","isRequired":true,"uniqueKey":"data.toxic_for_copying.oneOf.0","typeLabel":"boolean"},{"type":"null","isRequired":true,"uniqueKey":"data.toxic_for_copying.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.toxic_for_copying","typeLabel":"boolean | null"},"trade_count":{"type":"integer","minimum":0,"maximum":500000,"isRequired":true,"uniqueKey":"data.trade_count","typeLabel":"integer"},"pnl_definition":{"type":"string","isRequired":true,"uniqueKey":"data.pnl_definition","typeLabel":"string"},"fees_included":{"type":"boolean","isRequired":true,"uniqueKey":"data.fees_included","typeLabel":"boolean"},"opening_inventory_valued":{"type":"boolean","isRequired":true,"uniqueKey":"data.opening_inventory_valued","typeLabel":"boolean"},"open_positions_marked_to_market":{"type":"boolean","isRequired":true,"uniqueKey":"data.open_positions_marked_to_market","typeLabel":"boolean"},"slippage_bps":{"type":"object","properties":{"buy":{"type":"integer","isRequired":true,"uniqueKey":"data.slippage_bps.buy","typeLabel":"integer"},"sell":{"type":"integer","isRequired":true,"uniqueKey":"data.slippage_bps.sell","typeLabel":"integer"},"buy_price_capped_at":{"type":"string","isRequired":true,"uniqueKey":"data.slippage_bps.buy_price_capped_at","typeLabel":"string"}},"required":["buy","sell","buy_price_capped_at"],"isRequired":true,"uniqueKey":"data.slippage_bps","typeLabel":"object"},"cashflows":{"type":"object","properties":{"buy_cost_usdc":{"type":"string","isRequired":true,"uniqueKey":"data.cashflows.buy_cost_usdc","typeLabel":"string"},"sell_revenue_usdc":{"type":"string","isRequired":true,"uniqueKey":"data.cashflows.sell_revenue_usdc","typeLabel":"string"},"settlement_in_usdc":{"type":"string","isRequired":true,"uniqueKey":"data.cashflows.settlement_in_usdc","typeLabel":"string"},"settlement_out_usdc":{"type":"string","isRequired":true,"uniqueKey":"data.cashflows.settlement_out_usdc","typeLabel":"string"}},"required":["buy_cost_usdc","sell_revenue_usdc","settlement_in_usdc","settlement_out_usdc"],"isRequired":true,"uniqueKey":"data.cashflows","typeLabel":"object"},"event_counts":{"type":"object","properties":{"buys":{"type":"integer","isRequired":true,"uniqueKey":"data.event_counts.buys","typeLabel":"integer"},"sells":{"type":"integer","isRequired":true,"uniqueKey":"data.event_counts.sells","typeLabel":"integer"},"splits":{"type":"integer","isRequired":true,"uniqueKey":"data.event_counts.splits","typeLabel":"integer"},"merges":{"type":"integer","isRequired":true,"uniqueKey":"data.event_counts.merges","typeLabel":"integer"},"redemptions":{"type":"integer","isRequired":true,"uniqueKey":"data.event_counts.redemptions","typeLabel":"integer"},"neg_risk_conversions":{"type":"integer","isRequired":true,"uniqueKey":"data.event_counts.neg_risk_conversions","typeLabel":"integer"}},"required":["buys","sells","splits","merges","redemptions","neg_risk_conversions"],"isRequired":true,"uniqueKey":"data.event_counts","typeLabel":"object"},"coverage":{"type":"object","properties":{"selection":{"type":"string","isRequired":true,"uniqueKey":"data.coverage.selection","typeLabel":"string"},"max_trades":{"type":"integer","minimum":1,"maximum":50000,"isRequired":true,"uniqueKey":"data.coverage.max_trades","typeLabel":"integer"},"history_truncated":{"type":"boolean","isRequired":true,"uniqueKey":"data.coverage.history_truncated","typeLabel":"boolean"},"window_start":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"const":"beginning_of_indexed_history","isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.0.type","typeLabel":"any"}},"isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.0","typeLabel":"object"},{"type":"object","required":["type","block_number","log_index","timestamp"],"properties":{"type":{"const":"inclusive_trade_cursor","isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.1.type","typeLabel":"any"},"block_number":{"type":"string","isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.1.block_number","typeLabel":"string"},"log_index":{"type":"string","isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.1.log_index","typeLabel":"string"},"timestamp":{"type":"number","isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.1.timestamp","typeLabel":"number"}},"isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.1","typeLabel":"object"},{"type":"object","required":["type","timestamp"],"properties":{"type":{"const":"inclusive_timestamp","isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.2.type","typeLabel":"any"},"timestamp":{"type":"integer","isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.2.timestamp","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"data.coverage.window_start.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"data.coverage.window_start","typeLabel":"object"},"first_included_event_timestamp":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"data.coverage.first_included_event_timestamp.oneOf.0","typeLabel":"number"},{"type":"null","isRequired":true,"uniqueKey":"data.coverage.first_included_event_timestamp.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.coverage.first_included_event_timestamp","typeLabel":"number | null"},"last_included_event_timestamp":{"oneOf":[{"type":"number","isRequired":true,"uniqueKey":"data.coverage.last_included_event_timestamp.oneOf.0","typeLabel":"number"},{"type":"null","isRequired":true,"uniqueKey":"data.coverage.last_included_event_timestamp.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.coverage.last_included_event_timestamp","typeLabel":"number | null"},"snapshot_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.coverage.snapshot_at","typeLabel":"string\u003cdate-time>"},"requested_history":{"type":"string","enum":["recent","auto","full"],"isRequired":true,"uniqueKey":"data.coverage.requested_history","typeLabel":"enum\u003cstring>"},"served_history":{"type":"string","enum":["recent","full"],"description":"Full means all indexed events matching the requested dates, not necessarily lifetime history.","isRequired":true,"uniqueKey":"data.coverage.served_history","typeLabel":"enum\u003cstring>"},"fallback_reason":{"oneOf":[{"type":"string","enum":[null,"query_timeout","query_work_limit","activity_limit_exceeded","history_limit_exceeded"],"isRequired":true,"uniqueKey":"data.coverage.fallback_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":[null,"query_timeout","query_work_limit","activity_limit_exceeded","history_limit_exceeded"],"isRequired":true,"uniqueKey":"data.coverage.fallback_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.coverage.fallback_reason","typeLabel":"enum\u003cstring> | null"},"lifetime_history_included":{"type":"boolean","isRequired":true,"uniqueKey":"data.coverage.lifetime_history_included","typeLabel":"boolean"},"window_end":{"oneOf":[{"type":"object","required":["type","timestamp"],"properties":{"type":{"const":"exclusive_timestamp","isRequired":true,"uniqueKey":"data.coverage.window_end.oneOf.0.type","typeLabel":"any"},"timestamp":{"type":"integer","isRequired":true,"uniqueKey":"data.coverage.window_end.oneOf.0.timestamp","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"data.coverage.window_end.oneOf.0","typeLabel":"object"},{"type":"object","required":["type","snapshot_at"],"properties":{"type":{"const":"database_snapshot","isRequired":true,"uniqueKey":"data.coverage.window_end.oneOf.1.type","typeLabel":"any"},"snapshot_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.coverage.window_end.oneOf.1.snapshot_at","typeLabel":"string\u003cdate-time>"}},"isRequired":true,"uniqueKey":"data.coverage.window_end.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"data.coverage.window_end","typeLabel":"object"}},"required":["selection","max_trades","history_truncated","window_start","first_included_event_timestamp","last_included_event_timestamp","snapshot_at","requested_history","served_history","fallback_reason","lifetime_history_included","window_end"],"isRequired":true,"uniqueKey":"data.coverage","typeLabel":"object"},"query_ms":{"type":"integer","isRequired":true,"uniqueKey":"data.query_ms","typeLabel":"integer"},"realized_pnl_context":{"type":"object","properties":{"available":{"type":"boolean","isRequired":true,"uniqueKey":"data.realized_pnl_context.available","typeLabel":"boolean"},"scope":{"const":"lifetime_wallet","isRequired":true,"uniqueKey":"data.realized_pnl_context.scope","typeLabel":"any"},"date_filters_applied":{"const":false,"isRequired":true,"uniqueKey":"data.realized_pnl_context.date_filters_applied","typeLabel":"any"},"source":{"const":"api.wallet_pnl_current","isRequired":true,"uniqueKey":"data.realized_pnl_context.source","typeLabel":"any"},"pnl_definition":{"const":"realized","isRequired":true,"uniqueKey":"data.realized_pnl_context.pnl_definition","typeLabel":"any"},"total_realized_pnl_usdc":{"oneOf":[{"type":"string","description":"Actual lifetime realized profit as stored at the recorded update; not filtered by from/to and not used in the slippage score.","isRequired":true,"uniqueKey":"data.realized_pnl_context.total_realized_pnl_usdc.oneOf.0","typeLabel":"string"},{"type":"null","description":"Actual lifetime realized profit as stored at the recorded update; not filtered by from/to and not used in the slippage score.","isRequired":true,"uniqueKey":"data.realized_pnl_context.total_realized_pnl_usdc.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.realized_pnl_context.total_realized_pnl_usdc","typeLabel":"string | null"},"position_count":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.realized_pnl_context.position_count.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.realized_pnl_context.position_count.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.realized_pnl_context.position_count","typeLabel":"integer | null"},"open_positions":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.realized_pnl_context.open_positions.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.realized_pnl_context.open_positions.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.realized_pnl_context.open_positions","typeLabel":"integer | null"},"updated_block":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.realized_pnl_context.updated_block.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.realized_pnl_context.updated_block.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.realized_pnl_context.updated_block","typeLabel":"string | null"},"updated_at":{"oneOf":[{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.realized_pnl_context.updated_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","isRequired":true,"uniqueKey":"data.realized_pnl_context.updated_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.realized_pnl_context.updated_at","typeLabel":"string\u003cdate-time> | null"},"refresh_age_seconds":{"oneOf":[{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"data.realized_pnl_context.refresh_age_seconds.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":0,"isRequired":true,"uniqueKey":"data.realized_pnl_context.refresh_age_seconds.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.realized_pnl_context.refresh_age_seconds","typeLabel":"integer | null"},"latest_indexed_fill_block":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.realized_pnl_context.latest_indexed_fill_block.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.realized_pnl_context.latest_indexed_fill_block.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.realized_pnl_context.latest_indexed_fill_block","typeLabel":"string | null"},"freshness":{"type":"string","enum":["behind_indexed_fills","no_newer_indexed_fills","unknown","unavailable"],"description":"Compares summary update block with latest indexed fill. Does not certify settlement/valuation freshness.","isRequired":true,"uniqueKey":"data.realized_pnl_context.freshness","typeLabel":"enum\u003cstring>"}},"required":["available","scope","date_filters_applied","source","pnl_definition","total_realized_pnl_usdc","position_count","open_positions","updated_block","updated_at","refresh_age_seconds","latest_indexed_fill_block","freshness"],"isRequired":true,"uniqueKey":"data.realized_pnl_context","typeLabel":"object"},"applied_filters":{"type":"object","properties":{"period":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"data.applied_filters.period.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"data.applied_filters.period.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.applied_filters.period","typeLabel":"string | null"},"from":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"data.applied_filters.from.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"data.applied_filters.from.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.applied_filters.from","typeLabel":"integer | null"},"to":{"type":"integer","isRequired":true,"uniqueKey":"data.applied_filters.to","typeLabel":"integer"}},"required":["period","from","to"],"isRequired":true,"uniqueKey":"data.applied_filters","typeLabel":"object"}},"required":["wallet","actual_pnl_usdc","backtest_copy_pnl_usdc","slippage_amount_usdc","slippage_cost_rate_pct","toxic_for_copying","trade_count","pnl_definition","fees_included","opening_inventory_valued","open_positions_marked_to_market","slippage_bps","cashflows","event_counts","coverage","query_ms","realized_pnl_context","applied_filters"],"isRequired":true,"uniqueKey":"data","typeLabel":"object"},"cache":{"type":"object","required":["status","age_ms"],"properties":{"status":{"type":"string","enum":["hit","miss","coalesced"],"isRequired":true,"uniqueKey":"cache.status","typeLabel":"enum\u003cstring>"},"age_ms":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"cache.age_ms","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"cache","typeLabel":"object"},"elapsed_ms":{"type":"integer","isRequired":true,"uniqueKey":"elapsed_ms","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"example":{"data":{"wallet":"0x1111111111111111111111111111111111111111","actual_pnl_usdc":"3.000000","backtest_copy_pnl_usdc":"2.740000","slippage_amount_usdc":"0.260000","slippage_cost_rate_pct":"8.666667","toxic_for_copying":false,"trade_count":2,"pnl_definition":"cashflow","fees_included":false,"opening_inventory_valued":false,"open_positions_marked_to_market":false,"slippage_bps":{"buy":200,"sell":200,"buy_price_capped_at":"1.000000"},"cashflows":{"buy_cost_usdc":"5.000000","sell_revenue_usdc":"8.000000","settlement_in_usdc":"0.000000","settlement_out_usdc":"0.000000"},"event_counts":{"buys":1,"sells":1,"splits":0,"merges":0,"redemptions":0,"neg_risk_conversions":0},"coverage":{"selection":"latest_wallet_order_fills","max_trades":50000,"history_truncated":false,"requested_history":"recent","served_history":"full","fallback_reason":null,"lifetime_history_included":true,"window_start":{"type":"beginning_of_indexed_history"},"window_end":{"type":"database_snapshot","snapshot_at":"2026-09-07T01:00:00.000Z"},"first_included_event_timestamp":1788652800,"last_included_event_timestamp":1788739200,"snapshot_at":"2026-09-07T01:00:00.000Z"},"applied_filters":{"period":null,"from":null,"to":1788742800},"realized_pnl_context":{"available":true,"scope":"lifetime_wallet","date_filters_applied":false,"source":"api.wallet_pnl_current","pnl_definition":"realized","total_realized_pnl_usdc":"3.000000","position_count":1,"open_positions":0,"updated_block":"93350000","updated_at":"2026-09-07T00:59:00Z","refresh_age_seconds":60,"latest_indexed_fill_block":"93350000","freshness":"no_newer_indexed_fills"},"query_ms":800},"cache":{"status":"miss","age_ms":800},"elapsed_ms":805},"examples":{"Example":{"title":"Example","value":{"data":{"wallet":"0x1111111111111111111111111111111111111111","actual_pnl_usdc":"3.000000","backtest_copy_pnl_usdc":"2.740000","slippage_amount_usdc":"0.260000","slippage_cost_rate_pct":"8.666667","toxic_for_copying":false,"trade_count":2,"pnl_definition":"cashflow","fees_included":false,"opening_inventory_valued":false,"open_positions_marked_to_market":false,"slippage_bps":{"buy":200,"sell":200,"buy_price_capped_at":"1.000000"},"cashflows":{"buy_cost_usdc":"5.000000","sell_revenue_usdc":"8.000000","settlement_in_usdc":"0.000000","settlement_out_usdc":"0.000000"},"event_counts":{"buys":1,"sells":1,"splits":0,"merges":0,"redemptions":0,"neg_risk_conversions":0},"coverage":{"selection":"latest_wallet_order_fills","max_trades":50000,"history_truncated":false,"requested_history":"recent","served_history":"full","fallback_reason":null,"lifetime_history_included":true,"window_start":{"type":"beginning_of_indexed_history"},"window_end":{"type":"database_snapshot","snapshot_at":"2026-09-07T01:00:00.000Z"},"first_included_event_timestamp":1788652800,"last_included_event_timestamp":1788739200,"snapshot_at":"2026-09-07T01:00:00.000Z"},"applied_filters":{"period":null,"from":null,"to":1788742800},"realized_pnl_context":{"available":true,"scope":"lifetime_wallet","date_filters_applied":false,"source":"api.wallet_pnl_current","pnl_definition":"realized","total_realized_pnl_usdc":"3.000000","position_count":1,"open_positions":0,"updated_block":"93350000","updated_at":"2026-09-07T00:59:00Z","refresh_age_seconds":60,"latest_indexed_fill_block":"93350000","freshness":"no_newer_indexed_fills"},"query_ms":800},"cache":{"status":"miss","age_ms":800},"elapsed_ms":805}}},"exampleType":"examples"}},"exampleType":"examples"},"347fd4bf-14d4-4a9f-9eb2-7ed3969d0b6a":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"3466dd75-3c0f-480f-9af2-21ebf16eddca":{"description":"Accounting or work limit; no partial total","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"bd16b7ce-5a87-4f11-93b4-1357a0ac83f4":{"description":"Temporarily unavailable or busy","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"a9ffa585-5074-4e5c-a335-3f48ce7df5b6":{"description":"Calculation or queue deadline exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"59b9af09-131b-4e28-9460-5edee0526e6c":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"api_key"}}},"servers":{"509b9636-8ccf-4ece-bfc3-51e4d357e7ee":{"url":"https://api.polynode.dev","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"api_key"},"schema":{"title":"x-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"api_key","name":"x-api-key"}],"title":"api_key"}]},"originalFileLocation":"openapi.json"},"subdomain":"polynode","siteName":"PolyNode","title":"Copy PnL - PolyNode","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-07T04:09:49.833Z","originalFileLocation":"data/wallets/copy-pnl.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Estimate copying slippage with date filters, optional full history, and lifetime realized-PnL context.\">\u003cmeta data-mint-head name=\"application-name\" content=\"PolyNode\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Copy PnL - PolyNode\">\u003cmeta data-mint-head property=\"og:description\" content=\"Estimate copying slippage with date filters, optional full history, and lifetime realized-PnL context.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PolyNode\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.polynode.dev/data/wallets/copy-pnl\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://polynode.mintlify.app/_mintlify/api/og/v2?division=Wallet+Activity\u0026amp;title=Copy+PnL\u0026amp;description=Estimate+copying+slippage+with+date+filters%2C+optional+full+history%2C+and+lifetime+realized-PnL+context.\u0026amp;theme=9068a4359a136d170ef1e1e8\u0026amp;signature=fa67faa9b6ffb8a4afb8f9c7ace27bdcd7bcee5771658aabc6585629f6beed49\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Copy PnL - PolyNode\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Estimate copying slippage with date filters, optional full history, and lifetime realized-PnL context.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://polynode.mintlify.app/_mintlify/api/og/v2?division=Wallet+Activity\u0026amp;title=Copy+PnL\u0026amp;description=Estimate+copying+slippage+with+date+filters%2C+optional+full+history%2C+and+lifetime+realized-PnL+context.\u0026amp;theme=9068a4359a136d170ef1e1e8\u0026amp;signature=fa67faa9b6ffb8a4afb8f9c7ace27bdcd7bcee5771658aabc6585629f6beed49\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/polynode/nh0EcUVk_uYhjcGA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PolyNode\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3b82f6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.polynode.dev/data/wallets/copy-pnl\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/data/wallets/copy-pnl.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.polynode.dev/#organization\",\"name\":\"PolyNode\",\"url\":\"https://docs.polynode.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/polynode/zluszUOhqmSDk1RK/images/logo-light.png?fit=max\u0026auto=format\u0026n=zluszUOhqmSDk1RK\u0026q=85\u0026s=fc49b798da5a361cb76f4733f13230dd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.polynode.dev#website\",\"name\":\"PolyNode\",\"url\":\"https://docs.polynode.dev\",\"publisher\":{\"@id\":\"https://docs.polynode.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.polynode.dev/data/wallets/copy-pnl#webpage\",\"url\":\"https://docs.polynode.dev/data/wallets/copy-pnl\",\"name\":\"Copy PnL\",\"description\":\"Estimate copying slippage with date filters, optional full history, and lifetime realized-PnL context.\",\"dateModified\":\"2026-09-07T04:09:49.833Z\",\"isPartOf\":{\"@id\":\"https://docs.polynode.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.polynode.dev/data/wallets/copy-pnl#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.polynode.dev/data/wallets/copy-pnl#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Wallet Activity\",\"item\":\"https://docs.polynode.dev/data/wallets/trades\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Copy PnL\",\"item\":\"https://docs.polynode.dev/data/wallets/copy-pnl\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.polynode.dev/data/wallets/copy-pnl#apireference\",\"headline\":\"Copy PnL\",\"name\":\"Copy PnL\",\"description\":\"Estimate copying slippage with date filters, optional full history, and lifetime realized-PnL context.\",\"url\":\"https://docs.polynode.dev/data/wallets/copy-pnl\",\"mainEntityOfPage\":{\"@id\":\"https://docs.polynode.dev/data/wallets/copy-pnl#webpage\"},\"dateModified\":\"2026-09-07T04:09:49.833Z\",\"publisher\":{\"@id\":\"https://docs.polynode.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.polynode.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"PolyNode\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"PolyNode","nav":{"global":null,"tabs":[{"tab":"WebSocket","pages":[{"title":"WebSocket","href":"/websocket/overview"}]},{"tab":"Webhooks","pages":[{"title":"Webhooks","href":"/webhooks/overview"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"group":"V3 Data API","pages":[{"title":"API Overview","href":"/data/overview"}]},{"group":"Query Catalog","root":{"title":"Query Catalog","href":"/data/query-catalog/overview"},"tag":"Start Here","pages":[{"title":"Trades Query Catalog","href":"/data/query-catalog/trades"},{"title":"All Trades","href":"/data/query-catalog/trades/all-trades"},{"title":"Trades by Wallet","href":"/data/query-catalog/trades/by-wallet"},{"title":"Trades by Order Hash","href":"/data/query-catalog/trades/by-order-hash"},{"title":"Trades by Market Token","href":"/data/query-catalog/trades/by-market-token"},{"title":"Trades by Market Slug","href":"/data/query-catalog/trades/by-market-slug"},{"title":"Wallet Trades by Condition","href":"/data/query-catalog/trades/wallet-by-condition"},{"title":"Wallet Trades Grouped by Order","href":"/data/query-catalog/trades/wallet-grouped-by-order"},{"title":"Builder Trades","href":"/data/query-catalog/trades/by-builder"},{"title":"Combo Wallet Trades","href":"/data/query-catalog/trades/combo-wallet-trades"},{"title":"Positions Query Catalog","href":"/data/query-catalog/positions"},{"title":"Positions by Wallet","href":"/data/query-catalog/positions/by-wallet"},{"title":"Open Wallet Positions","href":"/data/query-catalog/positions/open-wallet-positions"},{"title":"Global Positions","href":"/data/query-catalog/positions/global-positions"},{"title":"Positions by Market Token","href":"/data/query-catalog/positions/by-market-token"},{"title":"Positions by Condition","href":"/data/query-catalog/positions/by-condition"},{"title":"Positions by Market Slug","href":"/data/query-catalog/positions/by-market-slug"},{"title":"Combo Positions","href":"/data/query-catalog/positions/combo-positions"},{"title":"P\u0026L Query Catalog","href":"/data/query-catalog/pnl"},{"title":"Wallet All-Time P\u0026L","href":"/data/query-catalog/pnl/wallet-all-time"},{"title":"Wallet Time-Windowed P\u0026L","href":"/data/query-catalog/pnl/wallet-time-window"},{"title":"Wallet P\u0026L by Tag","href":"/data/query-catalog/pnl/wallet-by-tag"},{"title":"Wallet P\u0026L by Market","href":"/data/query-catalog/pnl/wallet-by-market"},{"title":"Wallet P\u0026L Events","href":"/data/query-catalog/pnl/wallet-events"},{"title":"Batch Wallet P\u0026L","href":"/data/query-catalog/pnl/batch-wallet-pnl"},{"title":"Global P\u0026L Leaderboard","href":"/data/query-catalog/pnl/global-leaderboard"},{"title":"Tag P\u0026L Leaderboard","href":"/data/query-catalog/pnl/tag-leaderboard"},{"title":"Markets Query Catalog","href":"/data/query-catalog/markets"},{"title":"Search Markets","href":"/data/query-catalog/markets/search-markets"},{"title":"Market by Condition","href":"/data/query-catalog/markets/by-condition"},{"title":"Condition Detail","href":"/data/query-catalog/markets/condition-detail"},{"title":"Trades and Positions by Slug","href":"/data/query-catalog/markets/by-slug"},{"title":"Token Info","href":"/data/query-catalog/markets/token-info"},{"title":"Token Price","href":"/data/query-catalog/markets/token-price"},{"title":"Market Candles","href":"/data/query-catalog/markets/candles"},{"title":"Tags and Markets by Tag","href":"/data/query-catalog/markets/tags"},{"title":"Market Resolutions","href":"/data/query-catalog/markets/resolutions"},{"title":"Wallet Activity Query Catalog","href":"/data/query-catalog/wallet-activity"},{"title":"Unified Wallet Activity","href":"/data/query-catalog/wallets/unified-activity"},{"title":"Wallet Splits","href":"/data/query-catalog/wallets/splits"},{"title":"Wallet Merges","href":"/data/query-catalog/wallets/merges"},{"title":"Wallet Redemptions","href":"/data/query-catalog/wallets/redemptions"},{"title":"Neg-Risk Conversions","href":"/data/query-catalog/wallets/neg-risk-conversions"},{"title":"PolyUSD Flows","href":"/data/query-catalog/wallets/polyusd-flows"},{"title":"Wallet Fees Paid","href":"/data/query-catalog/wallets/fees-paid"},{"title":"Wallet Rebates and Rewards","href":"/data/query-catalog/wallets/rebates-rewards"},{"title":"Builders Query Catalog","href":"/data/query-catalog/builders"},{"title":"Builder Leaderboard","href":"/data/query-catalog/builders/leaderboard"},{"title":"Builder Detail","href":"/data/query-catalog/builders/detail"},{"title":"Builder Trader Leaderboard","href":"/data/query-catalog/builders/trader-leaderboard"},{"title":"Builder Daily Activity","href":"/data/query-catalog/builders/daily-activity"},{"title":"Compare Builder Daily Activity","href":"/data/query-catalog/builders/activity-comparison"},{"title":"Builder Trades","href":"/data/query-catalog/builders/trades"},{"title":"Builder Trades by Market","href":"/data/query-catalog/builders/trades-by-market"},{"title":"Builder Trades by Tag or Category","href":"/data/query-catalog/builders/trades-by-tag-category"},{"title":"Builder Trades by Side and Size","href":"/data/query-catalog/builders/trades-by-side-size"},{"title":"Tags and Categories Query Catalog","href":"/data/query-catalog/tags-categories"},{"title":"Combos Query Catalog","href":"/data/query-catalog/combos"},{"title":"Combo Markets","href":"/data/query-catalog/combos/markets"},{"title":"Combo Activity","href":"/data/query-catalog/combos/activity"},{"title":"Combo Redemptions","href":"/data/query-catalog/combos/redemptions"},{"title":"Wallet Combo Summary","href":"/data/query-catalog/combos/wallet-summary"},{"title":"Wallet Combo Positions","href":"/data/query-catalog/combos/wallet-positions"},{"title":"Wallet Combo Trades","href":"/data/query-catalog/combos/wallet-trades"},{"title":"Wallet Combo Activity","href":"/data/query-catalog/combos/wallet-activity"},{"title":"Wallet Combo Redemptions","href":"/data/query-catalog/combos/wallet-redemptions"},{"title":"Include Combos in Wallet Views","href":"/data/query-catalog/combos/include-combos"}]},{"group":"Wallet P\u0026L","pages":[{"title":"Resolve Wallet","openapi":"GET /v1/resolve/{query}","href":"/api-reference/wallets/resolve"},{"title":"Wallet Summary","openapi":"GET /v3/wallets/{address}","href":"/data/wallets/summary"},{"title":"Wallet P\u0026L","openapi":"GET /v3/wallets/{address}/pnl","href":"/data/wallets/pnl"},{"title":"Wallet P\u0026L Time Series","openapi":"GET /v3/wallets/{address}/pnl/events","href":"/data/wallets/pnl-events"},{"title":"Batch Wallet P\u0026L","openapi":"POST /v3/wallets/batch","href":"/data/wallets/batch"},{"title":"Wallet Positions","openapi":"GET /v3/wallets/{address}/positions","href":"/data/wallets/positions"}]},{"group":"Wallet Activity","pages":[{"title":"Wallet Trades","openapi":"GET /v3/wallets/{address}/trades","description":"Get all trades for a wallet with market context, computed price, direction, and order hash.","href":"/data/wallets/trades"},{"title":"Copy PnL","openapi":"GET /v3/wallets/{address}/copy-pnl","href":"/data/wallets/copy-pnl"},{"title":"Copy PnL Batch","openapi":"POST /v3/copy-pnl/batch","description":"Calculate copying-slippage cash flow for up to 100 wallets in one request.","href":"/data/wallets/copy-pnl-batch"},{"title":"Wallet Fees Paid","openapi":"GET /v3/wallets/{address}/fees-paid","href":"/data/wallets/fees-paid"},{"title":"Wallet PolyUSD Flows","openapi":"GET /v3/wallets/{address}/polyusd-flows","href":"/data/wallets/polyusd-flows"},{"title":"Wallet Maker Rebates","openapi":"GET /v3/wallets/{address}/rebates","href":"/data/wallets/rebates"},{"title":"Wallet Redemptions","openapi":"GET /v3/wallets/{address}/redemptions","href":"/data/wallets/redemptions"},{"title":"Wallet Splits","openapi":"GET /v3/wallets/{address}/splits","href":"/data/wallets/splits"},{"title":"Wallet Merges","openapi":"GET /v3/wallets/{address}/merges","href":"/data/wallets/merges"},{"title":"Wallet NRC","openapi":"GET /v3/wallets/{address}/nrc","href":"/data/wallets/nrc"},{"title":"Wallet Activity","openapi":"GET /v3/wallets/{address}/activity","href":"/data/wallets/activity"}]},{"group":"Credits","pages":[{"title":"Credits Overview","href":"/credits/overview"},{"title":"Liquidity Rewards","href":"/credits/rewards"},{"title":"Yield","href":"/credits/yield"},{"group":"Rebates","pages":[{"title":"Maker Rebates","href":"/credits/maker-rebates"},{"title":"Taker Rebates","href":"/credits/taker-rebates"}]},{"title":"Referral Rewards","href":"/credits/referral-rewards"},{"group":"Credits API Reference","pages":[{"title":"Wallet Credit Totals","openapi":"GET /v3/wallets/{addr}/credits/totals","href":"/credits/wallet-totals"},{"title":"Wallet Credit Events","openapi":"GET /v3/wallets/{addr}/credits","href":"/credits/wallet-events"},{"title":"Wallet Credit Series","openapi":"GET /v3/wallets/{addr}/credits/series","href":"/credits/wallet-series"},{"title":"Credits Leaderboard","openapi":"GET /v3/credits/leaderboard","href":"/credits/leaderboard"},{"title":"Global Credit Stats","openapi":"GET /v3/credits/stats","href":"/credits/stats"},{"title":"Global Credit Feed","openapi":"GET /v3/credits/events","href":"/credits/feed"},{"title":"Credit Distributors","openapi":"GET /v3/credits/distributors","href":"/credits/distributors"},{"title":"Decode Payout Transaction","openapi":"GET /v3/credits/txs/{hash}","href":"/credits/tx"},{"title":"Recipient Growth","openapi":"GET /v3/credits/recipients/stats","href":"/credits/recipients"}]}]},{"group":"Identity","pages":[{"title":"Batch Resolve","openapi":"POST /v3/identities/batch","href":"/identities/batch-resolve"},{"title":"Username Search","openapi":"GET /v3/identities/search","href":"/identities/search"},{"title":"Identity Lookup","openapi":"GET /v3/identities/{addr}","href":"/identities/lookup"}]},{"group":"Fees","pages":[{"title":"Fees Overview","href":"/data/fees/overview"},{"title":"Wallet Fees Paid","href":"/data/fees/wallet-fees-paid"},{"title":"Global Fee Events","href":"/data/fees/global-fees"},{"title":"Fees by Receiver","href":"/data/fees/fees-by-receiver"},{"title":"Builder Fees","href":"/data/fees/builder-fees"},{"title":"Maker Rebates","href":"/data/fees/maker-rebates"},{"title":"Reward Market Configs","href":"/data/fees/reward-market-configs"}]},{"group":"Combos","tag":"New","pages":[{"title":"Combos Overview","href":"/data/combos/overview"},{"title":"Combo Markets","openapi":"GET /v3/combos/markets","href":"/data/combos/markets"},{"title":"Combo Activity","openapi":"GET /v3/combos/activity","href":"/data/combos/activity"},{"title":"Combo Daily Activity","openapi":"GET /v3/combos/activity/daily","href":"/data/combos/daily-activity"},{"title":"Combo P\u0026L Leaderboard","openapi":"GET /v3/combos/leaderboard","href":"/data/combos/leaderboard"},{"title":"Combo Redemptions","openapi":"GET /v3/combos/redemptions","href":"/data/combos/redemptions"},{"title":"Wallet Combo Summary","openapi":"GET /v3/wallets/{address}/combos/summary","href":"/data/combos/wallet-summary"},{"title":"Wallet Combo Positions","openapi":"GET /v3/wallets/{address}/combos/positions","href":"/data/combos/wallet-positions"},{"title":"Wallet Combo Trades","openapi":"GET /v3/wallets/{address}/combos/trades","href":"/data/combos/wallet-trades"},{"title":"Wallet Combo Activity","openapi":"GET /v3/wallets/{address}/combos/activity","href":"/data/combos/wallet-activity"},{"title":"Wallet Combo Redemptions","openapi":"GET /v3/wallets/{address}/combos/redemptions","href":"/data/combos/wallet-redemptions"}]},{"group":"Rewards","pages":[{"title":"Reward Markets","openapi":"GET /v3/rewards/markets","href":"/data/rewards/markets"},{"title":"Reward Market Detail","openapi":"GET /v3/rewards/markets/{condition_id}","href":"/data/rewards/market"}]},{"group":"Markets \u0026 Search","pages":[{"title":"Market Catalog","openapi":"GET /v3/markets","href":"/data/markets/catalog"},{"title":"Market Catalog Stats","openapi":"GET /v3/markets/stats","href":"/data/markets/catalog-stats"},{"title":"Event Catalog","openapi":"GET /v3/events","href":"/data/events/catalog"},{"title":"Event Catalog Stats","openapi":"GET /v3/events/stats","href":"/data/events/catalog-stats"},{"title":"Search Markets","openapi":"GET /v3/markets/search","href":"/data/markets/search"},{"title":"Market by Condition","openapi":"GET /v3/markets/condition/{condition_id}","href":"/data/markets/by-condition"},{"title":"Market Positions (Condition)","openapi":"GET /v3/markets/condition/{condition_id}/positions","href":"/data/markets/condition-positions"},{"title":"Market Trades","openapi":"GET /v3/markets/{token_id}/trades","href":"/data/markets/trades"},{"title":"Market Positions (Token)","openapi":"GET /v3/markets/{token_id}/positions","href":"/data/markets/positions"},{"title":"Token Price","openapi":"GET /v3/markets/{token_id}/price","href":"/data/markets/price"},{"title":"Market Candles","href":"/data/markets/candles"},{"title":"Market by Slug","openapi":"GET /v3/markets/slug/{slug}/trades","href":"/data/markets/by-slug"}]},{"group":"Orderbook","pages":[{"title":"Order Book","openapi":"GET /v1/orderbook/{token_id}","href":"/api-reference/orderbook/order-book"},{"title":"Midpoint Price","openapi":"GET /v1/midpoint/{token_id}","href":"/api-reference/orderbook/midpoint"},{"title":"Bid-Ask Spread","openapi":"GET /v1/spread/{token_id}","href":"/api-reference/orderbook/spread"}]},{"group":"Leaderboard \u0026 Tags","pages":[{"title":"Leaderboard","openapi":"GET /v3/leaderboard","href":"/data/leaderboard/global"},{"title":"Leaderboard Scopes","openapi":"GET /v3/leaderboard/scopes","href":"/data/leaderboard/scopes"},{"title":"Tags","openapi":"GET /v3/tags","href":"/data/leaderboard/tags"},{"title":"Tag Markets","openapi":"GET /v3/tags/{slug}","href":"/data/leaderboard/tag-markets"},{"title":"Tag Leaderboard","openapi":"GET /v3/tags/{slug}/leaderboard","href":"/data/leaderboard/tag-leaderboard"}]},{"group":"Builders","pages":[{"title":"Builder Leaderboard","openapi":"GET /v3/builders","href":"/data/builders/list"},{"title":"Builder Detail","openapi":"GET /v3/builders/{code}","href":"/data/builders/detail"},{"title":"Builder Trader P\u0026L Leaderboard","openapi":"GET /v3/builders/{code}/leaderboard","href":"/data/builders/trader-leaderboard"},{"title":"Builder Daily Activity","href":"/data/builders/daily-activity"},{"title":"Compare Builder Daily Activity","href":"/data/builders/activity-comparison"},{"title":"Builder Trades","openapi":"GET /v3/builders/{code}/trades","href":"/data/builders/trades"}]},{"group":"Polymarket Profiles","tag":"Beta","pages":[{"title":"Polymarket Profiles","href":"/api-reference/polymarket-profiles/overview"},{"title":"Check Username Availability","openapi":"GET /v3/polymarket/profiles/username-available","href":"/api-reference/polymarket-profiles/username-available"},{"title":"Create Username Challenge","openapi":"POST /v3/polymarket/profiles/username/challenge","href":"/api-reference/polymarket-profiles/create-challenge"},{"title":"Complete Username Action","openapi":"POST /v3/polymarket/profiles/username/complete","href":"/api-reference/polymarket-profiles/complete-username"},{"title":"Get Public Profile","openapi":"GET /v3/polymarket/profiles/{address}","href":"/api-reference/polymarket-profiles/get-profile"}]},{"group":"Global","pages":[{"title":"Platform Stats","openapi":"GET /v3/stats","href":"/data/global/stats"},{"title":"Global Trades","openapi":"GET /v3/trades","href":"/data/global/trades"},{"title":"Global Positions","openapi":"GET /v3/positions","href":"/data/global/positions"},{"title":"Fee Events","openapi":"GET /v3/fees","href":"/data/global/fees"},{"title":"Market Resolutions","openapi":"GET /v3/resolutions","href":"/data/global/resolutions"},{"title":"Condition Detail","openapi":"GET /v3/conditions/{condition_id}","href":"/data/global/conditions"}]},{"group":"Tokens","pages":[{"title":"Token Info","openapi":"GET /v3/tokens/{token_id}","href":"/data/tokens/info"}]},{"group":"Perps","pages":[{"title":"Perps Overview","href":"/perps/overview"},{"title":"Quickstart","href":"/perps/quickstart"},{"title":"Wallet Mapping","href":"/perps/wallet-mapping"},{"title":"Rate Limits","href":"/perps/rate-limits"}]},{"group":"Perps Market Data","pages":[{"title":"Instruments","openapi":"GET /v3/perps/instruments","href":"/perps/market-data/instruments"},{"title":"Tickers","openapi":"GET /v3/perps/tickers/{instrument}","href":"/perps/market-data/tickers"},{"title":"Screener","openapi":"GET /v3/perps/screener","href":"/perps/market-data/screener"},{"title":"Best Bid/Offer","openapi":"GET /v3/perps/bbo/{instrument}","href":"/perps/market-data/bbo"},{"title":"Orderbook","openapi":"GET /v3/perps/book/{instrument}","href":"/perps/market-data/book"},{"title":"Trades","openapi":"GET /v3/perps/trades/{instrument}","href":"/perps/market-data/trades"},{"title":"24h Statistics","openapi":"GET /v3/perps/statistics/{instrument}","href":"/perps/market-data/statistics"},{"title":"Klines (OHLCV)","openapi":"GET /v3/perps/klines/{instrument}","href":"/perps/market-data/klines"},{"title":"Funding Rates","openapi":"GET /v3/perps/funding/{instrument}","href":"/perps/market-data/funding"},{"title":"Open Interest History","openapi":"GET /v3/perps/oi/{instrument}","href":"/perps/market-data/open-interest"},{"title":"Volume History","openapi":"GET /v3/perps/volume/{instrument}","href":"/perps/market-data/volume"},{"title":"Perps Daily Activity","openapi":"GET /v3/perps/activity/daily","href":"/perps/market-data/daily-activity"},{"title":"Fees \u0026 Exchange Meta","href":"/perps/market-data/meta"},{"title":"Basis History","openapi":"GET /v3/perps/basis/{instrument}","href":"/perps/market-data/basis"},{"title":"Trade Flow / CVD","openapi":"GET /v3/perps/flow/{instrument}","href":"/perps/market-data/flow"},{"title":"Cumulative Funding","openapi":"GET /v3/perps/funding-pnl/{instrument}","href":"/perps/market-data/funding-pnl"}]},{"group":"Perps Wallets","pages":[{"title":"Wallet Overview","openapi":"GET /v3/perps/wallets/{address}","href":"/perps/wallets/overview"},{"title":"Portfolio","openapi":"GET /v3/perps/wallets/{address}/portfolio","href":"/perps/wallets/portfolio"},{"title":"Registered","openapi":"GET /v3/perps/wallets/{address}/registered","href":"/perps/wallets/registered"},{"title":"Registered (batch)","openapi":"GET /v3/perps/wallets/registered","href":"/perps/wallets/batch-registered"},{"title":"Portfolios (batch)","openapi":"GET /v3/perps/wallets/portfolios","href":"/perps/wallets/batch-portfolios"}]},{"group":"Perps Analytics","pages":[{"title":"Perps Analytics","href":"/perps/analytics/overview"},{"title":"Whale Leaderboard","openapi":"GET /v3/perps/leaderboard","href":"/perps/analytics/leaderboard"},{"title":"Positioning","openapi":"GET /v3/perps/positioning/{instrument}","href":"/perps/analytics/positioning"},{"title":"Large Positions","openapi":"GET /v3/perps/positions/large","href":"/perps/analytics/large-positions"},{"title":"Position History","openapi":"GET /v3/perps/wallets/{address}/positions/history","href":"/perps/analytics/position-history"},{"title":"Smart Money","openapi":"GET /v3/perps/traders","href":"/perps/analytics/traders"},{"title":"Position Events","openapi":"GET /v3/perps/events","href":"/perps/analytics/events"},{"title":"Liquidations","openapi":"GET /v3/perps/liquidations","href":"/perps/analytics/liquidations"},{"title":"Coverage","openapi":"GET /v3/perps/coverage","href":"/perps/analytics/coverage"}]},{"group":"Perps On-Chain","pages":[{"title":"TVL \u0026 Collateral","openapi":"GET /v3/perps/tvl","href":"/perps/onchain/tvl"},{"title":"Top Depositors","openapi":"GET /v3/perps/depositors","href":"/perps/onchain/depositors"},{"title":"Top Withdrawers","openapi":"GET /v3/perps/withdrawers","href":"/perps/onchain/withdrawers"},{"title":"Deposits Feed","openapi":"GET /v3/perps/deposits","href":"/perps/onchain/deposits"},{"title":"Withdrawals Feed","openapi":"GET /v3/perps/withdrawals","href":"/perps/onchain/withdrawals"},{"title":"Wallet Flows","openapi":"GET /v3/perps/wallets/{address}/flows","href":"/perps/onchain/flows"}]},{"group":"Perps Streaming","pages":[{"title":"Perps WebSocket","href":"/perps/websocket/overview"},{"title":"Channels","href":"/perps/websocket/channels"}]},{"group":"Crypto","pages":[{"title":"Crypto Markets","openapi":"GET /v1/crypto/markets","href":"/api-reference/crypto/markets"},{"title":"Oracle Candles","openapi":"GET /v1/crypto/candles","href":"/api-reference/crypto/candles"},{"title":"Historical Price Ticks","openapi":"GET /v1/crypto/ticks","href":"/api-reference/crypto/ticks"},{"title":"Price to Beat","openapi":"GET /v1/crypto/price","href":"/api-reference/crypto/price"},{"title":"Active 5-Minute Markets","openapi":"GET /v1/crypto/active","href":"/api-reference/crypto/active"},{"title":"Crypto Series","openapi":"GET /v1/crypto/series","href":"/api-reference/crypto/series"}]},{"group":"Sports","pages":[{"title":"Sports Markets","href":"/api-reference/sports/sports-markets"}]},{"group":"BYOL","pages":[{"title":"BYOL Overview","href":"/api-reference/byol/overview"},{"title":"Get Leaderboard","openapi":"GET /v2/leaderboard/custom","href":"/api-reference/byol/get-leaderboard"},{"title":"Add Wallets","openapi":"POST /v2/leaderboard/wallets","href":"/api-reference/byol/add-wallets"},{"title":"Remove Wallets","openapi":"DELETE /v2/leaderboard/wallets","href":"/api-reference/byol/remove-wallets"},{"title":"List Wallets","openapi":"GET /v2/leaderboard/wallets","href":"/api-reference/byol/list-wallets"}]},{"group":"Backtesting","pages":[{"title":"Backtesting Overview","href":"/api-reference/backtesting/overview"},{"title":"Deprecated: Backtest Copy PnL","openapi":"GET /v2/copy-pnl/{wallet}","href":"/api-reference/backtesting/copy-pnl"},{"title":"Deprecated: Backtest Copy PnL — Batch","openapi":"POST /v2/copy-pnl/batch","href":"/api-reference/backtesting/batch"},{"title":"BYOB — Add Wallets","openapi":"POST /v2/copy-pnl/wallets","href":"/api-reference/backtesting/byob-add-wallets"},{"title":"BYOB — Remove Wallets","openapi":"DELETE /v2/copy-pnl/wallets","href":"/api-reference/backtesting/byob-remove-wallets"},{"title":"BYOB — List Wallets","openapi":"GET /v2/copy-pnl/wallets","href":"/api-reference/backtesting/byob-list-wallets"},{"title":"BYOB — Leaderboard","openapi":"GET /v2/copy-pnl/leaderboard","href":"/api-reference/backtesting/byob-leaderboard"},{"title":"BYOB — Snapshot","openapi":"GET /v2/copy-pnl/snapshot","href":"/api-reference/backtesting/byob-snapshot"}]},{"group":"Market Card","pages":[{"title":"Market Card","sidebarTitle":"Market Card","openapi":"GET /v1/stats/{token_id}","href":"/api-reference/pricing/market-statistics"}]},{"group":"System","pages":[{"title":"System Status","openapi":"GET /v1/status","href":"/api-reference/system/system-status"},{"title":"Generate API Key","openapi":"POST /v1/keys","href":"/api-reference/system/generate-api-key"},{"title":"Health Check","openapi":"GET /healthz","href":"/api-reference/system/health-check"},{"title":"Readiness Check","openapi":"GET /readyz","href":"/api-reference/system/readiness-check"}]},{"group":"Search \u0026 Context","tag":"BETA","pages":[{"title":"Online Search API","sidebarTitle":"Online Search","openapi":"GET /v2/search/online","icon":"search","tag":"BETA","href":"/api-reference/search-online"},{"title":"X Search API","sidebarTitle":"X Search API","openapi":"GET /v2/x/search","icon":"magnifying-glass","tag":"BETA","href":"/api-reference/x-search"}]},{"group":"Onchain V2 (legacy)","pages":[{"title":"Trade History (All)","openapi":"GET /v2/onchain/trades","href":"/api-reference/onchain/trades"},{"title":"Positions (All)","openapi":"GET /v2/onchain/positions","href":"/api-reference/onchain/positions"},{"title":"Positions \u0026 P\u0026L (Wallet)","openapi":"GET /v2/wallets/{address}/positions/onchain","href":"/api-reference/wallets/onchain-positions"},{"title":"Trade History (Wallet)","openapi":"GET /v2/onchain/wallets/{address}/trades","href":"/api-reference/onchain/wallet-trades"},{"title":"Trade History (Wallet) — Bulk","openapi":"GET /v2/onchain/wallets/{address}/trades/all","href":"/api-reference/onchain/wallet-trades-all"},{"title":"Wallet Redemptions","openapi":"GET /v2/onchain/wallets/{address}/redemptions","href":"/api-reference/onchain/wallet-redemptions"},{"title":"Wallet Activity","openapi":"GET /v2/onchain/wallets/{address}/activity","href":"/api-reference/onchain/wallet-activity"},{"title":"Trade History (Market)","openapi":"GET /v2/onchain/markets/{token_id}/trades","href":"/api-reference/onchain/market-trades"},{"title":"Trade History (Market) — Bulk","openapi":"GET /v2/onchain/markets/{token_id}/trades/all","href":"/api-reference/onchain/market-trades-all"},{"title":"Top Traders (Market)","openapi":"GET /v1/markets/{id}/positions","href":"/api-reference/wallets/market-positions"},{"title":"Candles (Trade-Indexed OHLCV)","openapi":"GET /v2/onchain/candles/{token_id}","href":"/api-reference/onchain/candles"},{"title":"Market Volume","openapi":"GET /v2/onchain/markets/{token_id}/volume","href":"/api-reference/onchain/market-volume"},{"title":"Market Open Interest","openapi":"GET /v2/onchain/markets/{condition_id}/oi","href":"/api-reference/onchain/market-oi"},{"title":"Global Open Interest","openapi":"GET /v2/onchain/oi","href":"/api-reference/onchain/global-oi"}]}]},{"tab":"Crypto Prices","pages":[{"title":"Crypto Prices","href":"/crypto/overview"}]},{"tab":"Orderbook","pages":[{"title":"Orderbook","href":"/orderbook/overview"}]},{"tab":"RPC","pages":[{"title":"RPC","href":"/rpc/overview"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":"Trading","pages":[{"title":"Trading","href":"/sdks/trading"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"Case Studies","pages":[{"title":"Case Studies","href":"/case-studies/overview"}]}]},"title":"Copy PnL - PolyNode","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}