Quote service
Commit Cashout
Accept the winning bid on an early cashout auction and drive it on-chain.
POST
Accept the winning bid on the user’s early cashout auction and drive it on-chain. The bid is the price — there is no MM-confirm round-trip. You must echo back the price the user accepted (see the request body); the exit is only ever filled at or above it. Signatures are obtained server-side via Privy at execution.
On success you receive
A Privy JWT (
The body is strict — an unknown field is a
min_price_micro (or better) either way, but the position ends up in one of two states, decided server-side by who won: if the winning bid came from the position’s own counterparty the position closes — your stake is released and the RFQ flips to bought_back. If it came from any other market maker the position transfers to them and stays open under new ownership; you are out of it, and the RFQ does not become bought_back.
This endpoint is idempotent per (request, user): a committed result is cached for 5 minutes and replayed with 200 OK. The replay returns the original outcome verbatim — a retry that sends a different min_price_micro still gets the first commit’s result, and the new floor is not re-evaluated. Retry with the same value you first sent.
Indeterminate commits never double-spend. If the on-chain outcome is unknown (timeout or transient RPC failure), the request stays
committing and returns 503 with details.indeterminate: true. Branch on that boolean, not on details.reason — the reason is a coarse execution-layer code and is not a stable taxonomy. 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. Most are retryable against a live book, but already_transferred is terminal for the position — stop, and re-read the position rather than reopening an auction.Authentication
API key required. Pass your API key in theX-API-Key header.
Authorization: Bearer <jwt>) is also accepted — see Authentication.
Path parameters
string
required
The cashout request ID (UUID).
Request body
integer
required
The price the user accepted on screen, in micro-USDC — echo back the
price_micro from the
best_quote frame you displayed. Required: a commit that does not state the accepted price is
a 400, because nothing is ever filled at a price the user did not see.The fill uses the best live bid at commit time, floored at this value: a better bid fills at the
better price, and a book that has moved below it fails with 409 price_below_accepted (the
response carries best_price_micro) leaving the auction open to re-tap.400.
Response
Returns201 Created on a fresh commit, or 200 OK when replaying a cached idempotent result.
object

