Create a quote
Locks an FX rate for a short window. Required by every operation creation endpoint.
Authorizations
JWT bearer token. Include as Authorization: Bearer <token>. See the Authentication guide for how to obtain one.
Headers
API version. Omit to use the default version.
"1"
Body
Quotes lock an FX rate (or a 1:1 spot for same-asset) for a short window and are required by the withdrawal, swap and deposit operation endpoints. A quote belongs to your customer, not to an account, and can be consumed by exactly one operation.
Provide exactly one of sourceAmountValue or targetAmountValue. Sending both, or neither, fails with EXACTLY_ONE_AMOUNT_MUST_BE_PROVIDED. A field the request does not define, such as accountId or sourceAmount, is ignored, so a request that names the amount with the wrong field fails the same way.
sourceAmountValue— fix the amount you'll spend; the destination side is computed.targetAmountValue— fix the amount the beneficiary receives; the source side is computed.
The amount must be greater than zero and at least 1.00, whichever field carries it.
Same-asset quotes (sourceAsset == targetAsset) are valid and return a 1:1 spot with zero spread.
ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:
BRL, USDT, USDC "BRL"
ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:
BRL, USDT, USDC "BRL"
Decimal monetary amount in the associated asset. The number of fractional digits must not exceed the asset's precision — see Asset for the per-asset table. Exceeding the precision fails with AMOUNT_PRECISION_EXCEEDED.
^-?\d+(\.\d+)?$"500.00"
Decimal monetary amount in the associated asset. The number of fractional digits must not exceed the asset's precision — see Asset for the per-asset table. Exceeding the precision fails with AMOUNT_PRECISION_EXCEEDED.
^-?\d+(\.\d+)?$"500.00"
Response
Quote created.
A quote that can be consumed by an operation. Expires after a short window, except a same-asset quote, which does not expire.
Customer the quote belongs to.
Monetary amount expressed as a decimal string in the asset's canonical scale. Use a decimal-precision library (BigDecimal, Decimal) for arithmetic — never JavaScript Number. Request bodies use the scalar AmountValue instead.
Monetary amount expressed as a decimal string in the asset's canonical scale. Use a decimal-precision library (BigDecimal, Decimal) for arithmetic — never JavaScript Number. Request bodies use the scalar AmountValue instead.
Exchange rate of a quote as an integer and a scale: the rate is value divided by 10 to the power of decimals. Operations return their rate as a decimal string instead (see Rate).
Time at which the quote expires. Operations referencing the quote after this fail with QUOTE_EXPIRED. null on a same-asset quote, which does not expire.
Time at which the quote was created.