Generate a Wallet Address

This guide explains how to generate and retrieve crypto wallet addresses for your users, which is an essential step in enabling crypto deposits. The workflow varies depending on your integration mode. For details, please refer to the official documentation: Determine Your Integration Model.


MoR Mode Workflow

Step 1 — Create a new wallet

Use the Create a wallet API to generate a new CryptoConnect wallet for a user. This API returns a unique wallet ID that will be used in all subsequent operations.

💡

Tip: You can assign a nickname to the wallet during creation to simplify management.

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/wallets \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "referenceId": "92a86ee7-5bb7-4272-afdb-3865bea9a2d5",
         "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
         "nickname": "Developer"
     }'

Response Example

{
    "code": "000000",
    "message": "success",
    "data": {
        "id": "60c667cd-06f4-48c0-85ca-24e570097685",
        "referenceId": "92a86ee7-5bb7-4272-afdb-3865bea9a2d5",
        "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
        "nickname": "Developer",
        "master": false,
        "balances": [
            {
                "currency": "USDC",
                "available": "0",
                "frozen": "0"
            },
            {
                "currency": "USDT",
                "available": "0",
                "frozen": "0"
            }
        ],
        "addresses": []
    }
}

Step 2 — Get a wallet address

Use the Get a wallet API to fetch wallet details, including balance and available addresses.

⚠️

Note: The request must include the wallet ID parameter.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token.
curl --request GET \
     --url https://api-sandbox.interlace.money/open-api/v3/cryptoconnect/wallets/60c667cd-06f4-48c0-85ca-24e570097685 \
     --header 'accept: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}'

Response Example

{
    "code": "000000",
    "message": "success",
    "data": {
        "id": "60c667cd-06f4-48c0-85ca-24e570097685",
        "referenceId": "92a86ee7-5bb7-4272-afdb-3865bea9a2d5",
        "accountId": "b27c8873-e400-47cd-adc1-035cfa0d5347",
        "nickname": "Developer",
        "master": false,
        "balances": [
            {
                "currency": "USDC",
                "available": "0",
                "frozen": "0"
            },
            {
                "currency": "USDT",
                "available": "0",
                "frozen": "0"
            }
        ],
        "addresses": []
    }
}

Step 3 — Generate an additional address (optional)

If no address is available, or if you need an address on a different blockchain, use the Create a blockchain address API to generate a new one.

⚠️

Note: The request must include the wallet ID parameter.

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/wallets/60c667cd-06f4-48c0-85ca-24e570097685/addresses \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "currency": "USDC",
         "chain": "ETH"
     }'

Response Example

{
    "code": "000000",
    "message": "success",
    "data": {
        "currency": "USDC",
        "chain": "ETH",
        "address": "0xd8b5f8e714d70e5cff389c5c2bf51d27e61c92c2",
        "selected": true
    }
}

Gateway Mode Workflow

In Gateway Mode, once KYC is approved, a set of master wallets is provisioned by default.

Step 1 — Get wallet addresses

Use the List all wallets API to fetch wallet information, including balances and available addresses.

⚠️

Note: The request must include the account ID parameter.

Request Example

# Replace ${YOUR_API_ACCESS_TOKEN} with your API access token.
curl --request GET \
     --url https://api-sandbox.interlace.money/open-api/v3/cryptoconnect/wallets?accountId=c6ab9f2a-d6fb-49ee-9941-3f1772a9f857&master=true \
     --header 'accept: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}'

Response Example

{
    "code": "000000",
    "message": "success",
    "data": {
        "total": "4",
        "list": [
            {
                "id": "ab1771f2-040d-4359-8f6e-0ae80a93019c",
                "referenceId": "5308128f-898a-49ec-9458-6e1a0414b6ad",
                "accountId": "c6ab9f2a-d6fb-49ee-9941-3f1772a9f857",
                "nickname": "Master Wallet",
                "master": true,
                "balances": [
                    {
                        "id": "ea4ec5a0-c292-46cf-95a2-b05a121e78eb",
                        "currency": "BTC",
                        "available": "0",
                        "frozen": "0"
                    }
                ],
                "addresses": []
            },
            {
                "id": "12550780-f90c-4a7a-a178-8c43efaccc34",
                "referenceId": "0a295a79-bae5-40b8-a0b7-2397e0c2f2ec",
                "accountId": "c6ab9f2a-d6fb-49ee-9941-3f1772a9f857",
                "nickname": "Master Wallet",
                "master": true,
                "balances": [
                    {
                        "id": "8f95d02f-e660-4b0e-929e-c5f8b3fed43f",
                        "currency": "ETH",
                        "available": "0",
                        "frozen": "0"
                    }
                ],
                "addresses": []
            },
            {
                "id": "f0edbf2e-ff8f-4da6-8b37-a6dce600703e",
                "referenceId": "50da01a0-2bec-4faf-9d51-2d974aa9b88b",
                "accountId": "c6ab9f2a-d6fb-49ee-9941-3f1772a9f857",
                "nickname": "Master Wallet",
                "master": true,
                "balances": [
                    {
                        "id": "f5208725-610e-46d4-a38f-cc09e8cab2d6",
                        "currency": "USDT",
                        "available": "0",
                        "frozen": "0"
                    }
                ],
                "addresses": []
            },
            {
                "id": "39d07dd5-58e3-4ad1-b8ef-516e67b3967b",
                "referenceId": "0a39332c-9553-4082-ac24-a6ba9df403ae",
                "accountId": "c6ab9f2a-d6fb-49ee-9941-3f1772a9f857",
                "nickname": "Master Wallet",
                "master": true,
                "balances": [
                    {
                        "id": "219b7947-049d-4dae-9e85-3d453b2be2c3",
                        "currency": "USDC",
                        "available": "0",
                        "frozen": "0"
                    }
                ],
                "addresses": []
            }
        ]
    }
}

Step 2 — Generate an additional address (optional)

If no address is available, or if you need an address on a different blockchain, use the Create a blockchain address API to generate a new one.

⚠️

Note: The request must include the wallet ID parameter.

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/wallets/39d07dd5-58e3-4ad1-b8ef-516e67b3967b/addresses \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-access-token: ${YOUR_API_ACCESS_TOKEN}' \
     --data '{
         "currency": "USDC",
         "chain": "ETH"
     }'

Response Example

{
    "code": "000000",
    "message": "success",
    "data": {
        "currency": "USDC",
        "chain": "ETH",
        "address": "0x749065ad4d8e50f1f167155e0ba231f3def45f74",
        "selected": true
    }
}