Skip to main content
PUT
/
v1
/
mm
/
quote-requests
/
{id}
/
quote
curl -X PUT https://api.totalis.trade/v1/mm/quote-requests/1a6d1f06-9d4f-47cb-994b-3bdfbbef7e40/quote \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_version": 1,
    "request_hash": "sha256:9f86d08...",
    "payout_odds": 4.25,
    "expires_in_ms": 15000
  }'
{
  "data": {
    "quote": {
      "id": "b2c3d4e5-6789-0abc-def1-234567890abc",
      "market_maker_id": "mm-uuid-1234",
      "request_version": 1,
      "request_hash": "sha256:9f86d08...",
      "payout_odds": 4.25,
      "user_cost": 25,
      "total_payout": 106.25,
      "mm_cost": 81.25,
      "valid_until": "2026-06-01T18:45:45.000Z"
    },
    "book_seq": 5,
    "replaced": false
  }
}
Submit a quote for an active quote request. If you already have an active quote for the same request version, it is replaced atomically. Only one active quote per market maker per request version is allowed. When the user updates their request (changing legs or bet amount), the version and request_hash change, and your existing quote is automatically invalidated. Listen for quote_request:updated events on the SSE stream to detect version changes and re-price.
Moving to a new version takes no withdraw. A quote is scoped to a single (request, version) pair. When the request advances to a new version, your prior-version quote is invalidated automatically — it leaves the book at once, can no longer be accepted, and never blocks a new submission. To quote the new version, simply PUT again with the new request_version and request_hash from the latest quote_request:updated event. There is no need to withdraw the old quote first.A 409 with reason: version_mismatch is not caused by an outstanding prior quote. It means the request_version and/or request_hash in your body no longer match the live request — you priced a stale version, or the slip changed again while you were pricing. Re-read the latest stream event and submit with both current values (they must both match).

Authentication

API key required. Pass your market maker API key in the X-API-Key header.
X-API-Key: <key>

Path Parameters

id
string
required
The quote request ID (UUID).

Request Body

request_version
integer
required
The version of the quote request you priced. Must match the current version from the SSE stream.
request_hash
string
required
The request_hash from the quote request event. Prevents pricing against stale data.
payout_odds
number
required
Payout multiplier on the user’s bet amount. Between 1.0001 and 1000. The server derives all cost fields (user_cost, total_payout, mm_cost) from this value and the request’s bet_amount.
expires_in_ms
integer
How long this quote is valid, in milliseconds. Range: 5000-60000. Default: 15000.

Response

Returns 201 Created for a new quote or 200 OK when replacing an existing quote.
data
object

Conflict Reasons

When a submit is rejected with 409 Conflict, the error.details.reason field explains why:
ReasonDescription
not_foundQuote request ID does not exist.
expiredQuote request has expired.
not_activeQuote request is committed, cancelled, or otherwise inactive.
version_mismatchYour request_version and/or request_hash don’t match the live request — you priced a stale version, or it changed while you were pricing. Re-read the latest quote_request / quote_request:updated event and submit both current values. This is not caused by a still-open prior quote, so there is nothing to withdraw.
self_quoteYou cannot quote your own requests.

Errors

StatusCodeDescription
400VALIDATION_ERRORInvalid body. See details.issues.
401UNAUTHORIZEDMissing or invalid API key.
409CONFLICTQuote rejected. See details.reason above.
curl -X PUT https://api.totalis.trade/v1/mm/quote-requests/1a6d1f06-9d4f-47cb-994b-3bdfbbef7e40/quote \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_version": 1,
    "request_hash": "sha256:9f86d08...",
    "payout_odds": 4.25,
    "expires_in_ms": 15000
  }'
{
  "data": {
    "quote": {
      "id": "b2c3d4e5-6789-0abc-def1-234567890abc",
      "market_maker_id": "mm-uuid-1234",
      "request_version": 1,
      "request_hash": "sha256:9f86d08...",
      "payout_odds": 4.25,
      "user_cost": 25,
      "total_payout": 106.25,
      "mm_cost": 81.25,
      "valid_until": "2026-06-01T18:45:45.000Z"
    },
    "book_seq": 5,
    "replaced": false
  }
}