bigint; values inside relayer JSON responses are decimal strings (convert with BigInt(...)). Odds and probabilities are basis points (10000 = 1.00x / 100%).
TakerConfig
PickLeg
Picks = Record<number, number> (marketId to outcome); toLegs(picks) converts.
QuoteResponse
Returned byclient.quote and stored as lastQuote by useSubmitParlay.
The serialized
ParlayOrder (bigints as strings): taker, maker, stake, makerCollateral, makerNonce, takerNonce, deadline (unix seconds, quote + 600s), protocolFeeBps, builderFeeBps, builder, legs. Pass it untouched to takerSigningPayload and submit; both signatures cover it byte-for-byte.The vault quoter’s EIP-712 signature over the order.
The economics, all strings raw USDC unless noted:
How capacity was charged;
null under isolated accounting. Under cross mode: {mode: "cross", isolatedAfter, effectiveAfter, securedCredit, exact} (or {mode: "cross", degraded: true}). See Margin.SubmitResponse
CashoutQuote
Returned byclient.cashoutQuote / useCashOut().getQuote. All string amounts raw USDC.
What the taker receives now.
Single-use nonce inside the signed message.
Unix seconds; the signature expires 120s after issuance.
Quoter EIP-712 signature the escrow verifies.
What the position would pay at settlement (net of fees) if all legs hit.
Live probability all remaining legs win, bps.
MarginState
Returned byclient.margin(detail?). See Margin for what the numbers mean.
Which accounting the /quote utilization check is actually charging.
Haircut kept from the netting relief (default 2000 = 20%).
totalAssets, locked (raw USDC strings), utilizationCapBps, capacity (NAV times the cap).positions (count), isolatedLocked, worstCaseLocked, relief, securedCredit, effectiveLocked (raw USDC strings), nettedComponents, exact (whether the worst case was solved exactly).Remaining quoting capacity under each mode:
{isolated: string, cross: string}.Only with
detail=1: {id, makerCollateral, legs}[] for every open parlay.Only with
detail=1: netting clusters as arrays of parlay ids.RelayerHealth
ParlayRow
The canonical position row fromuseParlayPositions and fetchParlays.
@parlays-live/taker):
ParlayEvent
The analytics union fired throughParlayCallbacks.onEvent. Full definition and PostHog mapping in Analytics.
Re-exported from @parlays-live/sdk
So hosts depend on one package:| Export | Description |
|---|---|
formatUsdc(v: bigint): string | Raw 6dp to display string, e.g. 25000000n to "25.00" |
formatUsdcCompact(v: bigint): string | Compact display for large amounts |
parseUsdc(s: string): bigint | "25" / "25.50" to raw 6dp |
BPS = 10000n, USDC = 1000000n | Denominator constants |
loadCards(testnet: boolean) | Live HL market data: {cards: MarketCardData[], info: Map<number, MarketInfo>, graph: MarketGraph} |
MarketInfo | Per-market render lookup: {id, title, context, sideLabels: [string, string], probBps: [number, number]} (index 0 = YES side, 1 = NO side) |
MarketCardData | Renderable card: {kind: "binary", sides: [CardOption, CardOption]} or {kind: "multi", options: CardOption[]}, each with title, sub, category |
MarketGraph | Market clustering metadata used by the correlation engine |

