配置
获取加密货币→法币交易对
获取出金流程支持的所有加密货币兑法币交易对,包括国家、法币符号、加密货币符号和交易小数精度。
GET
/
v2
/
base
/
sell
/
symbols
获取加密货币→法币交易对
curl --request GET \
--url https://api-test.velafi.com/v2/base/sell/symbols \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/base/sell/symbols"
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/symbols', 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/symbols")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": [
{
"country": "<string>",
"fiat": "<string>",
"crypto": "<string>",
"accuracy": 123
}
]
}使用 GET
/v2/base/sell/symbols 端点获取 VelaFi 出金 (Off-Ramp) 流程支持的所有加密货币兑法币交易对。每个交易对都指定了源加密货币、目标法币以及该法币所属的国家。在请求报价或创建订单之前,可使用这些交易对验证用户预期的出金兑换。
请求
GET /v2/base/sell/symbols
请求头
| 请求头 | 值 | 必填 |
|---|---|---|
X-BH-TOKEN | 通过 GET /v2/token/generate 获取的令牌 | ✓ |
查询参数
此端点不接受查询参数。响应字段
number
HTTP 风格的状态码。
200 表示成功。string
人类可读的状态消息,例如
"SUCCESS"。array
示例
cURL
curl --request GET \
--url 'https://api.velafi.com/v2/base/sell/symbols' \
--header 'X-BH-TOKEN: YOUR_TOKEN'
响应
{
"code": 200,
"msg": "SUCCESS",
"data": [
{
"country": "Mexico",
"fiat": "MXN",
"crypto": "USDT",
"accuracy": 2
},
{
"country": "United States",
"fiat": "USD",
"crypto": "USDT",
"accuracy": 2
}
]
}
将此列表与出金支付方式端点(
GET /v2/base/sell/payments)进行交叉核对,在向用户展示所选交易对之前,确认该交易对至少有一种可用的支付方式。⌘I
获取加密货币→法币交易对
curl --request GET \
--url https://api-test.velafi.com/v2/base/sell/symbols \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/base/sell/symbols"
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/symbols', 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/symbols")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": [
{
"country": "<string>",
"fiat": "<string>",
"crypto": "<string>",
"accuracy": 123
}
]
}
