Cotizar un 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"
}Cotizar un swap
Cotización indicativa gratis para convertir entre tus saldos USDT, USDC, BTC, GOLD, SILVER y PLATINUM (cualquier par, origen distinto del destino). La tasa que ves es la tasa de ejecución de tu cuenta — cotizado = recibido, sin comisiones aparte. Indicativa: la ejecución usa el precio del momento del POST (los pares entre stablecoins son estables).
GET
/
v1
/
swaps
/
quote
Cotizar un 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"
}Autorizaciones
JWT de sesión (de register/login) o llave de API (pk_...).
X-API-Key: <token> se acepta como header alternativo.
Parámetros de consulta
Opciones disponibles:
USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM Opciones disponibles:
USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM Monto en la moneda de origen (hasta sus decimales).