Convert and Withdraw Cryptocurrency

This guide explains how to withdraw funds from your Infinity Account to an external wallet. The workflow varies depending on your integration mode. For details, please refer to the official documentation: Determine Your Integration Model.


Step 1 — Move USD from Infinity Account to CryptoConnect Wallet

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token.
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v3/business/transfer/internal \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "clientTransactionId": "24ec3603-293b-4f53-8d4d-ed68a3e40828",
         "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
         "from": {
             "businessType": 0,
             "currency": "USD",
             "id": "63b2af21-1e8c-407b-8df9-10adc05963aa"
         },
         "to": {
             "businessType": 2,
             "id": "b27c8873-e400-47cd-adc1-035cfa0d5347",
             "currency": "USD"
         },
         "amount": "10"
     }'

Response Example

{
    "code": "000000",
    "message": "success",
    "data": {
        "clientTransactionId": "24ec3603-293b-4f53-8d4d-ed68a3e40828",
        "id": "1986330518716162050",
        "status": "CLOSED",
        "accountTransferType": "SAME_ACCOUNT",
        "from": {
            "id": "63b2af21-1e8c-407b-8df9-10adc05963aa",
            "transferId": "984ccaad-b018-42cf-acc7-c1a74ec85fd9",
            "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
            "amount": "10",
            "rate": 1,
            "currency": "USD",
            "businessType": 0,
            "fees": [
                {
                    "feeType": 0,
                    "amount": "0",
                    "currency": "USD"
                }
            ]
        },
        "to": {
            "id": "b27c8873-e400-47cd-adc1-035cfa0d5347",
            "transferId": "0875ddd2-d375-4d70-9204-ab6a681a99c7",
            "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
            "amount": "10",
            "currency": "USD",
            "businessType": 2,
            "fees": []
        }
    }
}

Step 2 — Preview exchange rates and fees (optional)

Use the Get an estimate quote API to check rates and fees before conversion.

📘

Note: If skipped, the system will automatically request a quote in Step 3.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token.
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v3/cryptoconnect/convert/estimate-quote \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
         "baseCurrency": "USDC",
         "quoteCurrency": "USD",
         "side": "BUY",
         "rfqCurrency": "USD",
         "rfqAmount": "10"
     }'

Response Example

{
    "code": "000000",
    "message": "success",
    "data": {
        "id": "4ee15a1c-ade4-4e99-9222-661f33c0a7fe",
        "quoteTime": "1762413531106",
        "baseCurrency": "USDC",
        "baseAmount": "9.95",
        "quoteCurrency": "USD",
        "quoteAmount": "10",
        "side": "BUY",
        "rate": "1",
        "rfqAmount": "10",
        "rfqCurrency": "USD",
        "fee": "0.05",
        "feeCurrency": "USD",
        "ttlMs": "60000"
    }
}

Step 3 — Convert USD to Crypto

Use the Create a trade API to exchange USD for USDC/USDT/WUSD.

📘

Note:

  • Currently only conversions between USD ↔ USDC/USDT/WUSD and USDC ↔ USDT are supported.
  • For detailed instructions on using this endpoint, please refer to our official guide: Converting USD to Cryptocurrency

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token.
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v3/cryptoconnect/convert/trades \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "referenceId": "590a3852-f1aa-494f-a6d5-a3d13a715f70",
         "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
         "baseCurrency": "USDC",
         "quoteCurrency": "USD",
         "side": "BUY",
         "rfqCurrency": "USD",
         "rfqAmount": "10"
     }'

Response Example

{
    "code": "000000",
    "message": "success",
    "data": {
        "id": "d8ffbe31-e3d2-4615-9e13-0cae46d09b75",
        "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
        "symbol": "USDC-USD",
        "baseWalletId": "32aae8b7-4a69-474f-b7d5-337e190af878",
        "baseCurrency": "USDC",
        "baseAmount": "9.95",
        "quoteCurrency": "USD",
        "quoteAmount": "10",
        "side": "BUY",
        "rate": "1",
        "fee": "0.05",
        "feeCurrency": "USD",
        "status": "COMPLETE",
        "referenceId": "590a3852-f1aa-494f-a6d5-a3d13a715f70",
        "createTime": "1762413577403",
        "completeTime": "1762413578326"
    }
}

Step 4 — Preview withdrawal fees (optional)

Use the Get transfer fee API to check fees before withdrawal.

📘

Note: If skipped, fees will be retrieved automatically in Step 5.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token.
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v3/cryptoconnect/transfers/fee-and-quota \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
         "source": {
             "type": "WALLET",
             "id": "32aae8b7-4a69-474f-b7d5-337e190af878"
         },
         "destination": {
             "type": "BLOCKCHAIN",
             "chain": "ARB",
             "address": "0x89F9Cfaa0dA076351DdfC6E320bD8df8b538dB17"
         },
         "amount": {
             "currency": "USDC",
             "amount": "10"
         }
     }'

Response Example

{
    "code": 0,
    "message": "ok",
    "data": {
        "crossChainQuota": "10000",
        "crossChainFeeRate": "0.003",
        "crossChainAmount": "0",
        "fees": [
            {
                "amount": "0.2",
                "currency": "USDC",
                "type": "GAS"
            }
        ]
    }
}

Step 5 — Withdraw Crypto

Use the Create a blockchain transfer API to withdraw crypto to an external wallet.

⚠️

Note: Ensure that both the wallet address and the blockchain network are correctly specified before initiating the withdrawal.


Withdrawal Status Flow 💰

  • When you initiate a withdrawal, Interlace first receives the request and assigns it a status of Pending, with the transactionHash set to null. This indicates that your request has been accepted and the on-chain transfer process has started.

  • Once the transaction is broadcast, Interlace monitors its progress. The status will update to Closed after 30 block confirmations, and a valid transactionHash will be available.

  • You can use this transactionHash to track the transfer directly on-chain, for example via Etherscan's tracker on Sepolia.


Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token.
curl --request POST \
     --url https://api-sandbox.interlace.money/open-api/v3/cryptoconnect/transfers \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "idempotencyKey": "bfafe401-a54d-445a-a6c5-4b407b68a2cc",
         "source": {
             "type": "cryptoconnect_wallet",
             "id": "32aae8b7-4a69-474f-b7d5-337e190af878"
         },
         "destination": {
             "type": "blockchain",
             "chain": "ETH",
             "address": "0x89F9Cfaa0dA076351DdfC6E320bD8df8b538dB17"
         },
         "amount": {
             "amount": "9.95",
             "currency": "USDC"
         }
     }'

Response Example

{
    "code": 0,
    "message": "ok",
    "data": {
        "id": "aba46642-edcf-4faa-8942-7d63c967fb07",
        "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
        "idempotencyKey": "bfafe401-a54d-445a-a6c5-4b407b68a2cc",
        "source": {
            "type": "cryptoconnect_wallet",
            "id": "32aae8b7-4a69-474f-b7d5-337e190af878"
        },
        "destination": {
            "type": "blockchain",
            "chain": "ETH",
            "address": "0x89F9Cfaa0dA076351DdfC6E320bD8df8b538dB17"
        },
        "amount": {
            "amount": "9.95",
            "currency": "USDC"
        },
        "fees": [
            {
                "amount": "0.2",
                "currency": "USDC",
                "type": "GAS"
            }
        ],
        "status": "Pending",
        "createTime": "1758276661923",
        "updateTime": "1758276662488"
    }
}

🎉 Congratulations! The cryptocurrency transfer has been successfully completed using Interlace APIs.