Splitting quote and trade forces deterministic execution: the rate you saw is
the rate that executes, or the trade fails; execution never silently
re-prices. Your retry strategy follows from this. After QUOTE_EXPIRED or
TRADE_EXECUTION_FAILED, request a new quote and retry the trade with a NEW
idempotency key; replaying the same key returns the cached failure.
The trading flow
Endpoints
Quote lifecycle
Quotes are short-lived: 3 seconds by default. You can extend via thequoteForSeconds request parameter.
quoteForSeconds accepts a closed set of standard durations: 3, 15,
30, 45, 60 seconds.POST /v3/fx/trades/{id}/reverse-quote) defaults quoteForSeconds to 15 seconds. It can return TRADE_NOT_FOUND or TRADE_NOT_REVERSIBLE; POST /v3/fx/trades/{id}/reverse can also return QUOTE_NOT_FOUND, QUOTE_EXPIRED, QUOTE_ALREADY_CONSUMED, and TRADE_INSUFFICIENT_BALANCE.
The quote is binding only if you execute POST /v3/fx/trades before expiresAt. Once expired, executing returns 409 QUOTE_EXPIRED; request a new quote and execute against the new id.
Retrieving a quote
You can fetch a previously-created quote by ID for 2 days from itscreatedAt. The endpoint reads from durable storage, not the create-call’s idempotency cache, so the quote stays retrievable long after the 30-minute idempotency TTL has expired. After 2 days, GET /v3/fx/quotes/{id} returns 404 QUOTE_NOT_FOUND, the same as an unknown ID.
Quote status
GET /v3/fx/quotes/{id} includes a status field not present on the POST /v3/fx/quotes create response:
After execution
The execute response returns theTrade. IMMEDIATE and T0 trades are already EXECUTED; a T1 or T2 trade waits for its settlement window. The statuses, the settle and reverse actions, and the webhooks for each are on Trades.
Common mistakes
- Expired quote (QUOTE_EXPIRED). Quotes default to 3 seconds. Recover by re-quoting and retrying with a NEW idempotency key.
- Execution failed mid-flight (TRADE_EXECUTION_FAILED). Call
GET /v3/fx/trades/{id}first to check state before retrying. - Idempotency key replay (IDEMPOTENCY_MISMATCH). Reusing a key with a different request body returns
422IDEMPOTENCY_MISMATCH.
What’s next
Trades
Trade statuses, settlement windows, and the settle and reverse actions.
Settlement models
Netted vs Per-Trade settlement models, plus deposits and withdrawals.
Trade webhooks
Push notifications for ready-to-settle, settled, and reversed trades.
Quickstart
Worked end-to-end: quote → trade → balance.
Idempotency
Why both /quotes and /trades require keys.