Quote a 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": "USD",
"to_asset": "BTC",
"from_amount": "1000.00",
"to_amount": "0.01568419",
"rate": "0.00001568",
"fees": [
{
"leg": "from",
"asset": "USD",
"percent": "0.20"
},
{
"leg": "to",
"asset": "BTC",
"percent": "0.15"
}
],
"fee_total_pct": "0.3500",
"fee_note": "included_in_rate",
"indicative": true,
"coverage_exempt": false
}{
"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"
}Quote a swap
Free indicative quote to convert between your USD (default), USDT, USDC, BTC, GOLD, SILVER and PLATINUM balances (any pair, source different from destination). The rate you see is your account’s execution rate — quoted = received, no separate fees. Indicative: execution uses the price at the POST moment (stablecoin pairs are stable).
GET
/
v1
/
swaps
/
quote
Quote a 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": "USD",
"to_asset": "BTC",
"from_amount": "1000.00",
"to_amount": "0.01568419",
"rate": "0.00001568",
"fees": [
{
"leg": "from",
"asset": "USD",
"percent": "0.20"
},
{
"leg": "to",
"asset": "BTC",
"percent": "0.15"
}
],
"fee_total_pct": "0.3500",
"fee_note": "included_in_rate",
"indicative": true,
"coverage_exempt": false
}{
"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"
}Authorizations
Query Parameters
Response
Indicative quote.