API Reference
Operations

Create a quote

POST/v1/quotes
Base URL: https://trace.mimicr.dev · provider: https://api.sandbox.tracefinance.com

Creates a quote that locks an FX rate for a short window. The withdrawal, swap, and deposit operation endpoints require a quoteId — see the request body of POST /v1/operations/withdrawals, POST /v1/operations/swaps, or POST /v1/operations/deposits. Same-asset quotes (sourceAsset == targetAsset) are valid and return a 1:1 spot with zero spread, so callers can use the same flow for fiat and FX. A quote is bound 1:1 to an operation: once consumed, it cannot be reused. Quotes also expire after a short window (see expiresAt in the response).

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Headers

X-Idempotency-Keystring<uuid>required

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

X-Trace-Versionstring

API version. Omit to use the default version.

Example: "1"

Body

application/json
accountIdstring<uuid>required

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

Example: "a1b2c3d4-5e6f-7890-abcd-ef1234567890"
sourceAssetstringrequired

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

AssetDecimals
BRL2
USDT6
USDC6
BRLUSDTUSDC
Example: "BRL"
targetAssetstringrequired

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

AssetDecimals
BRL2
USDT6
USDC6
BRLUSDTUSDC
Example: "BRL"
sourceAmountstring

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.

Example: "500.00"
targetAmountstring

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.

Example: "500.00"

Responses

201Quote created.
idstring<uuid>required
customerIdstring<uuid>required
accountobjectrequired

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

Show child attributes
idstring<uuid>required

Account identifier.

Example: "a1b2c3d4-5e6f-7890-abcd-ef1234567890"
ownerstringrequired

Registered owner name on the account.

Example: "Acme Importação Ltda"
sourceAmountobjectrequired

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.

Show child attributes
valuestringrequired

Decimal amount in the asset's canonical scale.

Example: "500.00"
assetstringrequired

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

AssetDecimals
BRL2
USDT6
USDC6
BRLUSDTUSDC
Example: "BRL"
decimalsintegerrequired

Number of decimal places for the asset.

Example: 2
targetAmountobjectrequired

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.

Show child attributes
valuestringrequired

Decimal amount in the asset's canonical scale.

Example: "500.00"
assetstringrequired

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

AssetDecimals
BRL2
USDT6
USDC6
BRLUSDTUSDC
Example: "BRL"
decimalsintegerrequired

Number of decimal places for the asset.

Example: 2
effectiveRateobjectrequired

Exchange rate between two assets.

Show child attributes
valuestringrequired

Rate value as a decimal string, expressed as quote units per one base unit.

Example: "5.25"
basestringrequired

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

AssetDecimals
BRL2
USDT6
USDC6
BRLUSDTUSDC
Example: "BRL"
quotestringrequired

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

AssetDecimals
BRL2
USDT6
USDC6
BRLUSDTUSDC
Example: "BRL"
expiresAtstring<date-time>required

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

400Validation error.
codestringrequired

Machine-readable error code.

messagestringrequired

Human-readable description.

detailsobject
401Missing or invalid authentication token.
codestringrequired

Machine-readable error code.

messagestringrequired

Human-readable description.

detailsobject
422Quote could not be created (no rate available, asset pair unsupported, etc.).
codestringrequired

Machine-readable error code.

messagestringrequired

Human-readable description.

detailsobject