Skip to main content

Overview

Swaps convert funds between assets within the same account — for example, BRL to USDT or USDC to BRL. Every swap references a quote that locks the FX rate. Once executed, a swap cannot be reversed.

Prerequisites

Steps

1

Create a quote

Specify the source asset, target asset, and either the amount you want to spend (sourceAmountValue) or the amount you want to receive (targetAmountValue), never both.
The response returns the quote id, the locked effectiveRate, the computed destinationAmount, and expiresAt. The quote belongs to your customer, not to an account, and can be consumed by exactly one operation before it expires.
2

Create the swap

Reference the account and the quote. No other inputs are needed — source and target assets and amounts are derived from the quote.
Returns 201 immediately with the operation in REQUESTED status. Settlement happens asynchronously.
3

Track the swap

Subscribe to OPERATION_COMPLETED and OPERATION_FAILED to receive the terminal outcome — both deliver the same payload as OPERATION_REQUESTED, with data.currentState.status set to the new status (and data.currentState.reason populated on failure). Between creation and the outcome, OPERATION_PROCESSING fires exactly once, the moment the swap starts executing.
Swaps are forward-only. Once executed at the quoted rate, they cannot be reversed. Verify the effectiveRate on the quote before creating the swap.

What happens next