Quote service
Stream Cashout Quote
Subscribe to the live buyback quote and terminal status for a cashout request via Server Sent Events.
GET
Open a Server Sent Events (SSE) stream to follow a cashout request. Because a cashout is offered to a single counterparty market maker, the stream surfaces that MM’s buyback quote as the degenerate “best quote”. It also sends a terminal
A Privy JWT (
Sent when the MM’s buyback quote changes (submitted, replaced, or expired). The
When no quote is live,
Sent once the request leaves
This is a single event — the stream closes right after it. That’s different from the quote-request stream, where
status frame when the request leaves the active/committing states.
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).
SSE event types
best_quote
Sent when the MM’s buyback quote changes (submitted, replaced, or expired). The book_seq increments monotonically so you can detect missed updates. best_quote is null when there is no live quote.
The directional buyback
amount the MM quoted (USDC, ≥ 0), gross of the profit fee.true when the MM pays the user (position is in profit); false when the user pays the MM.The net cash the user walks away with after the buyback (USDC, ≥ 0) — stake plus/minus the directional amount, net of fees. Present only when computable; omitted otherwise.
best_quote is null:
status
Sent once the request leaves active/committing, then the stream closes. The status is the terminal cashout request state.
status is followed immediately by a second, more specific terminal event (committed, cancelled, or expired) before the stream closes. The cashout stream skips that second event: status alone is the terminal signal here.
Terminal status | Meaning |
|---|---|
committed | Buyback driven on chain; the RFQ becomes bought_back. |
declined | The MM permanently refused to quote (near decided / unpriceable leg). |
expired | The request’s ~90 s TTL elapsed with no commit. |
cancelled | The request was cancelled. |
Errors
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | You do not own this cashout request. |
| 404 | NOT_FOUND | Cashout request not found. |
