Quote a swap
Changed onMints a firm quote for one stablecoin swap in the business's Go Account: the provider's all-in rate, the business's swap fee frozen at its current schedule, and the amounts sent and received, until expires_ts. The swap create consumes the quote by id, once. Nothing moves until then.
Every check runs before the quote is stored, and a failed check answers its error code: swap_custody_mode_unsupported, swap_amount_too_small, swap_amount_too_large, movement_limit_exceeded (the swap daily limit), insufficient_balance, swap_provider_balance_unsettled, swap_rate_out_of_bounds, then swap_route_unavailable (503) when the provider cannot quote. Requires kyb_locked, and assets_buy to swap USDC out or assets_sell to swap USDT into USDC. A business whose swap money movement type is off is refused with 403 money_movement_type_disabled.
Requires an Idempotency-Key. A key already used with the same body is refused with 409 duplicate_idempotency_key, and with a different body with 400 idempotency_key_body_mismatch; neither returns the original quote, so keep the quote_id from the first answer. A refused request claims no key and can be sent again.
Request
- Base URLhttps://api.stablesea.com (the document declares no server; this is the origin it was published from)
- URLhttps://api.stablesea.com/money/swap_quotes
- Authnone declared. Required headers: Idempotency-Key
Headers
Required client idempotency key; a duplicate submission with the same key is rejected with 409.
Request body
Response
OK
Changes
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info
- info
api tag
customer-sessionadded
- info