Generate Address
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/addresses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"disableAutoSweep": "OPTIONAL_BOOLEAN",
"enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
"metadata": "OPTIONAL_METADATA",
"name": "OPTIONAL_ADDRESS_NAME"
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses"
payload = {
"disableAutoSweep": "OPTIONAL_BOOLEAN",
"enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
"metadata": "OPTIONAL_METADATA",
"name": "OPTIONAL_ADDRESS_NAME"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
disableAutoSweep: 'OPTIONAL_BOOLEAN',
enableGaslessWithdraw: 'OPTIONAL_BOOLEAN',
metadata: 'OPTIONAL_METADATA',
name: 'OPTIONAL_ADDRESS_NAME'
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/addresses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockradar.co/v1/wallets/{walletId}/addresses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'disableAutoSweep' => 'OPTIONAL_BOOLEAN',
'enableGaslessWithdraw' => 'OPTIONAL_BOOLEAN',
'metadata' => 'OPTIONAL_METADATA',
'name' => 'OPTIONAL_ADDRESS_NAME'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blockradar.co/v1/wallets/{walletId}/addresses"
payload := strings.NewReader("{\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blockradar.co/v1/wallets/{walletId}/addresses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"address": "0xe1037B45b48390285e5067424053fa35c478296b",
"blockchain": {
"createdAt": "2024-05-14T11:53:33.095Z",
"derivationPath": "m/44'/60'/0'/0",
"id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
"isActive": true,
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"name": "ethereum",
"slug": "ethereum",
"symbol": "eth",
"tokenStandard": "ERC20",
"updatedAt": "2024-06-14T22:32:11.983Z"
},
"configurations": {
"aml": {
"message": "Address is not sanctioned",
"provider": "ofac",
"status": "success"
},
"disableAutoSweep": false,
"enableGaslessWithdraw": false,
"showPrivateKey": false
},
"createdAt": "2024-10-23T11:13:40.446Z",
"derivationPath": "m/44'/60'/0'/0/87",
"id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
"isActive": true,
"metadata": {
"user_id": 1
},
"name": "Customer 1",
"network": "testnet",
"type": "INTERNAL",
"updatedAt": "2024-10-23T11:13:40.446Z"
},
"message": "Address generated successfully",
"statusCode": 200
}Generate Address
This endpoint allows you to create a new address for a specific wallet.
Body Parameters
| Key | Required | Type | Description |
|---|---|---|---|
| name | false | string | The name of the address. |
| metadata | false | object | Additional metadata for the address, this will be part of any transaction tied to this |
| disableAutoSweep | false | boolean | Disable automatic sweeping of assets sent to the address into your master wallet |
| enableGaslessWithdraw | false | boolean | Enable gasless transactions from this address |
POST
/
v1
/
wallets
/
{walletId}
/
addresses
Generate Address
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/addresses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"disableAutoSweep": "OPTIONAL_BOOLEAN",
"enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
"metadata": "OPTIONAL_METADATA",
"name": "OPTIONAL_ADDRESS_NAME"
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses"
payload = {
"disableAutoSweep": "OPTIONAL_BOOLEAN",
"enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
"metadata": "OPTIONAL_METADATA",
"name": "OPTIONAL_ADDRESS_NAME"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
disableAutoSweep: 'OPTIONAL_BOOLEAN',
enableGaslessWithdraw: 'OPTIONAL_BOOLEAN',
metadata: 'OPTIONAL_METADATA',
name: 'OPTIONAL_ADDRESS_NAME'
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/addresses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockradar.co/v1/wallets/{walletId}/addresses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'disableAutoSweep' => 'OPTIONAL_BOOLEAN',
'enableGaslessWithdraw' => 'OPTIONAL_BOOLEAN',
'metadata' => 'OPTIONAL_METADATA',
'name' => 'OPTIONAL_ADDRESS_NAME'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blockradar.co/v1/wallets/{walletId}/addresses"
payload := strings.NewReader("{\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blockradar.co/v1/wallets/{walletId}/addresses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"address": "0xe1037B45b48390285e5067424053fa35c478296b",
"blockchain": {
"createdAt": "2024-05-14T11:53:33.095Z",
"derivationPath": "m/44'/60'/0'/0",
"id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
"isActive": true,
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"name": "ethereum",
"slug": "ethereum",
"symbol": "eth",
"tokenStandard": "ERC20",
"updatedAt": "2024-06-14T22:32:11.983Z"
},
"configurations": {
"aml": {
"message": "Address is not sanctioned",
"provider": "ofac",
"status": "success"
},
"disableAutoSweep": false,
"enableGaslessWithdraw": false,
"showPrivateKey": false
},
"createdAt": "2024-10-23T11:13:40.446Z",
"derivationPath": "m/44'/60'/0'/0/87",
"id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
"isActive": true,
"metadata": {
"user_id": 1
},
"name": "Customer 1",
"network": "testnet",
"type": "INTERNAL",
"updatedAt": "2024-10-23T11:13:40.446Z"
},
"message": "Address generated successfully",
"statusCode": 200
}Authorizations
Path Parameters
Example:
"YOUR_WALLET_ID"
Body
application/json
⌘I

