Quote service
Commit Cashout
Accept the live buyback quote and drive the early cashout on chain.
POST
Accept the market maker’s live buyback quote and drive the early cashout on chain through the vault buyback lane. The quote is the price — there’s no MM confirm round trip. Signatures are obtained server side via Privy at execution. On success, the position is bought back, your stake is released, and the RFQ flips to
A Privy JWT (
bought_back.
This endpoint is idempotent per (request, user): a committed result is cached for 5 minutes and replayed with 200 OK.
Indeterminate commits never double spend. If the on chain buyback’s outcome is unknown (timeout or transient RPC failure), the request stays
committing and returns 503 with details.indeterminate: true. A reconciler resolves it against on chain state — do not treat a 503 as a failure or assume nothing happened. Reopen the stream and wait for the terminal status. A determinate failure (409) means nothing landed; you may retry.Authentication
API key required. Pass your API key in theX-API-Key header.
Authorization: Bearer <jwt>) is also accepted — see Authentication.
Path parameters
The cashout request ID (UUID).
Request body
No body. The committed quote is the livebest_quote on the request.
Response
Returns201 Created on a fresh commit, or 200 OK when replaying a cached idempotent result.
Errors
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | You do not own this cashout request (details.reason: not_owner). |
| 404 | NOT_FOUND | Cashout request not found. |
| 409 | CONFLICT | No live quote (quote_expired), request not active, missing wallet info (missing_wallet), already locked, or a determinate on chain failure. See details.reason. |
| 410 | GONE | The cashout request expired before commit. |
| 503 | SERVICE_UNAVAILABLE | Indeterminate — the buyback may have landed. details.indeterminate is true and details.reason is e.g. lane_unreachable / buyback_in_flight; the request stays committing for the reconciler. Don’t retry blindly. |
