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": "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"
}Quote a swap
Free indicative quote to convert between your 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": "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"
}Authorizations
Session JWT (from register/login) or API key (pk_...).
X-API-Key: <token> is accepted as an alternative header.
Query Parameters
Available options:
USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM Available options:
USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM Amount in the source currency (up to its decimals).