How Swaps Work
Swaps follow a simple three-step process:- Create a swap – Initiate a swap request with source and destination
- Review quote – Examine the exchange rate, fees, and quote validity period
- Accept swap – Confirm the transaction to execute the swap
Quote Validity
Quotes are time-sensitive and typically expire within 30-60 seconds. This ensures you get current market rates and prevents stale pricing. If a quote expires before you accept it, you’ll need to create a new swap request to get updated pricing.Transaction Structure
When you create a swap, the API response includes detailed information about the transaction:Source
Source
Destination
Destination
Quote
Quote
Billing
Billing
Transaction Status
Swap transactions progress through several statuses:- CREATED: Swap request has been created and is awaiting processing
- PROCESSING: Currency exchange is being executed
- COMPLETED: Swap has been successfully completed
- FAILED: Swap failed (check
error
anderrorDetails
for details)
Quote Information
The quote includes both gross and net amounts for both sending and receiving:- sendGross: Total amount you’re sending (including any fees)
- sendNet: Net amount after fees are deducted
- receiveGross: Total amount you’ll receive
- receiveNet: Net amount you’ll actually receive
- rate: Current exchange rate between the currencies
- expiresAt: When the quote expires and you’ll need a new one
Try it out
Convert USDC to USDT
Learn how to swap stablecoins