加密钱包
添加白名单地址
将目标地址添加到加密货币提现白名单。通过 API 提现只能发送至白名单地址。
POST
/
v2
/
user
/
whitelistAddress
添加白名单地址
curl --request POST \
--url https://api-test.velafi.com/v2/user/whitelistAddress \
--header 'Content-Type: application/json' \
--header 'X-BH-TOKEN: <api-key>' \
--data '
{
"crypto": "<string>",
"chainType": "<string>",
"address": "<string>",
"addressTag": "<string>",
"remark": "<string>"
}
'import requests
url = "https://api-test.velafi.com/v2/user/whitelistAddress"
payload = {
"crypto": "<string>",
"chainType": "<string>",
"address": "<string>",
"addressTag": "<string>",
"remark": "<string>"
}
headers = {
"X-BH-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BH-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
crypto: '<string>',
chainType: '<string>',
address: '<string>',
addressTag: '<string>',
remark: '<string>'
})
};
fetch('https://api-test.velafi.com/v2/user/whitelistAddress', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api-test.velafi.com/v2/user/whitelistAddress")
.header("X-BH-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"crypto\": \"<string>\",\n \"chainType\": \"<string>\",\n \"address\": \"<string>\",\n \"addressTag\": \"<string>\",\n \"remark\": \"<string>\"\n}")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"addressId": 123,
"crypto": "<string>",
"chainType": "<string>",
"address": "<string>",
"addressTag": "<string>",
"remark": "<string>"
}
}通过 API 进行的加密货币提现只能发送至提现白名单中的地址。使用此端点为特定代币和网络添加地址。白名单条目归属于您的 API 用户,因此适用于其下的所有商户。
如果添加的地址在白名单中已存在相同的
所有请求都必须在
X-BH-TOKEN 请求头中携带访问令牌,并设置 Content-Type: application/json。请参阅身份验证。端点
POST https://api.velafi.com/v2/user/whitelistAddress
请求参数
string
必填
代币符号,例如
USDT。必须是 VelaFi 当前已启用的代币。string
必填
目标地址。必须是该网络的有效地址,否则请求将被拒绝。
string
Memo 或标签,适用于需要使用它的网络。向此条目提现时必须使用相同的
addressTag。string
您为该地址设置的标签。
crypto、chainType、address 和 addressTag,请求将因重复而被拒绝。
响应字段
number
200 表示成功。string
成功时为
SUCCESS。object
示例
cURL
curl -X POST https://api.velafi.com/v2/user/whitelistAddress \
-H "X-BH-TOKEN: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"crypto": "USDT",
"chainType": "TRC20",
"address": "YOUR_DESTINATION_ADDRESS",
"remark": "Treasury wallet"
}'
⌘I
添加白名单地址
curl --request POST \
--url https://api-test.velafi.com/v2/user/whitelistAddress \
--header 'Content-Type: application/json' \
--header 'X-BH-TOKEN: <api-key>' \
--data '
{
"crypto": "<string>",
"chainType": "<string>",
"address": "<string>",
"addressTag": "<string>",
"remark": "<string>"
}
'import requests
url = "https://api-test.velafi.com/v2/user/whitelistAddress"
payload = {
"crypto": "<string>",
"chainType": "<string>",
"address": "<string>",
"addressTag": "<string>",
"remark": "<string>"
}
headers = {
"X-BH-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BH-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
crypto: '<string>',
chainType: '<string>',
address: '<string>',
addressTag: '<string>',
remark: '<string>'
})
};
fetch('https://api-test.velafi.com/v2/user/whitelistAddress', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api-test.velafi.com/v2/user/whitelistAddress")
.header("X-BH-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"crypto\": \"<string>\",\n \"chainType\": \"<string>\",\n \"address\": \"<string>\",\n \"addressTag\": \"<string>\",\n \"remark\": \"<string>\"\n}")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"addressId": 123,
"crypto": "<string>",
"chainType": "<string>",
"address": "<string>",
"addressTag": "<string>",
"remark": "<string>"
}
}
