swap 报价
curl --request GET \
--url https://api.qbank.cl/platform/v1/swaps/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qbank.cl/platform/v1/swaps/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qbank.cl/platform/v1/swaps/quote', 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.qbank.cl/platform/v1/swaps/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/swaps/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qbank.cl/platform/v1/swaps/quote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/swaps/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"from_asset": "USDT",
"to_asset": "BTC",
"from_amount": "1000.000000",
"to_amount": "0.01568419",
"rate": "0.00001568",
"indicative": true
}{
"error": "invalid_pair",
"message": "from_asset and to_asset must differ"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "pricing_unavailable",
"message": "execution price is unavailable or stale; retry later"
}swap 报价
在你的 USDT、USDC、BTC 和 GOLD 余额之间兑换的免费指示性报价(任意交易对,源与目标不同)。你看到的汇率就是你账户的执行汇率——所见即所得,无额外费用。指示性:执行时使用 POST 当刻的价格(稳定币对保持稳定)。
GET
/
v1
/
swaps
/
quote
swap 报价
curl --request GET \
--url https://api.qbank.cl/platform/v1/swaps/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qbank.cl/platform/v1/swaps/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qbank.cl/platform/v1/swaps/quote', 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.qbank.cl/platform/v1/swaps/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/swaps/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qbank.cl/platform/v1/swaps/quote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/swaps/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"from_asset": "USDT",
"to_asset": "BTC",
"from_amount": "1000.000000",
"to_amount": "0.01568419",
"rate": "0.00001568",
"indicative": true
}{
"error": "invalid_pair",
"message": "from_asset and to_asset must differ"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "pricing_unavailable",
"message": "execution price is unavailable or stale; retry later"
}授权
会话 JWT(来自注册/登录)或 API key(pk_...)。
也接受 X-API-Key: <token> 作为替代请求头。
查询参数
可用选项:
USDT, USDC, BTC, GOLD 可用选项:
USDT, USDC, BTC, GOLD 源货币金额(不超过其小数位数)。
最后修改于 2026年7月19日
⌘I