Add Addresses to Whitelist
curl --request POST \
--url https://api.example.com/v1/wallet/whitelist \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-client-key: <x-client-key>' \
--data '
{
"wallets": [
{
"currency": "<string>",
"name": "<string>",
"beneficiaryFirstName": "<string>",
"beneficiaryLastName": "<string>",
"walletAddress": "<string>",
"walletMemo": "<string>"
}
]
}
'import requests
url = "https://api.example.com/v1/wallet/whitelist"
payload = { "wallets": [
{
"currency": "<string>",
"name": "<string>",
"beneficiaryFirstName": "<string>",
"beneficiaryLastName": "<string>",
"walletAddress": "<string>",
"walletMemo": "<string>"
}
] }
headers = {
"x-client-key": "<x-client-key>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-key': '<x-client-key>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
wallets: [
{
currency: '<string>',
name: '<string>',
beneficiaryFirstName: '<string>',
beneficiaryLastName: '<string>',
walletAddress: '<string>',
walletMemo: '<string>'
}
]
})
};
fetch('https://api.example.com/v1/wallet/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.example.com/v1/wallet/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([
'wallets' => [
[
'currency' => '<string>',
'name' => '<string>',
'beneficiaryFirstName' => '<string>',
'beneficiaryLastName' => '<string>',
'walletAddress' => '<string>',
'walletMemo' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"x-client-key: <x-client-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.example.com/v1/wallet/whitelist"
payload := strings.NewReader("{\n \"wallets\": [\n {\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"beneficiaryFirstName\": \"<string>\",\n \"beneficiaryLastName\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"walletMemo\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-key", "<x-client-key>")
req.Header.Add("Authorization", "<authorization>")
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.example.com/v1/wallet/whitelist")
.header("x-client-key", "<x-client-key>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n {\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"beneficiaryFirstName\": \"<string>\",\n \"beneficiaryLastName\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"walletMemo\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/wallet/whitelist")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-key"] = '<x-client-key>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallets\": [\n {\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"beneficiaryFirstName\": \"<string>\",\n \"beneficiaryLastName\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"walletMemo\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
{
"message": "Invalid wallet address format"
}
Wallet
Add Addresses to Whitelist
Add one or more pre-approved external wallet addresses for secure withdrawals
POST
/
v1
/
wallet
/
whitelist
Add Addresses to Whitelist
curl --request POST \
--url https://api.example.com/v1/wallet/whitelist \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-client-key: <x-client-key>' \
--data '
{
"wallets": [
{
"currency": "<string>",
"name": "<string>",
"beneficiaryFirstName": "<string>",
"beneficiaryLastName": "<string>",
"walletAddress": "<string>",
"walletMemo": "<string>"
}
]
}
'import requests
url = "https://api.example.com/v1/wallet/whitelist"
payload = { "wallets": [
{
"currency": "<string>",
"name": "<string>",
"beneficiaryFirstName": "<string>",
"beneficiaryLastName": "<string>",
"walletAddress": "<string>",
"walletMemo": "<string>"
}
] }
headers = {
"x-client-key": "<x-client-key>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-client-key': '<x-client-key>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
wallets: [
{
currency: '<string>',
name: '<string>',
beneficiaryFirstName: '<string>',
beneficiaryLastName: '<string>',
walletAddress: '<string>',
walletMemo: '<string>'
}
]
})
};
fetch('https://api.example.com/v1/wallet/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.example.com/v1/wallet/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([
'wallets' => [
[
'currency' => '<string>',
'name' => '<string>',
'beneficiaryFirstName' => '<string>',
'beneficiaryLastName' => '<string>',
'walletAddress' => '<string>',
'walletMemo' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"x-client-key: <x-client-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.example.com/v1/wallet/whitelist"
payload := strings.NewReader("{\n \"wallets\": [\n {\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"beneficiaryFirstName\": \"<string>\",\n \"beneficiaryLastName\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"walletMemo\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-client-key", "<x-client-key>")
req.Header.Add("Authorization", "<authorization>")
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.example.com/v1/wallet/whitelist")
.header("x-client-key", "<x-client-key>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n {\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"beneficiaryFirstName\": \"<string>\",\n \"beneficiaryLastName\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"walletMemo\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/wallet/whitelist")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-client-key"] = '<x-client-key>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallets\": [\n {\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"beneficiaryFirstName\": \"<string>\",\n \"beneficiaryLastName\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"walletMemo\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
{
"message": "Invalid wallet address format"
}
Add one or more external wallet addresses to the whitelist. Multiple addresses can be added in a single request.
Authentication
string
required
Your public API client key
string
required
Bearer token for authentication
Request Body
array
required
Array of addresses to whitelist
Show Whitelist Entry Object
Show Whitelist Entry Object
Response
boolean
Whether whitelisting was successful
{
"success": true
}
{
"message": "Invalid wallet address format"
}
curl -X POST "https://dev.api.baanx.com/v1/wallet/whitelist" \
-H "x-client-key: YOUR_CLIENT_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"wallets": [
{
"currency": "xrp",
"name": "Binance Account | Primary",
"beneficiaryFirstName": "John",
"beneficiaryLastName": "Doe",
"walletAddress": "rNxp4h8apvRis6mJf9Sh8C6iRxfrDWN7AA",
"walletMemo": "66"
}
]
}'
import requests
url = "https://dev.api.baanx.com/v1/wallet/whitelist"
headers = {
"x-client-key": "YOUR_CLIENT_KEY",
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"wallets": [
{
"currency": "xrp",
"name": "Binance Account | Primary",
"beneficiaryFirstName": "John",
"beneficiaryLastName": "Doe",
"walletAddress": "rNxp4h8apvRis6mJf9Sh8C6iRxfrDWN7AA",
"walletMemo": "66"
},
{
"currency": "xrp",
"name": "Kraken Exchange",
"beneficiaryFirstName": "John",
"beneficiaryLastName": "Doe",
"walletAddress": "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY",
"walletMemo": "12345"
}
]
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 201:
print("Addresses added to whitelist successfully!")
interface AddWhitelistRequest {
currency: string;
name: string;
beneficiaryFirstName: string;
beneficiaryLastName: string;
walletAddress: string;
walletMemo?: string;
}
async function addToWhitelist(
addresses: AddWhitelistRequest[]
): Promise<boolean> {
const response = await fetch(
'https://dev.api.baanx.com/v1/wallet/whitelist',
{
method: 'POST',
headers: {
'x-client-key': 'YOUR_CLIENT_KEY',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({ wallets: addresses })
}
);
const result = await response.json();
return result.success;
}
await addToWhitelist([
{
currency: 'xrp',
name: 'Binance Account',
beneficiaryFirstName: 'John',
beneficiaryLastName: 'Doe',
walletAddress: 'rNxp4h8apvRis6mJf9Sh8C6iRxfrDWN7AA',
walletMemo: '66'
}
]);
Related Endpoints
- Get Whitelisted Addresses - View current whitelist
- Remove Addresses from Whitelist - Remove whitelisted addresses
Was this page helpful?
⌘I