sharePositions() is indexer sharePosition only. There is no live ERC-20 overlay. Soft-fails to [] if the indexer is down.
Three books. Do not mix them.
Inventory, remaining cost, and realized PnL come from that table. Mark
priceCt comes from indexer outcome (0/1 after resolve). Raw fills stay on trades(). AMM LP lots stay on lpPositions().
UserPositionsParams: markets?: Address[] | MarketSummary[] — filter; summaries also supply labels / tokens / resolution. Inventory still comes from the indexer.
The indexer updates lots from:
Proceeds on a Router transfer:
That includes post-resolve redeem (winner proceeds = amount) and an open-market
market.merge (Router pulls wrapped tokens; proceeds = 0). A merge that empties an open lot is dropped (shares == 0 and not resolved). After resolve, a full exit stays (redeemed: true) so the profile can show Redeemed.
Open lots with shares == 0 are dropped. After resolve, a fully exited lot stays (redeemed: true).
PnL for a remaining lot: