usdc.address in Get deployment). Totalis pays
the gas.
Open a position
- Subscribe to the account channel and wait for the snapshot.
- Create RFQ.
- Collect
QUOTE_CREATEDevents. - Sign one quote and accept it.
- Follow
OPERATION_UPDATEDuntilCOMMITTED.
Create RFQ
Legs go in strictly ascendingoutcome_id order. One leg is a single; more is a parlay.
Collect quotes
EachQUOTE_CREATED carries one quote:
payout is what the position pays if every leg wins. QUOTE_REMOVED names a quote that left. A quote
also stops at expiry (unix seconds), which sends no event.
Accept
Sign the quote’sentry terms as TakerAccept (Signing).
The Idempotency-Key becomes the acceptance_id: choose it before the first send and reuse it on every
retry.
Read later, an acceptance can also be
FILLED or FAILED.
Funding
If your free vault balance is short of the stake, addfunding to the accept. The vault draws exactly
the shortfall in the same transaction as the trade. It needs funding:deposit.
value is the stake minus VAULT_FREE in Get balances,
signed as USDC ReceiveWithAuthorization from your wallet to the vault. kind is always WALLET.
Lost response
Resend the identical request with the sameIdempotency-Key. Or read
Get acceptance: a 404 means no accept was admitted;
cancel the RFQ and read once more. A 404 after the cancel
is final. Never accept the same quote under a second key.
Follow the fill
The position’s ID is the
quote_id you accepted:
Cash out
Cash out position opens a cash-out RFQ on anOPEN position you own. The body is empty.
QUOTE_CREATED. kind is SELL_BACK or TRANSFER and names the terms it carries:
Sign
sell_back as SellBack or transfer as CashoutTransfer, then accept it like an entry quote,
with no funding. On COMMITTED you receive POSITION_CLOSED or POSITION_TRANSFERRED, and the price
lands in your vault balance.
Settlement
Automatic. Totalis settles every resolved position, then claims a win into your vault balance. Nothing to call or sign.SETTLED_UNCLAIMED is the short wait between the two.
Each leg’s result is
result_numerator / result_denominator. The position pays its payout times the
product of its legs’ results.
