Skip to main content

Use Case

Enable users to swap token 1 into token 2 across various chains. Examples:
  • Setup wallet address 1 which turns incoming USDC on Solana into EURC on Arbitrum
  • Setup wallet address 2 which turns incoming SOL on Solana into USDC on Arbitrum

Example Flow

1
User sets up a wallet address 1 on Solana owned by Iron
2
Now an autoramp is activatedi. which turns all incoming USDC on wallet address 1 into EURC on Arbitrumii. and delivers those into his connected wallet in wallet address 2
3
Now user sends 1000 USDC to wallet address 1
4
As soon as funds hit this address, Iron turns them into EURC on Arbitrum and delivers them to wallet address 2
This flow is a very easy way for applications to integrate bridging and automatic swaps without users having to interact with complex multi-step UIs. Send is the simplest API every wallet and frontend can integrate.

Prerequisites

Before creating a swap autoramp, you must register the recipient wallet address for your customer. The wallet in recipient_account must already be linked via the Crypto Addresses API. This is required for Travel Rule compliance — all wallet addresses interacting with Iron must be registered before they can be used in any flow.
The wallet address you provide in recipient_account must match a wallet you’ve already registered via the Crypto Addresses API.
Steps:
  1. First, register a wallet address (self-hosted or hosted) for your customer
  2. Then, create a swap autoramp using the registered wallet address as the recipient

Implementation

Follow these example steps to create an autoramp logic for turning USDC on Solana to USDC on Arbitrum.

Request

curl -X POST "https://api.sandbox.iron.xyz/api/autoramps" \
  -H "Content-Type: application/json; charset=utf-8" \
  -H "IDEMPOTENCY-KEY: <your-idempotency-key>" \
  -H "X-API-Key: <your-api-key>" \
  -d '{
    "source_currencies": [{
      "type": "Crypto",
      "token": "USDC",
      "blockchain": "Solana"
    }],
    "destination_currency": {
      "type": "Crypto",
      "token": "USDC",
      "blockchain": "Arbitrum"
    },
    "recipient_account": {
      "type": "Wallet",
      "blockchain": "Arbitrum",
      "address": "0xaf77d065e77c8cC2239327C5EDb3A432268e5831"
    },
    "customer_id": "123e4567-e89b-12d3-a456-426614174000",
    "source_is_third_party": false
  }'

Response

{
  "id": "d4e3c2b1-a9f8-7654-3210-fedcba987654",
  "status": "Authorized",
  "deposit_rails": [
    {
      "type": "Wallet",
      "id": "abc12345-defg-6789-hijk-9876543210",
      "blockchain": "Solana",
      "address": "savings.sol",
      "currency": {
        "token": "USDC",
        "blockchain": "Solana"
      }
    }
  ],
  "created_at": "2025-01-20T14:23:45Z"
}
The deposit_rails array contains the payment details. The legacy deposit_account field is deprecated.
Now you are ready to show the user their custom wallet address which will be auto-connected to this swap rule. Please also show supported assets for this wallet address (e.g. EURC, USDC). Non-supported assets will be returned to sender.