Transfers & Withdrawals
private/update_whitelisted_recipients
Adds and/or removes recipient wallet addresses on an account’s transfer whitelist via a signed, wallet-level action. Provide the owner wallet, signer, nonce, signature with expiry, and the add and remove address lists. This is an owner-or-admin operation (session keys need the admin scope); it returns the operation id, uuid, and the full whitelist after the update is applied.
POST
/
private
/
update_whitelisted_recipients
private/update_whitelisted_recipients
curl --request POST \
--url https://api.derive.xyz/v3/private/update_whitelisted_recipients \
--header 'Content-Type: application/json' \
--data '
{
"add": [
"<string>"
],
"nonce": 1,
"remove": [
"<string>"
],
"signature": "<string>",
"signature_expiry_sec": 1,
"signer": "<string>",
"wallet": "<string>"
}
'import requests
url = "https://api.derive.xyz/v3/private/update_whitelisted_recipients"
payload = {
"add": ["<string>"],
"nonce": 1,
"remove": ["<string>"],
"signature": "<string>",
"signature_expiry_sec": 1,
"signer": "<string>",
"wallet": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
add: ['<string>'],
nonce: 1,
remove: ['<string>'],
signature: '<string>',
signature_expiry_sec: 1,
signer: '<string>',
wallet: '<string>'
})
};
fetch('https://api.derive.xyz/v3/private/update_whitelisted_recipients', 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.derive.xyz/v3/private/update_whitelisted_recipients",
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([
'add' => [
'<string>'
],
'nonce' => 1,
'remove' => [
'<string>'
],
'signature' => '<string>',
'signature_expiry_sec' => 1,
'signer' => '<string>',
'wallet' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.derive.xyz/v3/private/update_whitelisted_recipients"
payload := strings.NewReader("{\n \"add\": [\n \"<string>\"\n ],\n \"nonce\": 1,\n \"remove\": [\n \"<string>\"\n ],\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"wallet\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.derive.xyz/v3/private/update_whitelisted_recipients")
.header("Content-Type", "application/json")
.body("{\n \"add\": [\n \"<string>\"\n ],\n \"nonce\": 1,\n \"remove\": [\n \"<string>\"\n ],\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"wallet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.derive.xyz/v3/private/update_whitelisted_recipients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"add\": [\n \"<string>\"\n ],\n \"nonce\": 1,\n \"remove\": [\n \"<string>\"\n ],\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"wallet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"op_uuid": "<string>",
"operation_id": 1,
"whitelisted_recipients": [
"<string>"
]
}Body
application/json
Recipient wallet addresses to add to the whitelist.
Required range:
x >= 0Recipient wallet addresses to remove from the whitelist.
Required range:
x >= 0Wallet whose whitelist is being updated; becomes the action owner.
private/update_whitelisted_recipients
curl --request POST \
--url https://api.derive.xyz/v3/private/update_whitelisted_recipients \
--header 'Content-Type: application/json' \
--data '
{
"add": [
"<string>"
],
"nonce": 1,
"remove": [
"<string>"
],
"signature": "<string>",
"signature_expiry_sec": 1,
"signer": "<string>",
"wallet": "<string>"
}
'import requests
url = "https://api.derive.xyz/v3/private/update_whitelisted_recipients"
payload = {
"add": ["<string>"],
"nonce": 1,
"remove": ["<string>"],
"signature": "<string>",
"signature_expiry_sec": 1,
"signer": "<string>",
"wallet": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
add: ['<string>'],
nonce: 1,
remove: ['<string>'],
signature: '<string>',
signature_expiry_sec: 1,
signer: '<string>',
wallet: '<string>'
})
};
fetch('https://api.derive.xyz/v3/private/update_whitelisted_recipients', 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.derive.xyz/v3/private/update_whitelisted_recipients",
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([
'add' => [
'<string>'
],
'nonce' => 1,
'remove' => [
'<string>'
],
'signature' => '<string>',
'signature_expiry_sec' => 1,
'signer' => '<string>',
'wallet' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.derive.xyz/v3/private/update_whitelisted_recipients"
payload := strings.NewReader("{\n \"add\": [\n \"<string>\"\n ],\n \"nonce\": 1,\n \"remove\": [\n \"<string>\"\n ],\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"wallet\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.derive.xyz/v3/private/update_whitelisted_recipients")
.header("Content-Type", "application/json")
.body("{\n \"add\": [\n \"<string>\"\n ],\n \"nonce\": 1,\n \"remove\": [\n \"<string>\"\n ],\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"wallet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.derive.xyz/v3/private/update_whitelisted_recipients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"add\": [\n \"<string>\"\n ],\n \"nonce\": 1,\n \"remove\": [\n \"<string>\"\n ],\n \"signature\": \"<string>\",\n \"signature_expiry_sec\": 1,\n \"signer\": \"<string>\",\n \"wallet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"op_uuid": "<string>",
"operation_id": 1,
"whitelisted_recipients": [
"<string>"
]
}