{
"error": "API key required. Get one at polynode.dev"
}
{
"error": "Not found."
}
Onchain V2 (legacy)
Positions & P&L (Wallet)
Every position a wallet has held — open and closed — with realized + unrealized P&L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.
GET
/
v2
/
wallets
/
{address}
/
positions
/
onchain
Onchain positions & P&L
curl --request GET \ --url https://api.polynode.dev/v2/wallets/{address}/positions/onchain \ --header 'x-api-key: <api-key>'
{
"error": "API key required. Get one at polynode.dev"
}
{
"error": "Not found."
}
Returns every position a wallet has ever held, including closed positions that no longer appear in the standard positions endpoint. Each position includes precomputed realized_pnl, avg_price, total_bought, plus per-position activity, redemption, and resolution timestamps that let you build leaderboards, trim to a 30-day or 90-day window, or filter to a parent event.The standard /v1/wallets/{addr}/positions endpoint only returns open positions. Once a position is fully exited or a market resolves, it disappears. This endpoint fills that gap.
Unix seconds. Drop positions whose last_trade_at is before this timestamp.
until
query (optional)
Unix seconds. Drop positions whose last_trade_at is after this timestamp.
tag_slug
query (optional)
Keep only positions whose market carries this Polymarket event tag (e.g. nba, politics, crypto, 2026-fifa-world-cup-winner-595). Matches against the per-market tag_slugs array. See Filtering by tag.
since, until, and tag_slug are all opt-in. When none are supplied, the response is identical to a request with no parameters at all — same shape, same aggregates over the full position set. When any is supplied, positions are filtered and aggregates are recomputed (see Filtering).
Paper P&L on remaining open shares. For resolved markets, uses the terminal settlement price (1.0 winner / 0.0 loser). For live markets, uses the current market price. 0 when size = 0.
positions[].current_price
number | null
Price used for unrealized_pnl. 1.0 or 0.0 on resolved markets, live market price on active markets, null when size = 0 or no price is available.
positions[].market_status
string
"live" / "resolved-win" / "resolved-loss" / "resolved-unknown" / "closed". See positions feed for full enum.
positions[].total_bought
number
Total tokens acquired for this position
positions[].market
string
Market question
positions[].slug
string
Market slug — identifies the specific market within an event (e.g. nba-bos-cle-2026-03-08-spread).
positions[].event_slug
string | null
Event slug — identifies the parent event a market belongs to (e.g. nba-bos-cle-2026-03-08). For single-market events, equals slug. For multi-market events (NBA games with several lines, election markets with several candidates, FIFA World Cup with one market per team, etc.) this is the parent the markets share. null when the event metadata is not yet known.
positions[].outcome
string
Outcome label (e.g. “Yes”, “No”, “Up”)
positions[].image
string
Market image URL
positions[].condition_id
string
Market condition ID
positions[].last_trade_at
number | null
Unix seconds. Latest fill (maker or taker) on this token across V1 + V2 exchanges. null when polynode has no fill history for the token (e.g. positions acquired purely via splits/merges or NegRisk conversion with no later trade).
positions[].closed_at
number | null
Unix seconds. Latest moment this wallet redeemed any outcome of this market’s condition_id for collateral. null when the wallet has not redeemed (positions sold to zero before resolution, or open positions, or wins held but not yet redeemed).
positions[].resolved_at
number | null
Unix seconds. Moment the market was resolved on-chain (when payouts became redeemable). null for markets that resolved before polynode began tracking, or for markets that have not yet resolved. Recent markets are fully covered.
positions[].tag_slugs
string[] | null
Polymarket event-level tags applied to this market. Examples: ["NBA","Basketball","Sports","All"] for an NBA game market, ["Crypto","Up or Down","Recurring","All"] for a 5-min crypto market. Order is most-specific → most-general. Tags live on the parent event (markets sharing an event_slug share the same tag_slugs). null only on the rare event that doesn’t carry any tag or hasn’t been ingested yet.
These three timestamp fields look similar but answer different questions. Choosing the right one matters when filtering:
Field
Whose action
When
last_trade_at
The wallet’s most recent fill on this exact token
Each fill event (buy or sell) updates this
closed_at
The wallet’s most recent collateral redemption for the market
Set when the wallet calls redeemPositions on the CTF contract
resolved_at
The market itself (not the wallet) becoming redeemable
Set once per market, when the oracle reports payouts on-chain
A position can have resolved_at populated and closed_at null — the market resolved but the wallet has not yet redeemed. A position can have closed_at set and resolved_at null — the wallet redeemed during a window polynode does not have full historical resolution coverage for, but the redemption itself was observed.For windowing a leaderboard to “the last 30 days of trading activity,” last_trade_at is the right field — it captures every position the wallet was active in. For “positions resolved in the last 90 days,” resolved_at is the right one. For “positions the wallet has actually closed out,” closed_at is the right one.
since and until are optional unix-seconds query parameters that filter positions by last_trade_at. Designed to support 30d / 90d / 365d leaderboard windows without fetching multi-year history just to trim it client-side.
Positions with last_trade_at = null are dropped under any active filter — there’s no timestamp to compare against.
All seven aggregates (count, open_count, closed_count, total_realized_pnl, total_unrealized_pnl, total_pnl, positions_with_pnl) recompute over the filtered set.
The response gains two top-level keys to make the shift self-documenting: filtered: true and applied_filters: { since, until }. These keys are absent from default responses.
The default response is unaffected by these new params. When you call this endpoint with no since/until/tag_slug, the response shape and every aggregate is identical to what you got before. The filtered and applied_filters keys are only added when you opt in.
tag_slug is an optional query parameter that keeps only positions whose market carries the matching Polymarket event tag.Tags come from Polymarket’s event taxonomy — typical values include nba, basketball, sports, politics, crypto, fed, world, 2025-predictions, and event-specific slugs like 2026-fifa-world-cup-winner-595. Each market inherits the tag set of its parent event, so all 32 markets under “Will X win the World Cup?” share the same tag list. The full set is visible in the per-row tag_slugs array on every response.
Use the dedicated /v2/onchain/tags endpoint for the full tag namespace (5,779 tags currently). Returns a flat slug array by default, or ?details=true for per-tag market counts and timestamps:
The values returned by /v2/onchain/tags are the exact strings to pass to ?tag_slug= here.For a wallet-specific view, you can also fetch the wallet’s positions without a filter and read the union of tag_slugs across the response — that’s the tag namespace the wallet has actually traded in.
Each position’s realized_pnl reflects the profit or loss after the position is closed (sold or redeemed). For a winning binary position bought at $0.40 that resolves at $1.00:
avg_price = 0.40
total_bought = 10,000 (tokens acquired)
Cost basis = 10,000 × $0.40 = $4,000 USDC
Payout at $1.00 = 10,000 × $1.00 = $10,000 USDC
realized_pnl = $10,000 - $4,000 = $6,000
The formula: realized_pnl = total_bought × (1 - avg_price) for positions that resolve at $1.Per-position values (realized_pnl, avg_price, total_bought) come from the same onchain settlement data that Polymarket uses. Individual position P&L matches what Polymarket shows on its portfolio page.
The response returns three portfolio-level totals. Each answers a different question:
Total
Answers
Matches
total_realized_pnl
How much profit has this wallet actually taken off the table from closed + resolved positions?
Not shown on Polymarket profile
total_unrealized_pnl
What is the paper P&L on the wallet’s currently-held shares at current (or terminal) prices?
Not shown directly
total_pnl
What is the wallet’s net portfolio P&L right now?
The “Profit” number on a Polymarket profile page
total_pnl is what most dashboards want — it’s the single number users recognize from Polymarket. total_realized_pnl is useful for attribution (which markets made money vs which positions are still out). total_unrealized_pnl is useful for risk views (how much is still at stake).
total_pnl = total_realized_pnl + total_unrealized_pnl. Reach for total_pnl when you want a number that matches a Polymarket profile page. Reach for total_realized_pnl when you want only closed-out gains.
When you supply since or until, all three totals recompute over the filtered set — the same logic, just narrower input.
Responses are cached for 5 minutes per wallet. First request for a new wallet takes 200ms-3s depending on position count (up to 20,000 positions supported). Cached responses return in under 50ms. Filter parameters are applied to the cached set; passing since/until does not invalidate the underlying cache.
Returns every position the wallet has held, all-time, with the full set of fields documented above. Default response shape — no filtered or applied_filters keys.
This collapses a wallet’s positions across the children of an event (e.g. all 32 World Cup winner markets, or the multiple lines of a single NBA game) into one row per event.
{"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":""},"entitlements":{},"buildId":"6aec02b5baf429d562e676ed","clientVersion":"0.0.4094","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},"basePath":"","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/wallets/onchain-positions","slug":"/api-reference/wallets/onchain-positions","pageMetadata":{"title":"Positions \u0026 P\u0026L (Wallet)","description":"Every position a wallet has held — open and closed — with realized + unrealized P\u0026L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.","openapi":"GET /v2/wallets/{address}/positions/onchain","href":"/api-reference/wallets/onchain-positions"},"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: \"Every position a wallet has held — open and closed — with realized + unrealized P\u0026L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.\"\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,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Returns every position a wallet has ever held, including closed positions that no longer appear in the standard positions endpoint. Each position includes precomputed `,_jsx(_components.code,{children:`realized_pnl`}),`, `,_jsx(_components.code,{children:`avg_price`}),`, `,_jsx(_components.code,{children:`total_bought`}),`, plus per-position activity, redemption, and resolution timestamps that let you build leaderboards, trim to a 30-day or 90-day window, or filter to a parent event.`]}),`\n`,_jsxs(_components.p,{children:[`The standard `,_jsx(_components.code,{children:`/v1/wallets/{addr}/positions`}),` endpoint only returns open positions. Once a position is fully exited or a market resolves, it disappears. This endpoint fills that gap.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,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:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`GET /v2/wallets/{address}/positions/onchain`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_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:`Wallet address (0x-prefixed, 40 hex chars)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`since`})}),_jsx(_components.td,{children:`query (optional)`}),_jsxs(_components.td,{children:[`Unix seconds. Drop positions whose `,_jsx(_components.code,{children:`last_trade_at`}),` is before this timestamp.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`until`})}),_jsx(_components.td,{children:`query (optional)`}),_jsxs(_components.td,{children:[`Unix seconds. Drop positions whose `,_jsx(_components.code,{children:`last_trade_at`}),` is after this timestamp.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tag_slug`})}),_jsx(_components.td,{children:`query (optional)`}),_jsxs(_components.td,{children:[`Keep only positions whose market carries this Polymarket event tag (e.g. `,_jsx(_components.code,{children:`nba`}),`, `,_jsx(_components.code,{children:`politics`}),`, `,_jsx(_components.code,{children:`crypto`}),`, `,_jsx(_components.code,{children:`2026-fifa-world-cup-winner-595`}),`). Matches against the per-market `,_jsx(_components.code,{children:`tag_slugs`}),` array. See `,_jsx(_components.a,{href:`#filtering-by-tag`,children:`Filtering by tag`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`since`}),`, `,_jsx(_components.code,{children:`until`}),`, and `,_jsx(_components.code,{children:`tag_slug`}),` are all `,_jsx(_components.strong,{children:`opt-in`}),`. When none are supplied, the response is identical to a request with no parameters at all — same shape, same aggregates over the full position set. When any is supplied, positions are filtered and aggregates are recomputed (see `,_jsx(_components.a,{href:`#filtering-by-activity-window`,children:`Filtering`}),`).`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`32`,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:`32`,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:` \"wallet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xbddf61af533ff524d27154e589d2d7a81510c684\"`}),_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:`\"onchain\"`}),_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:` \"count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`879`}),_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_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`340`}),_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:` \"closed_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`288`}),_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\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`17183579.48`}),_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_unrealized_pnl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`-14346997.32`}),_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_pnl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2836582.16`}),_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:` \"positions_with_pnl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`309`}),_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:` \"positions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\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:` \"token_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100424505911492726143069668369640898890012859227903329249368753635028896002613\"`}),_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:` \"size\"`}),_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:` \"avg_price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.63`}),_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\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`147588.53019`}),_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:` \"unrealized_pnl\"`}),_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:` \"current_price\"`}),_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:` \"market_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"closed\"`}),_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_bought\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`398887.919433`}),_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:` \"market\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Will Fulham FC win on 2026-03-21?\"`}),_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:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"epl-ful-bur-2026-03-21-ful\"`}),_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_slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"epl-ful-bur-2026-03-21\"`}),_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:` \"outcome\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Yes\"`}),_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:` \"image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://polymarket-upload.s3.us-east-2.amazonaws.com/Repetitive-markets/premier+league.jpg\"`}),_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:` \"condition_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xae68634cb01137acbe26e65790f7268a523ee1519601f2576bd7b067c7c9f9da\"`}),_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_trade_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1742568134`}),_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:` \"closed_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1742573012`}),_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:` \"resolved_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1742572840`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`wallet`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Queried wallet address (lowercased)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Always `,_jsx(_components.code,{children:`\"onchain\"`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`count`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Total positions returned`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`open_count`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[`Positions with `,_jsx(_components.code,{children:`size > 0`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`closed_count`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[`Positions with `,_jsx(_components.code,{children:`size = 0`}),` and nonzero `,_jsx(_components.code,{children:`realized_pnl`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_realized_pnl`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[`Sum of `,_jsx(_components.code,{children:`realized_pnl`}),` across all returned positions`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_unrealized_pnl`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[`Sum of `,_jsx(_components.code,{children:`unrealized_pnl`}),` across all returned positions. Reflects open-size paper P\u0026L at current (or terminal) market prices.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_pnl`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`total_realized_pnl + total_unrealized_pnl`}),`. Matches the net portfolio PnL shown on a Polymarket profile page.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions_with_pnl`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[`Positions where `,_jsx(_components.code,{children:`realized_pnl != 0`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`filtered`})}),_jsx(_components.td,{children:`boolean`}),_jsxs(_components.td,{children:[`Present `,_jsx(_components.strong,{children:`only`}),` when `,_jsx(_components.code,{children:`since`}),` or `,_jsx(_components.code,{children:`until`}),` was supplied. Always `,_jsx(_components.code,{children:`true`}),` in that case. Absent in default responses.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`applied_filters`})}),_jsx(_components.td,{children:`object`}),_jsxs(_components.td,{children:[`Present `,_jsx(_components.strong,{children:`only`}),` when filtering. Echoes `,_jsx(_components.code,{children:`{since, until}`}),` (each is the supplied unix seconds or `,_jsx(_components.code,{children:`null`}),`). Absent in default responses.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].token_id`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`CTF token ID (called `,_jsx(_components.code,{children:`asset`}),` on the `,_jsx(_components.a,{href:`/api-reference/wallets/closed-positions`,children:`closed-positions`}),` endpoint)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].size`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Current token balance (0 = fully exited)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].avg_price`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Volume-weighted average entry price`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].realized_pnl`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Realized profit/loss in USDC`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].unrealized_pnl`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[`Paper P\u0026L on remaining open shares. For resolved markets, uses the terminal settlement price (1.0 winner / 0.0 loser). For live markets, uses the current market price. `,_jsx(_components.code,{children:`0`}),` when `,_jsx(_components.code,{children:`size = 0`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].current_price`})}),_jsx(_components.td,{children:`number | null`}),_jsxs(_components.td,{children:[`Price used for `,_jsx(_components.code,{children:`unrealized_pnl`}),`. `,_jsx(_components.code,{children:`1.0`}),` or `,_jsx(_components.code,{children:`0.0`}),` on resolved markets, live market price on active markets, `,_jsx(_components.code,{children:`null`}),` when `,_jsx(_components.code,{children:`size = 0`}),` or no price is available.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].market_status`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"live\"`}),` / `,_jsx(_components.code,{children:`\"resolved-win\"`}),` / `,_jsx(_components.code,{children:`\"resolved-loss\"`}),` / `,_jsx(_components.code,{children:`\"resolved-unknown\"`}),` / `,_jsx(_components.code,{children:`\"closed\"`}),`. See `,_jsx(_components.a,{href:`/api-reference/onchain/positions#position-fields`,children:`positions feed`}),` for full enum.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].total_bought`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Total tokens acquired for this position`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].market`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Market question`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].slug`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Market`}),` slug — identifies the specific market within an event (e.g. `,_jsx(_components.code,{children:`nba-bos-cle-2026-03-08-spread`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].event_slug`})}),_jsx(_components.td,{children:`string | null`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Event`}),` slug — identifies the parent event a market belongs to (e.g. `,_jsx(_components.code,{children:`nba-bos-cle-2026-03-08`}),`). For single-market events, equals `,_jsx(_components.code,{children:`slug`}),`. For multi-market events (NBA games with several lines, election markets with several candidates, FIFA World Cup with one market per team, etc.) this is the parent the markets share. `,_jsx(_components.code,{children:`null`}),` when the event metadata is not yet known.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].outcome`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Outcome label (e.g. “Yes”, “No”, “Up”)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].image`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Market image URL`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].condition_id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Market condition ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].last_trade_at`})}),_jsx(_components.td,{children:`number | null`}),_jsxs(_components.td,{children:[`Unix seconds. Latest fill (maker or taker) on this token across V1 + V2 exchanges. `,_jsx(_components.code,{children:`null`}),` when polynode has no fill history for the token (e.g. positions acquired purely via splits/merges or NegRisk conversion with no later trade).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].closed_at`})}),_jsx(_components.td,{children:`number | null`}),_jsxs(_components.td,{children:[`Unix seconds. Latest moment this wallet redeemed any outcome of this market’s `,_jsx(_components.code,{children:`condition_id`}),` for collateral. `,_jsx(_components.code,{children:`null`}),` when the wallet has not redeemed (positions sold to zero before resolution, or open positions, or wins held but not yet redeemed).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].resolved_at`})}),_jsx(_components.td,{children:`number | null`}),_jsxs(_components.td,{children:[`Unix seconds. Moment the market was resolved on-chain (when payouts became redeemable). `,_jsx(_components.code,{children:`null`}),` for markets that resolved before polynode began tracking, or for markets that have not yet resolved. Recent markets are fully covered.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`positions[].tag_slugs`})}),_jsx(_components.td,{children:`string[] | null`}),_jsxs(_components.td,{children:[`Polymarket event-level tags applied to this market. Examples: `,_jsx(_components.code,{children:`[\"NBA\",\"Basketball\",\"Sports\",\"All\"]`}),` for an NBA game market, `,_jsx(_components.code,{children:`[\"Crypto\",\"Up or Down\",\"Recurring\",\"All\"]`}),` for a 5-min crypto market. Order is most-specific → most-general. Tags live on the parent event (markets sharing an `,_jsx(_components.code,{children:`event_slug`}),` share the same `,_jsx(_components.code,{children:`tag_slugs`}),`). `,_jsx(_components.code,{children:`null`}),` only on the rare event that doesn’t carry any tag or hasn’t been ingested yet.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`distinguishing-the-three-timestamp-fields`,children:`Distinguishing the three timestamp fields`}),`\n`,_jsx(_components.p,{children:`These three timestamp fields look similar but answer different questions. Choosing the right one matters when filtering:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Whose action`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`last_trade_at`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`wallet`}),`’s most recent fill on this exact token`]}),_jsx(_components.td,{children:`Each fill event (buy or sell) updates this`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`closed_at`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`wallet`}),`’s most recent collateral redemption for the market`]}),_jsxs(_components.td,{children:[`Set when the wallet calls `,_jsx(_components.code,{children:`redeemPositions`}),` on the CTF contract`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`resolved_at`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`market itself`}),` (not the wallet) becoming redeemable`]}),_jsx(_components.td,{children:`Set once per market, when the oracle reports payouts on-chain`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A position can have `,_jsx(_components.code,{children:`resolved_at`}),` populated and `,_jsx(_components.code,{children:`closed_at`}),` null — the market resolved but the wallet has not yet redeemed. A position can have `,_jsx(_components.code,{children:`closed_at`}),` set and `,_jsx(_components.code,{children:`resolved_at`}),` null — the wallet redeemed during a window polynode does not have full historical resolution coverage for, but the redemption itself was observed.`]}),`\n`,_jsxs(_components.p,{children:[`For windowing a leaderboard to “the last 30 days of trading activity,” `,_jsx(_components.code,{children:`last_trade_at`}),` is the right field — it captures every position the wallet was active in. For “positions resolved in the last 90 days,” `,_jsx(_components.code,{children:`resolved_at`}),` is the right one. For “positions the wallet has actually closed out,” `,_jsx(_components.code,{children:`closed_at`}),` is the right one.`]}),`\n`,_jsx(Heading,{level:`2`,id:`filtering-by-activity-window`,children:`Filtering by activity window`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`since`}),` and `,_jsx(_components.code,{children:`until`}),` are optional unix-seconds query parameters that filter positions by `,_jsx(_components.code,{children:`last_trade_at`}),`. Designed to support 30d / 90d / 365d leaderboard windows without fetching multi-year history just to trim it client-side.`]}),`\n`,_jsx(Heading,{level:`3`,id:`behavior`,children:`Behavior`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Both bounds are `,_jsx(_components.strong,{children:`inclusive`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Positions with `,_jsx(_components.code,{children:`last_trade_at = null`}),` are dropped under any active filter — there’s no timestamp to compare against.`]}),`\n`,_jsxs(_components.li,{children:[`All seven aggregates (`,_jsx(_components.code,{children:`count`}),`, `,_jsx(_components.code,{children:`open_count`}),`, `,_jsx(_components.code,{children:`closed_count`}),`, `,_jsx(_components.code,{children:`total_realized_pnl`}),`, `,_jsx(_components.code,{children:`total_unrealized_pnl`}),`, `,_jsx(_components.code,{children:`total_pnl`}),`, `,_jsx(_components.code,{children:`positions_with_pnl`}),`) `,_jsx(_components.strong,{children:`recompute over the filtered set`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`The response gains two top-level keys to make the shift self-documenting: `,_jsx(_components.code,{children:`filtered: true`}),` and `,_jsx(_components.code,{children:`applied_filters: { since, until }`}),`. These keys are absent from default responses.`]}),`\n`,_jsxs(_components.li,{children:[`Bad inputs return `,_jsx(_components.code,{children:`400`}),` with a descriptive error.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`30-day-window`,children:`30-day window`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SINCE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(( `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$(date`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -u`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +%s`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) - 86400 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 30 ))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/wallets/0xbddf61af533ff524d27154e589d2d7a81510c684/positions/onchain?since=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SINCE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`90-day-window`,children:`90-day window`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SINCE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(( `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$(date`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -u`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +%s`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) - 86400 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 90 ))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/wallets/0xbddf61af533ff524d27154e589d2d7a81510c684/positions/onchain?since=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SINCE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`bounded-range-e-g-q1-2026`,children:`Bounded range (e.g. Q1 2026)`}),`\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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/wallets/0x.../positions/onchain?since=1735689600\u0026until=1743465600\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`})]}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The default response is unaffected by these new params.`}),` When you call this endpoint with no `,_jsx(_components.code,{children:`since`}),`/`,_jsx(_components.code,{children:`until`}),`/`,_jsx(_components.code,{children:`tag_slug`}),`, the response shape and every aggregate is identical to what you got before. The `,_jsx(_components.code,{children:`filtered`}),` and `,_jsx(_components.code,{children:`applied_filters`}),` keys are only added when you opt in.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`filtering-by-tag`,children:`Filtering by tag`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`tag_slug`}),` is an optional query parameter that keeps only positions whose market carries the matching Polymarket event tag.`]}),`\n`,_jsxs(_components.p,{children:[`Tags come from Polymarket’s event taxonomy — typical values include `,_jsx(_components.code,{children:`nba`}),`, `,_jsx(_components.code,{children:`basketball`}),`, `,_jsx(_components.code,{children:`sports`}),`, `,_jsx(_components.code,{children:`politics`}),`, `,_jsx(_components.code,{children:`crypto`}),`, `,_jsx(_components.code,{children:`fed`}),`, `,_jsx(_components.code,{children:`world`}),`, `,_jsx(_components.code,{children:`2025-predictions`}),`, and event-specific slugs like `,_jsx(_components.code,{children:`2026-fifa-world-cup-winner-595`}),`. Each market inherits the tag set of its parent event, so all 32 markets under “Will X win the World Cup?” share the same tag list. The full set is visible in the per-row `,_jsx(_components.code,{children:`tag_slugs`}),` array on every response.`]}),`\n`,_jsx(Heading,{level:`3`,id:`behavior-2`,children:`Behavior`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Match is case-sensitive and exact (`,_jsx(_components.code,{children:`?tag_slug=nba`}),` matches markets whose `,_jsx(_components.code,{children:`tag_slugs`}),` array contains `,_jsx(_components.code,{children:`\"nba\"`}),`).`]}),`\n`,_jsxs(_components.li,{children:[`Positions with `,_jsx(_components.code,{children:`tag_slugs = null`}),` are dropped under an active filter — same logic as `,_jsx(_components.code,{children:`last_trade_at`}),` for `,_jsx(_components.code,{children:`since`}),`/`,_jsx(_components.code,{children:`until`}),` (cannot match what we don’t know).`]}),`\n`,_jsx(_components.li,{children:`Aggregates recompute over the filtered set.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`applied_filters.tag_slug`}),` echoes the value back so the response is self-documenting.`]}),`\n`,_jsxs(_components.li,{children:[`Combine with `,_jsx(_components.code,{children:`since`}),` / `,_jsx(_components.code,{children:`until`}),` to get e.g. “all NBA positions in the last 30 days” — all three filters AND together.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`examples`,children:`Examples`}),`\n`,_jsx(Heading,{level:`4`,id:`all-nba-positions-for-a-wallet`,children:`All NBA positions for a wallet`}),`\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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/wallets/0x.../positions/onchain?tag_slug=nba\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`all-positions-tagged-to-a-specific-event`,children:`All positions tagged to a specific event`}),`\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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/wallets/0x.../positions/onchain?tag_slug=2026-fifa-world-cup-winner-595\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This collapses across every children market under the FIFA World Cup winner event.`}),`\n`,_jsx(Heading,{level:`4`,id:`crypto-positions-in-the-last-90-days`,children:`Crypto positions in the last 90 days`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SINCE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(( `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$(date`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -u`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +%s`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) - 86400 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 90 ))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/wallets/0x.../positions/onchain?tag_slug=crypto\u0026since=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SINCE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`discovering-available-tags`,children:`Discovering available tags`}),`\n`,_jsxs(_components.p,{children:[`Use the dedicated `,_jsx(_components.a,{href:`/api-reference/onchain/tags`,children:_jsx(_components.code,{children:`/v2/onchain/tags`})}),` endpoint for the full tag namespace (5,779 tags currently). Returns a flat slug array by default, or `,_jsx(_components.code,{children:`?details=true`}),` for per-tag market counts and timestamps:`]}),`\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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/onchain/tags?min_markets=100\u0026details=true\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The values returned by `,_jsx(_components.code,{children:`/v2/onchain/tags`}),` are the exact strings to pass to `,_jsx(_components.code,{children:`?tag_slug=`}),` here.`]}),`\n`,_jsxs(_components.p,{children:[`For a wallet-specific view, you can also fetch the wallet’s positions without a filter and read the union of `,_jsx(_components.code,{children:`tag_slugs`}),` across the response — that’s the tag namespace the wallet has actually traded in.`]}),`\n`,_jsxs(Heading,{level:`2`,id:`how-realized_pnl-works`,children:[`How `,_jsx(_components.code,{children:`realized_pnl`}),` Works`]}),`\n`,_jsxs(_components.p,{children:[`Each position’s `,_jsx(_components.code,{children:`realized_pnl`}),` reflects the profit or loss after the position is closed (sold or redeemed). For a winning binary position bought at `,`$0.40 that resolves at $`,`1.00:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`avg_price`}),` = 0.40`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`total_bought`}),` = 10,000 (tokens acquired)`]}),`\n`,_jsxs(_components.li,{children:[`Cost basis = 10,000 × `,`$0.40 = $`,`4,000 USDC`]}),`\n`,_jsxs(_components.li,{children:[`Payout at `,`$1.00 = 10,000 × $`,`1.00 = $10,000 USDC`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`realized_pnl`}),` = `,`$10,000 - $`,`4,000 = `,_jsx(_components.strong,{children:`$6,000`})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The formula: `,_jsx(_components.code,{children:`realized_pnl = total_bought × (1 - avg_price)`}),` for positions that resolve at $1.`]}),`\n`,_jsxs(_components.p,{children:[`Per-position values (`,_jsx(_components.code,{children:`realized_pnl`}),`, `,_jsx(_components.code,{children:`avg_price`}),`, `,_jsx(_components.code,{children:`total_bought`}),`) come from the same onchain settlement data that Polymarket uses. Individual position P\u0026L matches what Polymarket shows on its portfolio page.`]}),`\n`,_jsx(Heading,{level:`2`,id:`which-total-to-use`,children:`Which total to use`}),`\n`,_jsx(_components.p,{children:`The response returns three portfolio-level totals. Each answers a different question:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Total`}),_jsx(_components.th,{children:`Answers`}),_jsx(_components.th,{children:`Matches`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_realized_pnl`})}),_jsx(_components.td,{children:`How much profit has this wallet actually taken off the table from closed + resolved positions?`}),_jsx(_components.td,{children:`Not shown on Polymarket profile`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_unrealized_pnl`})}),_jsx(_components.td,{children:`What is the paper P\u0026L on the wallet’s currently-held shares at current (or terminal) prices?`}),_jsx(_components.td,{children:`Not shown directly`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_pnl`})}),_jsx(_components.td,{children:`What is the wallet’s net portfolio P\u0026L right now?`}),_jsx(_components.td,{children:`The “Profit” number on a Polymarket profile page`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`total_pnl`}),` is what most dashboards want — it’s the single number users recognize from Polymarket. `,_jsx(_components.code,{children:`total_realized_pnl`}),` is useful for attribution (which markets made money vs which positions are still out). `,_jsx(_components.code,{children:`total_unrealized_pnl`}),` is useful for risk views (how much is still at stake).`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`total_pnl = total_realized_pnl + total_unrealized_pnl`}),`. Reach for `,_jsx(_components.code,{children:`total_pnl`}),` when you want a number that matches a Polymarket profile page. Reach for `,_jsx(_components.code,{children:`total_realized_pnl`}),` when you want only closed-out gains.`]})}),`\n`,_jsxs(_components.p,{children:[`When you supply `,_jsx(_components.code,{children:`since`}),` or `,_jsx(_components.code,{children:`until`}),`, all three totals recompute over the filtered set — the same logic, just narrower input.`]}),`\n`,_jsx(Heading,{level:`2`,id:`performance`,children:`Performance`}),`\n`,_jsxs(_components.p,{children:[`Responses are cached for 5 minutes per wallet. First request for a new wallet takes 200ms-3s depending on position count (up to 20,000 positions supported). Cached responses return in under 50ms. Filter parameters are applied to the cached set; passing `,_jsx(_components.code,{children:`since`}),`/`,_jsx(_components.code,{children:`until`}),` does not invalidate the underlying cache.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Positions`}),_jsx(_components.th,{children:`First request`}),_jsx(_components.th,{children:`Cached`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`\u003c 500`}),_jsx(_components.td,{children:`~1s`}),_jsx(_components.td,{children:`\u003c 50ms`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`500-1,000`}),_jsx(_components.td,{children:`~1.5s`}),_jsx(_components.td,{children:`\u003c 50ms`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`1,000-5,000`}),_jsx(_components.td,{children:`~3s`}),_jsx(_components.td,{children:`\u003c 50ms`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`examples-2`,children:`Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`default-response-no-filter`,children:`Default response (no filter)`}),`\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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/wallets/0xbddf61af533ff524d27154e589d2d7a81510c684/positions/onchain\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns every position the wallet has held, all-time, with the full set of fields documented above. Default response shape — no `,_jsx(_components.code,{children:`filtered`}),` or `,_jsx(_components.code,{children:`applied_filters`}),` keys.`]}),`\n`,_jsx(Heading,{level:`3`,id:`filter-to-the-last-30-days`,children:`Filter to the last 30 days`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`SINCE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(( `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`$(date`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -u`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +%s`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) - 86400 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 30 ))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/wallets/0xbddf61af533ff524d27154e589d2d7a81510c684/positions/onchain?since=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SINCE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`filter-to-a-parent-event`,children:`Filter to a parent event`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`event_slug`}),` is included on every row, so once you have a wallet’s positions you can group them by parent event without an extra round-trip:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.polynode.dev/v2/wallets/0x.../positions/onchain\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '.positions | group_by(.event_slug) | map({event_slug: .[0].event_slug, market_count: length, pnl: (map(.realized_pnl + .unrealized_pnl) | add)})'`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This collapses a wallet’s positions across the children of an event (e.g. all 32 World Cup winner markets, or the multiple lines of a single NBA game) into one row per event.`})]})}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":"Positions \u0026 P\u0026L (Wallet)","description":"Every position a wallet has held — open and closed — with realized + unrealized P\u0026L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.","openapi":"GET /v2/wallets/{address}/positions/onchain","href":"/api-reference/wallets/onchain-positions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request","slug":"request","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Distinguishing the three timestamp fields","slug":"distinguishing-the-three-timestamp-fields","depth":2,"children":[]},{"title":"Filtering by activity window","slug":"filtering-by-activity-window","depth":2,"children":[{"title":"Behavior","slug":"behavior","depth":3,"children":[]},{"title":"30-day window","slug":"30-day-window","depth":3,"children":[]},{"title":"90-day window","slug":"90-day-window","depth":3,"children":[]},{"title":"Bounded range (e.g. Q1 2026)","slug":"bounded-range-e-g-q1-2026","depth":3,"children":[]}]},{"title":"Filtering by tag","slug":"filtering-by-tag","depth":2,"children":[{"title":"Behavior","slug":"behavior-2","depth":3,"children":[]},{"title":"Examples","slug":"examples","depth":3,"children":[]},{"title":"All NBA positions for a wallet","slug":"all-nba-positions-for-a-wallet","depth":4,"children":[]},{"title":"All positions tagged to a specific event","slug":"all-positions-tagged-to-a-specific-event","depth":4,"children":[]},{"title":"Crypto positions in the last 90 days","slug":"crypto-positions-in-the-last-90-days","depth":4,"children":[]},{"title":"Discovering available tags","slug":"discovering-available-tags","depth":3,"children":[]}]},{"title":"How realized_pnl Works","slug":"how-realized_pnl-works","depth":2,"children":[]},{"title":"Which total to use","slug":"which-total-to-use","depth":2,"children":[]},{"title":"Performance","slug":"performance","depth":2,"children":[]},{"title":"Examples","slug":"examples-2","depth":2,"children":[{"title":"Default response (no filter)","slug":"default-response-no-filter","depth":3,"children":[]},{"title":"Filter to the last 30 days","slug":"filter-to-the-last-30-days","depth":3,"children":[]},{"title":"Filter to a parent event","slug":"filter-to-a-parent-event","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/polynode/0d40c5db9faacad8/slug-calculator.js"],"openApiReferenceData":{"operation":{"tags":["Wallets"],"summary":"Onchain positions \u0026 P\u0026L","description":"Every position a wallet has held — open and closed — with realized + unrealized P\u0026L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.","operationId":"get_wallet_onchain_positions","parameters":["489c90e8-2b1e-49da-898e-49cd11247f6d"],"responses":{"200":"28efd445-7bd2-4d10-a872-473d20bdea41","401":"71892168-e9e2-4c63-9c43-de5a77b39440","404":"4e4d8ad5-9eaa-4010-9359-377f8c418b35"},"method":"get","type":"path","servers":["0de2ff18-6d1a-4993-ac05-606e277c043e"],"security":["fb0afb93-3cdc-4701-aabb-437453b79d87"],"path":"/v2/wallets/{address}/positions/onchain","baseUrlOptions":["https://api.polynode.dev"],"title":"Onchain positions \u0026 P\u0026L","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"489c90e8-2b1e-49da-898e-49cd11247f6d":{"name":"address","in":"path","description":"Wallet address (0x-prefixed)","required":true,"schema":{"type":"string","isRequired":true,"description":"Wallet address (0x-prefixed)","uniqueKey":"","typeLabel":"string"},"example":"0xbddf61af533ff524d27154e589d2d7a81510c684"}},"responses":{"28efd445-7bd2-4d10-a872-473d20bdea41":{"description":"Onchain positions with P\u0026L","content":{"application/json":{"example":{"wallet":"0xbddf61af533ff524d27154e589d2d7a81510c684","source":"onchain","count":873,"open_count":334,"closed_count":288,"total_realized_pnl":17183579.48,"positions_with_pnl":309,"positions":[{"token_id":"34158857981196154020624191931838064546543114916900689904269497497174344049047","size":0,"avg_price":0.316481,"realized_pnl":447182.949852,"total_bought":654236.312162}]},"examples":{"Example":{"title":"Example","value":{"wallet":"0xbddf61af533ff524d27154e589d2d7a81510c684","source":"onchain","count":873,"open_count":334,"closed_count":288,"total_realized_pnl":17183579.48,"positions_with_pnl":309,"positions":[{"token_id":"34158857981196154020624191931838064546543114916900689904269497497174344049047","size":0,"avg_price":0.316481,"realized_pnl":447182.949852,"total_bought":654236.312162}]}}},"exampleType":"examples"}},"exampleType":"examples"},"71892168-e9e2-4c63-9c43-de5a77b39440":{"description":"Missing or invalid API key","content":{"application/json":{"example":{"error":"API key required. Get one at polynode.dev"},"examples":{"Example":{"title":"Example","value":{"error":"API key required. Get one at polynode.dev"}}},"exampleType":"examples"}},"exampleType":"examples"},"4e4d8ad5-9eaa-4010-9359-377f8c418b35":{"description":"Wallet not found","content":{"application/json":{"example":{"error":"Not found."},"examples":{"Example":{"title":"Example","value":{"error":"Not found."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"fb0afb93-3cdc-4701-aabb-437453b79d87":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"api_key"}}},"servers":{"0de2ff18-6d1a-4993-ac05-606e277c043e":{"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":"Positions \u0026 P\u0026L (Wallet) - PolyNode","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-18T06:12:10.780Z","originalFileLocation":"api-reference/wallets/onchain-positions.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=\"Every position a wallet has held — open and closed — with realized + unrealized P\u0026amp;L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.\">\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=\"Positions \u0026amp; P\u0026amp;L (Wallet) - PolyNode\">\u003cmeta data-mint-head property=\"og:description\" content=\"Every position a wallet has held — open and closed — with realized + unrealized P\u0026amp;L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PolyNode\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.polynode.dev/api-reference/wallets/onchain-positions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://polynode.mintlify.site/_mintlify/api/og/v2?division=Onchain+V2+%28legacy%29\u0026amp;title=Positions+%26+P%26L+%28Wallet%29\u0026amp;description=Every+position+a+wallet+has+held+%E2%80%94+open+and+closed+%E2%80%94+with+realized+%2B+unrealized+P%26L%2C+per-position+activity+timestamps%2C+market+resolution+timestamps%2C+and+parent+\u0026amp;theme=121c1386b08658be3ccff004\u0026amp;signature=6cae1a039e0e74b06e40256642f416baeede06a4e09821b86c982fe42e20e0a0\">\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=\"Positions \u0026amp; P\u0026amp;L (Wallet) - PolyNode\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Every position a wallet has held — open and closed — with realized + unrealized P\u0026amp;L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://polynode.mintlify.site/_mintlify/api/og/v2?division=Onchain+V2+%28legacy%29\u0026amp;title=Positions+%26+P%26L+%28Wallet%29\u0026amp;description=Every+position+a+wallet+has+held+%E2%80%94+open+and+closed+%E2%80%94+with+realized+%2B+unrealized+P%26L%2C+per-position+activity+timestamps%2C+market+resolution+timestamps%2C+and+parent+\u0026amp;theme=121c1386b08658be3ccff004\u0026amp;signature=6cae1a039e0e74b06e40256642f416baeede06a4e09821b86c982fe42e20e0a0\">\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/api-reference/wallets/onchain-positions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/wallets/onchain-positions.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/api-reference/wallets/onchain-positions#webpage\",\"url\":\"https://docs.polynode.dev/api-reference/wallets/onchain-positions\",\"name\":\"Positions \u0026 P\u0026L (Wallet)\",\"description\":\"Every position a wallet has held — open and closed — with realized + unrealized P\u0026L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.\",\"dateModified\":\"2026-05-18T06:12:10.780Z\",\"isPartOf\":{\"@id\":\"https://docs.polynode.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.polynode.dev/api-reference/wallets/onchain-positions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.polynode.dev/api-reference/wallets/onchain-positions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Onchain V2 (legacy)\",\"item\":\"https://docs.polynode.dev/api-reference/onchain/trades\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Positions \u0026 P\u0026L (Wallet)\",\"item\":\"https://docs.polynode.dev/api-reference/wallets/onchain-positions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.polynode.dev/api-reference/wallets/onchain-positions#apireference\",\"headline\":\"Positions \u0026 P\u0026L (Wallet)\",\"name\":\"Positions \u0026 P\u0026L (Wallet)\",\"description\":\"Every position a wallet has held — open and closed — with realized + unrealized P\u0026L, per-position activity timestamps, market resolution timestamps, and parent event slugs. Optional time-window filtering.\",\"url\":\"https://docs.polynode.dev/api-reference/wallets/onchain-positions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.polynode.dev/api-reference/wallets/onchain-positions#webpage\"},\"dateModified\":\"2026-05-18T06:12:10.780Z\",\"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","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","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)","description":"Query every position on Polymarket. Filter by wallet, market, status, or minimum size. Full history with cursor pagination.","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)","description":"Complete onchain trade fill history for any wallet. Every fill, every counterparty, every fee.","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"}]}]},"basePath":"","title":"Positions \u0026 P\u0026L (Wallet) - PolyNode","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","Page-C945cI-W.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","clsx-CR-RHrVC.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CBUH0-zX.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BmARFYNC.js"]}