---
title: "Quote a swap"
method: POST
path: "/money/swap_quotes"
tags: ["money", "swaps", "customer-session"]
---

# Quote a swap

`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`

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.

## Headers

- `Idempotency-Key` string, required: Required client idempotency key; a duplicate submission with the same key is rejected with 409.

## Request body

- SwapsCreateQuoteInput
  - `amount` string, 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 `200`

OK

- SwapsQuoteOutput
  - `expires_ts` string, date-time, required: When the quote stops being offered. A swap created from it at or after this instant is refused.
  - `fee_amount` string, required: The swap fee, always in USDC: a decimal string at six places.
  - `fee_bps` integer, required: The swap fee rate the quote freezes, in basis points of the swap's USDC side.
  - `from_asset` 'USDC' | 'USDT', required
  - `quote_id` string, required: The quote's id. The swap create consumes it, once, before expires_ts.
  - `rate` string, required: The firm all-in exchange rate, to_asset per one from_asset, before the swap fee: a decimal string at eight places.
  - `receive_amount` string, 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_amount` string, required: The amount of from_asset the swap sends, fee included when from_asset is USDC: a decimal string at six places.
  - `spread_bps` string, 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

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `409`: Conflict
- `503`: Service Unavailable
- `default`: Error response.

## Changes

- **2026-10-29** `e003c8a67b62`: 6 info
  - added the optional property `error/authorization` to the response with the `400` status
  - added the optional property `error/authorization` to the response with the `401` status
  - added the optional property `error/authorization` to the response with the `403` status
  - added the optional property `error/authorization` to the response with the `409` status
  - …2 more
- **2026-10-26** `d133adcfb3dc`: 1 info
  - api tag `customer-session` added
- **2026-10-26** `aa0e969ab6e6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/stablesea/apis/stable-sea-backend/changes/money/swap_quotes/post.md)

---

[API](https://skmtc.dev/stablesea/apis/stable-sea-backend.md) - [All operations](https://skmtc.dev/stablesea/apis/stable-sea-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/stablesea/apis/stable-sea-backend/revisions/772c80d83658?raw)
