List open positions for a wallet (ledger + optional mark-to-market valuation)
problee_get_positionsFetch token positions for a wallet address, including share balances, cost basis, realized P&L, and optional current valuations; read finality to separate provisional from finalized rows.
Instructions
Get token positions for a wallet address: share balances + cost-basis ledger (totalSpent/totalReceived in collateral smallest units, per-outcome cost basis, sell-realized P&L). Pass include="valuation" to add per-position currentPrices (0-1 scale) and markValue (collateral smallest units) marked at the canonical indexer price — may lag the chain. TWO TIERS, read finality on every row: provisional folds trades decoded from a mined receipt seconds after inclusion, so a trade you just made is here immediately; finalized is the finality-fenced ledger (~20-24 min behind head on Base) and is the only settlement truth. Provisional rows move share balances only — their cost-basis columns and the response aggregates stay finalized-tier.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| cursor | No | ||
| chainId | No | ||
| include | No | Set to "valuation" to add currentPrices (0-1) and markValue per position. | |
| marketAddress | No | ||
| walletAddress | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |