Skip to main content
Live quote requests are the core trading mechanism on Totalis. You create a parlay with 2-5 market legs, market makers compete to price it in real time, and you lock in the best offer when you’re ready. All endpoints use the /v1/ prefix on the Quote Service base URL.

How it works

1

Create a quote request

Call POST /v1/quote-requests with your parlay legs and bet amount. You can update legs or bet amount with PATCH /v1/quote-requests/{id} — each change bumps the version and invalidates stale quotes.
2

Stream live pricing

Open an SSE connection to GET /v1/quote-requests/{id}/stream to receive best_quote events as market makers submit and update their offers. Each event includes book_seq (monotonically increasing) and the current best payout multiplier.
3

Market makers price your request

Connected market makers receive your request via their SSE stream and submit competing quotes via PUT /v1/mm/quote-requests/{id}/quote. You always see the best available offer.
4

Commit the best quote

When you’re satisfied with the price, call POST /v1/quote-requests/{id}/commit. The commit includes protection fields that prove you saw the current price, preventing stale execution.
5

Trade confirmation

The winning market maker receives a quote:accepted event via WebSocket and confirms the trade. Vault settlement begins automatically.

Commit protection

The commit endpoint requires these fields to ensure you’re locking in the price you actually saw:

Rejection codes

If a commit fails, error.details.reason tells you why:

For market makers

Receiving quote requests

Connect to the MM SSE stream to receive quote requests in real time. On initial connection you receive a snapshot of all active requests, then incremental updates as new requests arrive.

Submitting quotes

Call PUT /v1/mm/quote-requests/{id}/quote with the request_version and request_hash from the SSE event. One active quote per request version — submitting again replaces your previous quote. Send only the fields below; the server derives user_cost, total_payout, and mm_cost from payout_odds and the request’s bet_amount.
Keep quotes short-lived (default 15s). When the request changes to a new version, your prior-version quote is invalidated automatically — just re-price and PUT a new quote with the new version and request_hash. You don’t need to withdraw the old one.

Withdrawing quotes

Call DELETE /v1/mm/quote-requests/{id}/quote to retract a quote on the current version before the user commits it — for example, if your price moved and you want to stand down. This is not part of the version-change flow: a new version already invalidates your prior quote, so you don’t withdraw to re-quote.

SSE event format

Events on the user stream (/v1/quote-requests/{id}/stream):
When no quotes are active, best_quote is null. Store book_seq and best_quote.id from the latest event — you’ll need them for the commit request.

Quote request object