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.
Overview
Swaps convert funds between assets within the same account — for example, BRL to USDT or USD to BRL. Every swap references a quote that locks the FX rate. Once executed, a swap cannot be reversed.Prerequisites
- An active account with sufficient balance in the quote’s source asset.
- Valid authentication credentials.
Steps
Create a quote
Specify the source asset, target asset, and either the amount you want to spend (The response returns the quote
sourceAmount) or the amount you want to receive (targetAmount).id, the locked effectiveRate, the computed targetAmount, and expiresAt. The quote is bound to the account and can be consumed by exactly one operation before it expires.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.Track the swap
Subscribe to
OPERATION_COMPLETED and OPERATION_FAILED to receive the terminal outcome — both deliver the same payload as OPERATION_REQUESTED, with currentState.status set to the new status (and currentState.reason populated on failure). The intermediate PROCESSING status is not published as a webhook; poll GET /api/operations/{operationId} if you need to surface it in your UI.What happens next
- Make a withdrawal — send the converted funds out of the account.