Skip to main content
You need a key for your account with the taker scopes, your wallet key to sign, and USDC on HyperEVM in your wallet (usdc.address in Get deployment). Totalis pays the gas.

Open a position

  1. Subscribe to the account channel and wait for the snapshot.
  2. Create RFQ.
  3. Collect QUOTE_CREATED events.
  4. Sign one quote and accept it.
  5. Follow OPERATION_UPDATED until COMMITTED.
An RFQ stays open while your account stream is connected: makers keep pricing it until you accept, cancel or disconnect, for at most an hour. Cancel the RFQ when you stop showing its price, and create a new one when the legs or stake change. It closes about 2 minutes after your stream disconnects. See Limits.

Create RFQ

Legs go in strictly ascending outcome_id order. Two or more legs make a combo; an RFQ also takes one leg.

Which markets can be a leg

Every market from List markets and Get market says whether it can be a Combo leg now. A market can be a leg when both hold: combo.reason is one of: Show a market’s price as its chance, never its value. value is the raw book midpoint, so an empty book reads 50 cents. A chance of null means the market has no price. Don’t estimate a Combo’s payout by multiplying leg prices: legs can be related, and the quote is the price. These fields change with the clock, the book and the market’s state, so read them close to the RFQ. A market can trade alone while combo.status is CLOSED. A one-leg RFQ checks the same fields.

Which legs combine

A Combo holds at most one leg per question. Outcomes of one question share native_question_id (Get market). A standalone market has none and combines with anything. The leg count is on Limits. An accepted RFQ can still get no quote: each maker prices the legs and can decline.

Collect quotes

Each QUOTE_CREATED carries one quote:
payout is what the position pays if every leg wins. QUOTE_REMOVED names a quote that left. Every listed quote can be accepted. Totalis keeps a quote’s terms fresh while it is listed, so a maker’s quote can come back under a new quote_id, with QUOTE_REMOVED for the old one.

Accept

Sign the quote’s signing.entry terms as TakerAccept (Signing). The Idempotency-Key becomes the acceptance_id: choose it before the first send and reuse it on every retry.
The response waits for the maker’s answer:
Read later, an acceptance can also be FILLED or FAILED. Responses carry no clocks, so you never compare against the venue’s clock.

Funding

The accept body is only taker_signature; a funding field is refused with 400 INVALID_REQUEST. If your free vault balance is short of the stake, the venue draws the shortfall from your wallet’s USDC approval to WalletAccept, in the same transaction as the trade. Set the approval once with a gasless permit (Create wallet approval); every entry then draws what it needs until it is spent. The venue draws only your account’s linked wallet, and only under a session or a key with funding:deposit. It never draws the wallet for a cash-out. If the approval or the wallet’s USDC doesn’t cover the shortfall, the trade fails: the operation’s reason is INSUFFICIENT_CASH, and the acceptance’s reason says which part fell short, INSUFFICIENT_APPROVAL or INSUFFICIENT_WALLET_USDC. A short approval fails at once. Missing wallet USDC is waited for at least 6 seconds from the accept’s arrival. So if you bridge USDC from HyperCore to fund the entry, send the bridge once the accept returns ACCEPTED, and within 4 seconds of sending the accept. WALLET_FUNDING_UPDATED reports the funding’s progress.

Lost response

Resend the identical request with the same Idempotency-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

An entry’s position_id is its accepted quote_id:

Cash out

Cash out position opens a cash-out RFQ on an OPEN position you own. The body is an empty JSON object, {}.
Quotes arrive as QUOTE_CREATED, from the maker that backs the position. kind is SELL_BACK, price is what the maker pays, and the terms to sign sit under signing.sell_back:
Sign signing.sell_back as SellBack, then accept it like an entry quote. A cash-out never draws your wallet. On COMMITTED the position closes (POSITION_CLOSED, and the position’s reason is SELL_BACK), and the proceeds land in your vault balance: price less the profit fee on the part above the position’s net_stake, floor((price - net_stake) * fee_bps / 10000), with no fee when price is at or below net_stake (Limits and fees). The SDK’s netCashout(bid, position) computes it from the bid and the position of Get position.

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.