Skip to main content
Pool state, trade quotes, and swap for one outcome–collateral pair. Obtain with client.pool(outcomeToken, collateralToken?) — the VoizPool class is not a root export. Use quoteTrade for trade quotes (not market.prices).

State

Prefer quoteTrade.priceAfter / priceAboveNinetyNineCents for trade gates. Mid/reserve helpers are package-internal.

state

Live pool status, slot0, and liquidity.

PoolStatus / PoolState

priceFromState

Mid price from an already-fetched PoolState (no RPC). null when status is not "open".

quoteTrade

Exact-in quote matching swap sides: buy = collateral → outcome; sell = the reverse. May return a capped size when the request exceeds prediction-range liquidity (withinRange: false).

QuoteTradeResult

  • requestedAmountIn — size you asked for
  • amountIn — size this amountOut applies to (may be capped)
  • amountOut — expected out for amountIn
  • withinRange — whether the full request quoted successfully
  • maxAmountIn — largest size that still quotes
  • message? / error?: "EXCEEDS_RANGE" — when capped
  • spotPrice? / priceAfter? — mid before / estimated after
  • priceAboveNinetyNineCents? — current spot already above 0.99

swap

Exact-in swap via the Seer V4 helper and the client sender.
Opaque sender result (same shape as your sendCalls / wallet path).

Advanced

pool.key exists for low-level callers (type not root-exported). LP burn and swap use outcome/collateral tokens — you do not pass a PoolKey.