Skip to main content
Swaps allow you to exchange one stablecoincurrency for another within the same blockchain network. This is useful for converting between different stablecoins or other supported tokens without needing to bridge across chains.

How Swaps Work

Swaps follow a simple three-step process:
  1. Create a swap – Initiate a swap request with source and destination
  2. Review quote – Examine the exchange rate, fees, and quote validity period
  3. 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:
{
  "transferType": "WALLET.SWAP",
  "transferDetails": {
    "id": "dc923cc1-d74b-58f6-9fe4-9e9c6eb8dc37",
    "requestId": "1ab3e6e0-4839-4dbe-89c3-b06d9645ae86",
    "status": "COMPLETED",
    "createdAt": "2025-08-20T03:55:29.437108+00:00",
    "updatedAt": "2025-08-20T04:08:10.837+00:00",
    "source": {
      /* Source */
    },
    "destination": {
      /* Destination */
    },
    "error": null,
    "errorDetails": null,
    "quoteInformation": {
      /* Quote */
    },
    "billingInformation": {
      /* Billing */
    }
  }
}
{
  "currency": "usdc",
  "amount": 10,
  "chain": "POLYGON",
  "userId": "05179f69-1988-4b46-a847-dd4eea0984d6"
}
{
  "currency": "usdt",
  "userId": "05179f69-1988-4b46-a847-dd4eea0984d6",
  "externalWalletId": null,
  "amount": null,
  "chain": "POLYGON",
  "walletAddress": "0xe5727a4B1d93A26D6A7Adfaae145EFa41ED7f204"
}
{
  "sendGross": {
    "amount": "10",
    "currency": "usdc"
  },
  "sendNet": {
    "amount": "10",
    "currency": "usdc"
  },
  "receiveGross": {
    "amount": "10",
    "currency": "usdc"
  },
  "receiveNet": {
    "amount": "10",
    "currency": "usdc"
  },
  "rate": "1",
  "expiresAt": "2025-08-20T03:55:59.539+00:00"
}
{
  "fees": [
    {
      "id": "2ca381ec-9498-52f5-9a27-d0e392b2626b",
      "amount": 0.01,
      "currency": "USD",
      "type": "EXCHANGE_FEE",
      "timing": "ON_INVOICE"
    }
  ]
}

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 and errorDetails 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
I