Skip to main content
POST
/
api
/
quotes
curl --request POST \ --url https://api.sandbox.tracefinance.com/api/quotes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Idempotency-Key: <x-idempotency-key>' \ --data ' { "accountId": "a1b2c3d4-5e6f-7890-abcd-ef1234567890", "sourceAsset": "BRL", "targetAsset": "USDT", "sourceAmount": "500.00" } '
{ "id": "d4e5f6a7-b8c9-0123-defa-2345678901bc", "customerId": "11111111-1111-1111-1111-111111111111", "account": { "id": "a1b2c3d4-5e6f-7890-abcd-ef1234567890", "owner": "Acme Importação Ltda" }, "sourceAmount": { "value": "500.00", "asset": "BRL", "decimals": 2 }, "targetAmount": { "value": "100.000000", "asset": "USDT", "decimals": 6 }, "effectiveRate": { "value": "0.20", "base": "BRL", "quote": "USDT" }, "expiresAt": "2026-04-25T02:39:47Z" }

Documentation Index

Fetch the complete documentation index at: https://tracefinance-docs-withdrawal-beneficiary-events.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

JWT bearer token. Include as Authorization: Bearer <token>. See the Authentication guide for how to obtain one.

Headers

X-Idempotency-Key
string<uuid>
required

Unique key to ensure idempotent request processing. Required on all POST, PUT, and PATCH requests.

X-Trace-Version
string

API version. Omit to use the default version.

Example:

"1"

Body

application/json

Quotes lock an FX rate (or a 1:1 spot for same-asset) for a short window and are required by every operation creation endpoint. A quote is bound to a specific account and can be consumed by exactly one operation on that account.

Provide exactly one of sourceAmount or targetAmount:

  • sourceAmount — fix the amount you'll spend; the target side is computed.
  • targetAmount — fix the amount the beneficiary receives; the source side is computed.

Same-asset quotes (sourceAsset == targetAsset) are valid and return a 1:1 spot with zero spread.

accountId
string<uuid>
required

Account the quote is bound to. The consuming operation must reference the same account.

Example:

"a1b2c3d4-5e6f-7890-abcd-ef1234567890"

sourceAsset
enum<string>
required

ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:

AssetDecimalsAssetDecimals
USD2NZD2
BRL2CHF2
EUR2NOK2
CAD2DKK2
AUD2PLN2
GBP2SEK2
MXN2USDC6
HKD2USDT6
SGD2EURC6
PHP2BRLT6
Available options:
USD,
BRL,
EUR,
CAD,
AUD,
GBP,
MXN,
HKD,
SGD,
PHP,
NZD,
CHF,
NOK,
DKK,
PLN,
SEK,
USDC,
USDT,
EURC,
BRLT
Example:

"BRL"

targetAsset
enum<string>
required

ISO 4217 currency code or stablecoin ticker. The maximum decimal scale of an AmountValue paired with this asset depends on the asset:

AssetDecimalsAssetDecimals
USD2NZD2
BRL2CHF2
EUR2NOK2
CAD2DKK2
AUD2PLN2
GBP2SEK2
MXN2USDC6
HKD2USDT6
SGD2EURC6
PHP2BRLT6
Available options:
USD,
BRL,
EUR,
CAD,
AUD,
GBP,
MXN,
HKD,
SGD,
PHP,
NZD,
CHF,
NOK,
DKK,
PLN,
SEK,
USDC,
USDT,
EURC,
BRLT
Example:

"BRL"

sourceAmount
string

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

Pattern: ^-?\d+(\.\d+)?$
Example:

"500.00"

targetAmount
string

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

Pattern: ^-?\d+(\.\d+)?$
Example:

"500.00"

Response

Quote created.

A quote that can be consumed by an operation. Expires after a short window.

id
string<uuid>
required
read-only
customerId
string<uuid>
required
account
object
required

Reference to a customer account, including the registered owner name.

sourceAmount
object
required

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.

targetAmount
object
required

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.

effectiveRate
object
required

Exchange rate between two currencies.

expiresAt
string<date-time>
required

Time at which the quote expires. Operations referencing the quote after this fail with QUOTE_EXPIRED.