money
swaps
customer-session

Prices one stablecoin swap in the business's Go Account without committing anything, for a client to call as the amount is typed. The rate is indicative; POST /money/swap_quotes fixes a firm one. The estimate runs the quote's checks and reports the first that fails as refusal_reason, except the provider's own balance, which only the quote checks.

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.

get/money/swap_estimate

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_estimate
  • Auth
    none declared

Query parameters

route_id'ethereum_usdc_usdt' required

The route to swap on (GET /money/swap_routes).

from_asset'USDC' | 'USDT' required

The asset sent.

to_asset'USDC' | 'USDT' required

The asset received. Must differ from from_asset.

amountstring required

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

amount_side'send' | 'receive'

Which amount is fixed: send (the default) fixes the amount of from_asset sent; receive fixes the amount of to_asset received, and the server solves the least amount sent that delivers it.

Response

OK

fee_amountstring required

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

fee_bpsinteger required

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

ratestring required

The 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 received, after the fee when to_asset is USDC: a decimal string at six places.

refusal_reason'swap_custody_mode_unsupported' | 'swap_amount_too_small' | 'swap_amount_too_large' | 'movement_limit_exceeded' | 'insufficient_balance' | 'swap_rate_out_of_bounds' nullable required
reviewableboolean required

Whether the swap can go on to a firm quote (POST /money/swap_quotes). False exactly when refusal_reason is set.

send_amountstring required

The amount of from_asset sent, 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.

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

      api tag customer-session added