Remove Addresses from Whitelist
curl --request DELETE \
--url https://api.example.com/v1/wallet/whitelist \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-client-key: <x-client-key>' \
--data '
{
"walletIds": [
{}
]
}
'import requests
url = "https://api.example.com/v1/wallet/whitelist"
payload = { "walletIds": [{}] }
headers = {
"x-client-key": "<x-client-key>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'x-client-key': '<x-client-key>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({walletIds: [{}]})
};
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 => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'walletIds' => [
[
]
]
]),
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 \"walletIds\": [\n {}\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.example.com/v1/wallet/whitelist")
.header("x-client-key", "<x-client-key>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"walletIds\": [\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::Delete.new(url)
request["x-client-key"] = '<x-client-key>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"walletIds\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
{
"message": "Invalid wallet ID"
}
Wallet
Remove Addresses from Whitelist
Remove one or more pre-approved external wallet addresses from the whitelist
DELETE
/
v1
/
wallet
/
whitelist
Remove Addresses from Whitelist
curl --request DELETE \
--url https://api.example.com/v1/wallet/whitelist \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-client-key: <x-client-key>' \
--data '
{
"walletIds": [
{}
]
}
'import requests
url = "https://api.example.com/v1/wallet/whitelist"
payload = { "walletIds": [{}] }
headers = {
"x-client-key": "<x-client-key>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'x-client-key': '<x-client-key>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({walletIds: [{}]})
};
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 => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'walletIds' => [
[
]
]
]),
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 \"walletIds\": [\n {}\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.example.com/v1/wallet/whitelist")
.header("x-client-key", "<x-client-key>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"walletIds\": [\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::Delete.new(url)
request["x-client-key"] = '<x-client-key>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"walletIds\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
{
"message": "Invalid wallet ID"
}
Remove previously whitelisted addresses. Provide one or more whitelist entry IDs to remove.
Authentication
Request Body
Response
{
"success": true
}
{
"message": "Invalid wallet ID"
}
curl -X DELETE "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 '{
"walletIds": [
"d7ed0d12-270c-4491-b1a4-bebf2cc42b5c"
]
}'
remove_data = {
"walletIds": [
"d7ed0d12-270c-4491-b1a4-bebf2cc42b5c",
"a3f2e1d4-c5b6-47a8-9e0f-1d2c3b4a5e6f"
]
}
response = requests.delete(
"https://dev.api.baanx.com/v1/wallet/whitelist",
headers=headers,
json=remove_data
)
if response.status_code == 200:
print("Addresses removed from whitelist")
async function removeFromWhitelist(walletIds: string[]): Promise<boolean> {
const response = await fetch(
'https://dev.api.baanx.com/v1/wallet/whitelist',
{
method: 'DELETE',
headers: {
'x-client-key': 'YOUR_CLIENT_KEY',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({ walletIds })
}
);
const result = await response.json();
return result.success;
}
await removeFromWhitelist(['d7ed0d12-270c-4491-b1a4-bebf2cc42b5c']);
Related Endpoints
- Get Whitelisted Addresses - View current whitelist
- Add Addresses to Whitelist - Add new pre-approved addresses
Was this page helpful?