How it works
Connect to the quote request stream
Open an SSE connection to
GET /v1/mm/quote-requests/stream to receive live quote requests in real time. Maintain a heartbeat every 30 seconds. See the event summary table for every event name this stream sends — including a spelling inconsistency worth knowing about up front.Submit draft quotes
Analyze the legs and submit payout odds via
PUT /v1/mm/quote-requests/{id}/quote for the exact version and request_hash you received. Price payout_odds and size collateral against the net stake (user_stake), not bet_amount — user_stake is what the vault applies your odds to when the taker fee is on.Confirm trades
When a user commits your quote, Totalis creates a real accepted RFQ and sends
quote:accepted. The same mm:quotes:{mm_id} subscription may also receive mm_quote:accepted with details visible only to the selected MM, such as user_id, final quote economics, and exposure legs. Confirm with POST /v1/mm/quotes/{quoteId}/confirm before the deadline to lock in the trade. The user’s stake and your collateral lock together in on chain Solana vaults.Core quoting loop
For most market makers, the integration surface should stay small:| Step | Endpoint |
|---|---|
| Pull market context and current prices | GET /markets |
| Check invalid leg combinations | GET /markets/exclusion-groups |
| Stream live quote requests | GET /v1/mm/quote-requests/stream |
| Submit a draft quote | PUT /v1/mm/quote-requests/{id}/quote |
| Withdraw a draft quote | DELETE /v1/mm/quote-requests/{id}/quote |
| Send liveness heartbeat | POST /v1/mm/heartbeat |
| Receive committed trades | quote:accepted on mm:quotes:{mm_id} |
| Receive accepted trade details | mm_quote:accepted on mm:quotes:{mm_id} |
| Confirm an accepted quote | POST /v1/mm/quotes/{quoteId}/confirm |
GET /v1/wallet to check available USDC and locked funds before quoting at size.
Pricing early cashouts
A user can close an active position before settlement by accepting a buyback price from you, its counterparty MM. You receive cashout requests on the same SSE stream you already subscribe to (GET /v1/mm/quote-requests/stream), as a distinct cashout_request event scoped to you and never broadcast. Respond with one of:
| Action | Endpoint |
|---|---|
| Submit / update a buyback quote | PUT /v1/mm/cashout-requests/{id}/quote |
| Decline (permanent refuse) | POST /v1/mm/cashout-requests/{id}/decline |
Fair value
Revalue the position at live odds:fair_value = fair_win_prob × total_payout, where fair_win_prob is the parlay’s current joint win probability. Convert that to a directional quote by shrinking it with a conservative exit edge that is MM favorable in both directions — you pay less when the user is up, the user pays more when they’re down. A partial settle buyback (some legs already resolved and pinned at certainty) uses a wider edge. The user’s stake is always refunded separately; your quote is the directional net amount on top of it, gross of the profit fee.
When to refuse
Pricing runs a fixed sequence of gates; the first match wins. There are two kinds of outcome:- Permanent decline — the position can’t be priced and won’t become priceable on retry. Call the decline endpoint; the user sees an instant
declined. - Transient refuse — a leg has no trustworthy live price right now (a wide book or a feed blip). Submit nothing and stay silent; the request rides its ~90 s TTL so a later quote can still land.
| Gate | Condition | Outcome |
|---|---|---|
| Unrecognized resolution | a leg’s resolution isn’t a known value | permanent decline |
| Worthless | any leg resolved lost or void | permanent decline |
| Already decided | all legs resolved won (settlement pays full value shortly) | permanent decline |
| Malformed | a leg is missing its ticker or side | permanent decline |
| No live price | a leg has no trustworthy live book (spread too wide / stale) | transient — stay silent |
| Near decided | a leg’s live price is outside the [0.05, 0.95] odds band, so repricing is unreliable | permanent decline |
Get set up
Get an API key
Generate an API key from the Totalis Dashboard to authenticate REST and SSE requests.
Live quote requests
Learn the full trading flow: versioned quote requests, SSE streaming, commit protection, and rejection codes.
Rate limits
Authenticated clients get 300 req/min across REST endpoints, with
X-RateLimit-* headers on every response.MM API reference
Full endpoint reference for the MM side of the Quote Service.
