Skip to main content
Trades, share positions, and LP for one address. Obtain with client.user(address) — the VoizUser class is not a root export. Prefer this over raw indexer helpers.

Methods

trades

Indexed trade history. Soft-fails to [] if the indexer is down.
Fill rows from the indexer (empty array on soft-fail).

sharePositions

Outcome share book: one row per (market, outcome) with net shares and average entry. Soft-fails to []. When markets is MarketSummary[], also multicalls live ERC-20 balances. Mark priceCt comes from the indexer; raw fills stay on trades(); LP NFTs on lpPositions().

lpPositions

Open LP positions — one market (indexer discovery + live enrich) or all markets.
poolKey may be present at runtime but is @internal — use outcomeToken for client.burn.

UserTradesParams

UserPositionsParams

  • markets?: Address[] — filter by market id
  • markets?: MarketSummary[] — also supplies labels / tokens / resolution and enables a live balance multicall

UserSharePosition

  • Identity: marketId, marketName, outcomeIndex, outcomeLabel, token
  • Book: shares, avgEntryPriceCt, costCollateral, priceCt
  • Resolution: resolved, winningOutcome

UserLpPositionsParams

AllMarketsLpPosition

Trade

  • Identity: id, marketId, marketName, outcomeIndex, outcomeLabel
  • Fill: side, outcomeAmount, collateralAmount, hookFee, priceCt
  • Meta: timestamp, transactionHash