cURL
curl --request POST \
--url https://api.sandbox.capa.fi/api/partner/v2/quotes \
--header 'Content-Type: application/json' \
--header 'partner-api-key: <api-key>' \
--data '
{
"tokenSymbol": "USDC",
"transactionType": "ON_RAMP",
"blockchainSymbol": "POL",
"fiatCurrency": "MXN",
"cryptoAmount": 123,
"fiatAmount": 123,
"premiumSpread": 123,
"forwardingDays": 123
}
'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/quotes"
payload = {
"tokenSymbol": "USDC",
"transactionType": "ON_RAMP",
"blockchainSymbol": "POL",
"fiatCurrency": "MXN",
"cryptoAmount": 123,
"fiatAmount": 123,
"premiumSpread": 123,
"forwardingDays": 123
}
headers = {
"partner-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'partner-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tokenSymbol: 'USDC',
transactionType: 'ON_RAMP',
blockchainSymbol: 'POL',
fiatCurrency: 'MXN',
cryptoAmount: 123,
fiatAmount: 123,
premiumSpread: 123,
forwardingDays: 123
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tokenSymbol' => 'USDC',
'transactionType' => 'ON_RAMP',
'blockchainSymbol' => 'POL',
'fiatCurrency' => 'MXN',
'cryptoAmount' => 123,
'fiatAmount' => 123,
'premiumSpread' => 123,
'forwardingDays' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.capa.fi/api/partner/v2/quotes"
payload := strings.NewReader("{\n \"tokenSymbol\": \"USDC\",\n \"transactionType\": \"ON_RAMP\",\n \"blockchainSymbol\": \"POL\",\n \"fiatCurrency\": \"MXN\",\n \"cryptoAmount\": 123,\n \"fiatAmount\": 123,\n \"premiumSpread\": 123,\n \"forwardingDays\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("partner-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.capa.fi/api/partner/v2/quotes")
.header("partner-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tokenSymbol\": \"USDC\",\n \"transactionType\": \"ON_RAMP\",\n \"blockchainSymbol\": \"POL\",\n \"fiatCurrency\": \"MXN\",\n \"cryptoAmount\": 123,\n \"fiatAmount\": 123,\n \"premiumSpread\": 123,\n \"forwardingDays\": 123\n}")
.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::Post.new(url)
request["partner-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokenSymbol\": \"USDC\",\n \"transactionType\": \"ON_RAMP\",\n \"blockchainSymbol\": \"POL\",\n \"fiatCurrency\": \"MXN\",\n \"cryptoAmount\": 123,\n \"fiatAmount\": 123,\n \"premiumSpread\": 123,\n \"forwardingDays\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"fiatAmount": 5000,
"fiatCurrency": "MXN",
"blockchainSymbol": "POL",
"tokenSymbol": "USDC",
"transactionType": "ON_RAMP",
"cryptoAmount": 289.251417,
"rate": 17.286,
"premiumSpread": 0.01,
"flow": "OTC",
"fees": [
{
"fee": "24.875621890547264",
"currency": "MXN",
"type": "amount",
"name": "spread_amount"
}
],
"marketRate": 17.2,
"spread": 0.005,
"quoteId": "123e4567-e89b-12d3-a456-426614174000",
"expiresAt": "2025-01-01T00:00:00.000Z",
"forwardingDays": 2,
"effectiveForwardingDays": 4,
"forwardingSettlementDate": "2026-03-14T03:25:27.495Z"
}
}
Quotes
Create Quote
POST
/
api
/
partner
/
v2
/
quotes
cURL
curl --request POST \
--url https://api.sandbox.capa.fi/api/partner/v2/quotes \
--header 'Content-Type: application/json' \
--header 'partner-api-key: <api-key>' \
--data '
{
"tokenSymbol": "USDC",
"transactionType": "ON_RAMP",
"blockchainSymbol": "POL",
"fiatCurrency": "MXN",
"cryptoAmount": 123,
"fiatAmount": 123,
"premiumSpread": 123,
"forwardingDays": 123
}
'import requests
url = "https://api.sandbox.capa.fi/api/partner/v2/quotes"
payload = {
"tokenSymbol": "USDC",
"transactionType": "ON_RAMP",
"blockchainSymbol": "POL",
"fiatCurrency": "MXN",
"cryptoAmount": 123,
"fiatAmount": 123,
"premiumSpread": 123,
"forwardingDays": 123
}
headers = {
"partner-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'partner-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tokenSymbol: 'USDC',
transactionType: 'ON_RAMP',
blockchainSymbol: 'POL',
fiatCurrency: 'MXN',
cryptoAmount: 123,
fiatAmount: 123,
premiumSpread: 123,
forwardingDays: 123
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tokenSymbol' => 'USDC',
'transactionType' => 'ON_RAMP',
'blockchainSymbol' => 'POL',
'fiatCurrency' => 'MXN',
'cryptoAmount' => 123,
'fiatAmount' => 123,
'premiumSpread' => 123,
'forwardingDays' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.capa.fi/api/partner/v2/quotes"
payload := strings.NewReader("{\n \"tokenSymbol\": \"USDC\",\n \"transactionType\": \"ON_RAMP\",\n \"blockchainSymbol\": \"POL\",\n \"fiatCurrency\": \"MXN\",\n \"cryptoAmount\": 123,\n \"fiatAmount\": 123,\n \"premiumSpread\": 123,\n \"forwardingDays\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("partner-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.capa.fi/api/partner/v2/quotes")
.header("partner-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tokenSymbol\": \"USDC\",\n \"transactionType\": \"ON_RAMP\",\n \"blockchainSymbol\": \"POL\",\n \"fiatCurrency\": \"MXN\",\n \"cryptoAmount\": 123,\n \"fiatAmount\": 123,\n \"premiumSpread\": 123,\n \"forwardingDays\": 123\n}")
.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::Post.new(url)
request["partner-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokenSymbol\": \"USDC\",\n \"transactionType\": \"ON_RAMP\",\n \"blockchainSymbol\": \"POL\",\n \"fiatCurrency\": \"MXN\",\n \"cryptoAmount\": 123,\n \"fiatAmount\": 123,\n \"premiumSpread\": 123,\n \"forwardingDays\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"fiatAmount": 5000,
"fiatCurrency": "MXN",
"blockchainSymbol": "POL",
"tokenSymbol": "USDC",
"transactionType": "ON_RAMP",
"cryptoAmount": 289.251417,
"rate": 17.286,
"premiumSpread": 0.01,
"flow": "OTC",
"fees": [
{
"fee": "24.875621890547264",
"currency": "MXN",
"type": "amount",
"name": "spread_amount"
}
],
"marketRate": 17.2,
"spread": 0.005,
"quoteId": "123e4567-e89b-12d3-a456-426614174000",
"expiresAt": "2025-01-01T00:00:00.000Z",
"forwardingDays": 2,
"effectiveForwardingDays": 4,
"forwardingSettlementDate": "2026-03-14T03:25:27.495Z"
}
}
Creates a locked quote with a guaranteed exchange rate. Pass the returned
quoteId when creating a transaction to use this rate.
Field Relationships
cryptoAmountis required forOFF_RAMPtransactions,fiatAmountis required forON_RAMP.countryandrailare optional overrides for non-default currency/country combinations.forwardingDays(0–4) is only supported for MXN OTC transactions (T+N settlement).
Important Notes
- Quotes expire — check the
expiresAtfield and create the transaction before it lapses. - Pass the returned
quoteIdto Create On-Ramp, Create Off-Ramp, or Create Cross-Ramp.
Error Codes
These are the errors this endpoint returns most often. Branch oncode, not message, and handle codes you don’t recognize by their HTTP status. See Error Codes for the complete list.
Common Errors
| HTTP Status | Code | Message |
|---|---|---|
| 401 | UNAUTHORIZED | ”API Key is missing” |
| 401 | UNAUTHORIZED | ”Invalid API Key format” |
| 401 | UNAUTHORIZED | ”Invalid API Key” |
| 429 | TOO_MANY_REQUESTS | ”ThrottlerException: Too Many Requests” (wait the number of seconds in the Retry-After header) |
Endpoint-Specific Errors
| HTTP Status | Code | Message |
|---|---|---|
| 400 | INVALID_USER_INPUT_ERROR | ”Invalid User Input” |
| 400 | INVALID_FIAT_AMOUNT_ERROR | ”Fiat amount is outside of the allowed range for . Should be between and “ |
| 400 | INVALID_TOKEN_AMOUNT_ERROR | ”Token amount is outside of the allowed range for . Should be between and “ |
| 404 | NOT_FOUND_ERROR | ”Requested FiatCurrency was not found” (currency, country or rail not enabled) |
| 404 | NOT_FOUND_ERROR | ”Requested BlockchainToken was not found” (blockchain and token combination not enabled) |
| 404 | NOT_FOUND_ERROR | ”Requested LegalEntityRouting was not found” (the corridor is not available) |
| 500 | INTERNAL_SERVER_ERROR | ”Failed to create quote” |
Authorizations
API key for the affiliated partner performing the request.
Body
application/json
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.
Available options:
POL, SOL, ETH, BSC, TRX 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 Number of T+N forwarding days for settlement (0-4). Only supported for MXN OTC transactions.