cURL
curl --request GET \
--url https://api.sandbox.capa.fi/api/partner/v2/quotes \
--header 'partner-api-key: <api-key>'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/quotes"
headers = {"partner-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'partner-api-key': '<api-key>'}};
fetch('https://api.sandbox.capa.fi/api/partner/v2/quotes', 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.sandbox.capa.fi/api/partner/v2/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"partner-api-key: <api-key>"
],
]);
$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.sandbox.capa.fi/api/partner/v2/quotes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("partner-api-key", "<api-key>")
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.sandbox.capa.fi/api/partner/v2/quotes")
.header("partner-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["partner-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"fiatAmount": 5000,
"fiatCurrency": "MXN",
"blockchainSymbol": "POL",
"tokenSymbol": "USDC",
"transactionType": "ON_RAMP",
"cryptoAmount": 40,
"rate": 57.01,
"premiumSpread": 0.01,
"flow": "REGULAR"
}
}Quotes
Get Quote Rate
GET
/
api
/
partner
/
v2
/
quotes
cURL
curl --request GET \
--url https://api.sandbox.capa.fi/api/partner/v2/quotes \
--header 'partner-api-key: <api-key>'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/quotes"
headers = {"partner-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'partner-api-key': '<api-key>'}};
fetch('https://api.sandbox.capa.fi/api/partner/v2/quotes', 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.sandbox.capa.fi/api/partner/v2/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"partner-api-key: <api-key>"
],
]);
$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.sandbox.capa.fi/api/partner/v2/quotes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("partner-api-key", "<api-key>")
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.sandbox.capa.fi/api/partner/v2/quotes")
.header("partner-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.capa.fi/api/partner/v2/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["partner-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"fiatAmount": 5000,
"fiatCurrency": "MXN",
"blockchainSymbol": "POL",
"tokenSymbol": "USDC",
"transactionType": "ON_RAMP",
"cryptoAmount": 40,
"rate": 57.01,
"premiumSpread": 0.01,
"flow": "REGULAR"
}
}Retrieves a real-time exchange rate quote for an on-ramp or off-ramp transaction. Use this to display estimated conversion amounts to users before they commit to a transaction.
Field Relationships
cryptoAmountis required forOFF_RAMPtransactions,fiatAmountis required forON_RAMP.countryandrailare optional overrides — use them only when the currency is not the default for the country (e.g., USD in China via SWIFT).
Important Notes
- This returns a real-time rate that is not locked. To lock a rate, use POST /api/partner/v2/quotes instead.
- The
flowfield indicates whether the transaction qualifies asOTC,PAYMENT, orREGULARbased on the amount. - Use consistent
tokenSymbol,blockchainSymbol, andfiatCurrencyvalues when creating the actual transaction.
Error Codes
Common Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”API Key is missing” |
| 401 | UNAUTHORIZED | ”Invalid API Key format” |
| 401 | UNAUTHORIZED | ”Invalid API Key” |
| 403 | INVALID_PARTNER_FLOW | ”The partner has an invalid flow.” |
Endpoint-Specific Errors
| HTTP Status | Code | Message |
|---|---|---|
| 400 | INVALID_USER_INPUT_ERROR | ”Invalid User Input” |
| 400 | BAD_REQUEST | ”Fiat currency is disabled or does not exist” |
| 400 | BAD_REQUEST | ”This blockchain and token combination is disabled or does not exist” |
| 500 | INTERNAL_SERVER_ERROR | ”Internal error doing quote” |
Authorizations
API key for the affiliated partner performing the request.
Query Parameters
The token symbol
Available options:
USDC, USDT Example:
"USDC"
Transaction type (ON_RAMP or OFF_RAMP)
Available options:
ON_RAMP, OFF_RAMP, CROSS_RAMP Example:
"ON_RAMP"
The blockchain symbol. BSC is only available for transactions over 50,000 MXN.
Available options:
POL, SOL, ETH, BSC Example:
"POL"
The fiat currency
Available options:
MXN, DOP, USD, EUR Example:
"MXN"
The amount of crypto (required for OFF_RAMP)
The amount of fiat (required for ON_RAMP)
Spread percentage to be applied to the exchange rate
The country where the transaction is being performed. Use it only when the currency is not default for the country.
Available options:
MX, DO, US, AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, IS, LI, NO, CH, GB, MC, SM, AD, VA, CN The payment rail for the transaction. Use it only when the rail is not default for the country.
Available options:
SPEI, ACH, WIRE, SEPA, SWIFT