The Addresses API allows you to generate cryptocurrency addresses, retrieve addresses associated with an account, and view transactions for specific addresses.
Creates a new cryptocurrency address for a specified asset and associates it with an account and customer.
URL: {{base_url}}/addresses
Method: POST
Auth Required: Yes
Parameter | Type | Required | Description |
---|---|---|---|
label | String | Yes | A label for the address |
asset | String | Yes | Asset name (e.g., "XDC", "BTC") |
accountId | String | Yes | ID of the account to associate address with |
customerId | String | Yes | ID of the customer |
POST {{base_url}}/addresses
Content-Type: application/json
Authorization: Bearer <your-token>
{
"label": "My ETH Wallet",
"asset": "ETH",
"accountId": "61a5c8e9f0xxxxxx",
"customerId": "61a5c8exxxxxxxx"
}
{
"status": "success",
"data": {
"_id": "62f85d3bxxxxxxxx",
"asset_id": "62f85d3b9c1a7e5678901235",
"label": "My XDC Wallet",
"user_id": "62f85d3xxxxxxx",
"account_id": "61a5xxxxxxx0",
"customerId": "61axxxxxx1",
"balance": 0,
"address": "0x3F4e7C3xxxxxxxxx",
"createdAt": "2023-04-16T12:00:00.000Z",
"updatedAt": "2023-04-16T12:00:00.000Z"
}
}
Invalid Asset Name (400 Bad Request)
{
"status": "error",
"message": "Invalid asset name provided"
}
Invalid Account ID (400 Bad Request)
{
"status": "error",
"message": "Invalid account ID provided"
}
Invalid Customer ID (400 Bad Request)