配置
获取加密货币→法币支付方式
获取加密货币兑法币出金交易对的可用支付方式,包括手续费以及每种方式是自动处理还是人工处理。
GET
/
v2
/
base
/
sell
/
payments
获取加密货币→法币支付方式
curl --request GET \
--url https://api-test.velafi.com/v2/base/sell/payments \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/base/sell/payments"
headers = {"X-BH-TOKEN": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-BH-TOKEN': '<api-key>'}};
fetch('https://api-test.velafi.com/v2/base/sell/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api-test.velafi.com/v2/base/sell/payments")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"country": "<string>",
"fiat": "<string>",
"crypto": "<string>",
"paymentList": [
{
"paymentId": 123,
"fiatFee": "<string>",
"paymentType": 123,
"trench": "<string>"
}
]
}
}使用 GET
/v2/base/sell/payments 端点获取特定加密货币兑法币出金交易对可用的支付方式。请将目标国家、法币和源加密货币作为查询参数传入。响应会列出每种符合条件的支付方式及其手续费和处理类型,为您在用户提交卖出订单前向其展示出金收款选项提供所需的全部信息。
请求
GET /v2/base/sell/payments
请求头
| 请求头 | 值 | 必填 |
|---|---|---|
X-BH-TOKEN | 通过 GET /v2/token/generate 获取的令牌 | ✓ |
查询参数
string
必填
与法币关联的目标国家名称(例如
"Mexico")。string
必填
目标法币的 ISO 4217 代码(例如
"MXN")。string
必填
源加密货币的代码符号(例如
"USDT")。响应字段
number
HTTP 风格的状态码。
200 表示成功。string
人类可读的状态消息,例如
"SUCCESS"。object
示例
cURL
curl --request GET \
--url 'https://api.velafi.com/v2/base/sell/payments?country=Mexico&fiat=MXN&crypto=USDT' \
--header 'X-BH-TOKEN: YOUR_TOKEN'
响应
{
"code": 200,
"msg": "SUCCESS",
"data": {
"country": "Mexico",
"fiat": "MXN",
"crypto": "USDT",
"paymentList": [
{
"paymentId": 72,
"fiatFee": "0",
"paymentType": 1,
"trench": "CLABE - TESORED"
},
{
"paymentId": 105,
"fiatFee": "0",
"paymentType": 1,
"trench": "CLABE - FINCO PAY"
}
]
}
}
paymentType: 1(自动)方式无需人工干预即可完成结算。paymentType: 0(人工)方式需要人工审核,可能需要更长时间才能完成。⌘I
获取加密货币→法币支付方式
curl --request GET \
--url https://api-test.velafi.com/v2/base/sell/payments \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/base/sell/payments"
headers = {"X-BH-TOKEN": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-BH-TOKEN': '<api-key>'}};
fetch('https://api-test.velafi.com/v2/base/sell/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api-test.velafi.com/v2/base/sell/payments")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"country": "<string>",
"fiat": "<string>",
"crypto": "<string>",
"paymentList": [
{
"paymentId": 123,
"fiatFee": "<string>",
"paymentType": 123,
"trench": "<string>"
}
]
}
}
