Whitelist address
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/addresses/whitelist \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"address": "ADDRESS_TO_WHITELIST",
"disableAutoSweep": "OPTIONAL_BOOLEAN",
"enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
"metadata": "OPTIONAL_METADATA",
"name": "OPTIONAL_ADDRESS_NAME",
"privateKey": "OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY",
"showPrivateKey": "OPTIONAL_BOOLEAN"
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses/whitelist"
payload = {
"address": "ADDRESS_TO_WHITELIST",
"disableAutoSweep": "OPTIONAL_BOOLEAN",
"enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
"metadata": "OPTIONAL_METADATA",
"name": "OPTIONAL_ADDRESS_NAME",
"privateKey": "OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY",
"showPrivateKey": "OPTIONAL_BOOLEAN"
}
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({
address: 'ADDRESS_TO_WHITELIST',
disableAutoSweep: 'OPTIONAL_BOOLEAN',
enableGaslessWithdraw: 'OPTIONAL_BOOLEAN',
metadata: 'OPTIONAL_METADATA',
name: 'OPTIONAL_ADDRESS_NAME',
privateKey: 'OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY',
showPrivateKey: 'OPTIONAL_BOOLEAN'
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/addresses/whitelist', 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/whitelist",
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([
'address' => 'ADDRESS_TO_WHITELIST',
'disableAutoSweep' => 'OPTIONAL_BOOLEAN',
'enableGaslessWithdraw' => 'OPTIONAL_BOOLEAN',
'metadata' => 'OPTIONAL_METADATA',
'name' => 'OPTIONAL_ADDRESS_NAME',
'privateKey' => 'OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY',
'showPrivateKey' => 'OPTIONAL_BOOLEAN'
]),
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/whitelist"
payload := strings.NewReader("{\n \"address\": \"ADDRESS_TO_WHITELIST\",\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\",\n \"privateKey\": \"OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY\",\n \"showPrivateKey\": \"OPTIONAL_BOOLEAN\"\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/whitelist")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"ADDRESS_TO_WHITELIST\",\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\",\n \"privateKey\": \"OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY\",\n \"showPrivateKey\": \"OPTIONAL_BOOLEAN\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses/whitelist")
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 \"address\": \"ADDRESS_TO_WHITELIST\",\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\",\n \"privateKey\": \"OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY\",\n \"showPrivateKey\": \"OPTIONAL_BOOLEAN\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"address": "0x3375154fa32Cb434B044E73a2582C4D2E6518AE4",
"blockchain": {
"createdAt": "2024-05-27T08:31:14.966Z",
"derivationPath": "m/44'/60'/0'/0",
"id": "74733889-4ecd-403e-9840-94e87c043f24",
"isActive": true,
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800080/crypto-assets/Base_Network_Logo_vqyh7r.png",
"name": "base",
"slug": "base",
"symbol": "eth",
"tokenStandard": null,
"updatedAt": "2024-10-27T07:52:16.115Z"
},
"configurations": {
"aml": {
"message": "Address is not sanctioned",
"provider": "ofac",
"status": "success"
}
},
"createdAt": "2024-11-11T16:57:19.160Z",
"derivationPath": null,
"id": "b87901a2-45c1-4d2d-8ee7-205ef0c4ddf1",
"isActive": true,
"metadata": null,
"name": "External address",
"network": "testnet",
"type": "EXTERNAL",
"updatedAt": "2024-11-11T16:57:19.160Z"
},
"message": "Address whitelisted successfully",
"statusCode": 200
}Address
Whitelist address
This endpoint allows you to whitelist an external address to be monitored based on the wallet policies
Body Parameters
| Key | Required | Type | Description |
|---|---|---|---|
| name | false | string | The name of the address. |
| address | true | string | The wallet address. |
| metadata | false | object | Additional metadata for the address. This will be part of any transaction tied to this. |
| showPrivateKey | false | boolean | If you want the address private key to be part of the response. |
| 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. |
| privateKey | false | string | The private key associated with the address. Required for executing actions securely. |
POST
/
v1
/
wallets
/
{walletId}
/
addresses
/
whitelist
Whitelist address
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/addresses/whitelist \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"address": "ADDRESS_TO_WHITELIST",
"disableAutoSweep": "OPTIONAL_BOOLEAN",
"enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
"metadata": "OPTIONAL_METADATA",
"name": "OPTIONAL_ADDRESS_NAME",
"privateKey": "OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY",
"showPrivateKey": "OPTIONAL_BOOLEAN"
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses/whitelist"
payload = {
"address": "ADDRESS_TO_WHITELIST",
"disableAutoSweep": "OPTIONAL_BOOLEAN",
"enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
"metadata": "OPTIONAL_METADATA",
"name": "OPTIONAL_ADDRESS_NAME",
"privateKey": "OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY",
"showPrivateKey": "OPTIONAL_BOOLEAN"
}
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({
address: 'ADDRESS_TO_WHITELIST',
disableAutoSweep: 'OPTIONAL_BOOLEAN',
enableGaslessWithdraw: 'OPTIONAL_BOOLEAN',
metadata: 'OPTIONAL_METADATA',
name: 'OPTIONAL_ADDRESS_NAME',
privateKey: 'OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY',
showPrivateKey: 'OPTIONAL_BOOLEAN'
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/addresses/whitelist', 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/whitelist",
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([
'address' => 'ADDRESS_TO_WHITELIST',
'disableAutoSweep' => 'OPTIONAL_BOOLEAN',
'enableGaslessWithdraw' => 'OPTIONAL_BOOLEAN',
'metadata' => 'OPTIONAL_METADATA',
'name' => 'OPTIONAL_ADDRESS_NAME',
'privateKey' => 'OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY',
'showPrivateKey' => 'OPTIONAL_BOOLEAN'
]),
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/whitelist"
payload := strings.NewReader("{\n \"address\": \"ADDRESS_TO_WHITELIST\",\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\",\n \"privateKey\": \"OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY\",\n \"showPrivateKey\": \"OPTIONAL_BOOLEAN\"\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/whitelist")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"ADDRESS_TO_WHITELIST\",\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\",\n \"privateKey\": \"OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY\",\n \"showPrivateKey\": \"OPTIONAL_BOOLEAN\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses/whitelist")
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 \"address\": \"ADDRESS_TO_WHITELIST\",\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\",\n \"privateKey\": \"OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY\",\n \"showPrivateKey\": \"OPTIONAL_BOOLEAN\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"address": "0x3375154fa32Cb434B044E73a2582C4D2E6518AE4",
"blockchain": {
"createdAt": "2024-05-27T08:31:14.966Z",
"derivationPath": "m/44'/60'/0'/0",
"id": "74733889-4ecd-403e-9840-94e87c043f24",
"isActive": true,
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800080/crypto-assets/Base_Network_Logo_vqyh7r.png",
"name": "base",
"slug": "base",
"symbol": "eth",
"tokenStandard": null,
"updatedAt": "2024-10-27T07:52:16.115Z"
},
"configurations": {
"aml": {
"message": "Address is not sanctioned",
"provider": "ofac",
"status": "success"
}
},
"createdAt": "2024-11-11T16:57:19.160Z",
"derivationPath": null,
"id": "b87901a2-45c1-4d2d-8ee7-205ef0c4ddf1",
"isActive": true,
"metadata": null,
"name": "External address",
"network": "testnet",
"type": "EXTERNAL",
"updatedAt": "2024-11-11T16:57:19.160Z"
},
"message": "Address whitelisted successfully",
"statusCode": 200
}Autorisations
Paramètres de chemin
Exemple:
""
Corps
application/json
Exemple:
"ADDRESS_TO_WHITELIST"
Exemple:
"OPTIONAL_BOOLEAN"
Exemple:
"OPTIONAL_BOOLEAN"
Exemple:
"OPTIONAL_METADATA"
Exemple:
"OPTIONAL_ADDRESS_NAME"
Exemple:
"OPTIONAL_ADDRESS_TO_WHITELIST_PRIVATE_KEY"
Exemple:
"OPTIONAL_BOOLEAN"
⌘I

