> ## Documentation Index
> Fetch the complete documentation index at: https://docs.totalis.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Commit quote request

> Lock in the best available quote and create a trade.

Commit the best available quote on an active quote request. The server revalidates every market, selects the best quote at or above your `min_payout_odds_seen`, and creates the trade atomically. The trade is an [RFQ](/solana/glossary#the-noun-stack) with its own `rfq_id`.

The body ties the commit to exactly what you last saw, so you never fill at a stale price.

After a successful commit, the selected market maker receives a `quote:accepted` event and must confirm before `confirmation_deadline`. It may also receive `mm_quote:accepted` on its private `mm:quotes:{mm_id}` channel, with the final quote economics and exact exposure legs. Vault settlement follows.

## Authentication

Send your API key in the `X-API-Key` header. The key needs the `trading:write` scope.

```
X-API-Key: <your-api-key>
```

A Privy JWT (`Authorization: Bearer <jwt>`) is also accepted. See [Authentication](/solana/authentication).

## Path parameters

<ParamField path="id" type="string" required>
  The quote request ID (UUID).
</ParamField>

## Request body

<ParamField body="expected_version" type="integer" required>
  The quote request `version` you are committing against. If the request has changed since, the commit is rejected.
</ParamField>

<ParamField body="displayed_quote_id" type="string" required>
  The `id` of the best quote you saw at commit time.
</ParamField>

<ParamField body="displayed_quote_book_seq" type="integer" required>
  The `book_seq` from the SSE event that delivered the displayed quote. It proves your data was up to date.
</ParamField>

<ParamField body="min_payout_odds_seen" type="number" required>
  The minimum payout odds you were shown. Only quotes at or above it are eligible. Must be at least 1.0001.
</ParamField>

## Response

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="status" type="string">`"committed"`</ResponseField>
    <ResponseField name="quote_request_id" type="string">The quote request ID.</ResponseField>
    <ResponseField name="rfq_id" type="string">The created RFQ ID for vault settlement.</ResponseField>
    <ResponseField name="quote_id" type="string">The selected quote ID.</ResponseField>
    <ResponseField name="selected_payout_odds" type="number">The payout odds that were locked in.</ResponseField>
    <ResponseField name="confirmation_deadline" type="string">ISO 8601 deadline by which the market maker must confirm.</ResponseField>
  </Expandable>
</ResponseField>

## Rejection reasons

A rejected commit carries its reason in `error.details.reason`. What each reason means and how to respond is on [Errors](/solana/errors#committing-a-quote).

| Reason | Status |
| - | - |
| `QUOTE_CHANGED` | `409` |
| `MARKET_NOT_LIVE` | `409` |
| `QUOTE_EXPIRED` | `409` |
| `COMMIT_FAILED` | `409` |
| `COMMIT_FAILED_RETRYABLE` | `503` |
| `mm_confirmation_timeout` | `409` |

## Errors

| Status | Code | Description |
| - | - | - |
| 400 | `VALIDATION_ERROR` | Missing or invalid commit fields. |
| 401 | `UNAUTHORIZED` | Missing or invalid API key. |
| 403 | `FORBIDDEN` | You do not own this quote request. |
| 404 | `NOT_FOUND` | Quote request not found. |
| 409 | `CONFLICT` | Commit rejected. See [Rejection reasons](#rejection-reasons). |
| 503 | `SERVICE_UNAVAILABLE` | Transient failure. Retry after a short delay. |

<RequestExample>
  ```bash theme={null}
  curl -X POST https://api.totalis.trade/v1/quote-requests/1a6d1f06-9d4f-47cb-994b-3bdfbbef7e40/commit \
    -H "X-API-Key: $TOTALIS_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "expected_version": 3,
      "displayed_quote_id": "b2c3d4e5-6789-0abc-def1-234567890abc",
      "displayed_quote_book_seq": 5,
      "min_payout_odds_seen": 4.0
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "data": {
      "status": "committed",
      "quote_request_id": "1a6d1f06-9d4f-47cb-994b-3bdfbbef7e40",
      "rfq_id": "c3d4e5f6-7890-abcd-ef12-34567890abcd",
      "quote_id": "d4e5f6a7-8901-bcde-f234-567890abcdef",
      "selected_payout_odds": 4.0,
      "confirmation_deadline": "2026-06-01T18:45:35.000Z"
    }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.