money
swaps
customer-session

Mints 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.

post/money/swap_quotes

Request

  • Base URL
    https://api.stablesea.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.stablesea.com/money/swap_quotes
  • Auth
    none declared. Required headers: Idempotency-Key

Headers

Idempotency-Keystring required

Required client idempotency key; a duplicate submission with the same key is rejected with 409.

Request body

amountstring required

The amount on amount_side: a positive decimal of at most six places, no separators.

amount_side'send' | 'receive'
from_asset'USDC' | 'USDT' required
route_id'ethereum_usdc_usdt' required
to_asset'USDC' | 'USDT' required

Response

OK

expires_tsstring date-time required

When the quote stops being offered. A swap created from it at or after this instant is refused.

fee_amountstring required

The swap fee, always in USDC: a decimal string at six places.

fee_bpsinteger required

The swap fee rate the quote freezes, in basis points of the swap's USDC side.

from_asset'USDC' | 'USDT' required
quote_idstring required

The quote's id. The swap create consumes it, once, before expires_ts.

ratestring required

The firm all-in exchange rate, to_asset per one from_asset, before the swap fee: a decimal string at eight places.

receive_amountstring required

The amount of to_asset the swap delivers, after the fee when to_asset is USDC: a decimal string at six places.

route_id'ethereum_usdc_usdt' required
send_amountstring required

The amount of from_asset the swap sends, fee included when from_asset is USDC: a decimal string at six places.

spread_bpsstring required

How far rate is from 1:1, in basis points, as a decimal string at two places: positive when the business receives less than it sends, before the fee.

to_asset'USDC' | 'USDT' required

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

      api tag customer-session added