Get Quote
Overview
A quote is a real-time exchange rate calculation that returns the exact rate and final amount for a given currency conversion.
Endpoint
GET /quote
API Reference: Get Quote
Authentication
store, supervisor and branch users can access to this route.
x-api-key: <your_api_key>
Authorization: Bearer <access_token>
See Authentication for more details.
Request Example
curl -X GET "/api/v1/quote?fromCurrency=BRL&toCurrency=USD&context=payment_order" \
-H "Content-Type: application/json" \
-H "x-api-key: <your_api_key>" \
-H "Authorization: Bearer <your_access_token>"
Query Parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
fromCurrency | enum | BRL | Source currency for quote calculation |
toCurrency | enum | USD | Destination currency for quote calculation |
context | enum | payment_order | Quote context that identifies the type of operation |
Response Example
{
"success": true,
"data": {
"fromCurrency": "BRL",
"toCurrency": "USD",
"baseExchangeRate": "5.20",
"targetExchangeRate": "0.19230769230769230769"
}
}
Note:
baseExchangeRatealways represents the exchange rate with USD as the base currency (i.e., how many units of the non-USD currency equal 1 USD).targetExchangeRateis its inverse — the effective rate for the requested conversion direction.
Additional examples
fromCurrency=USD&toCurrency=BRL&context=transfer
{
"success": true,
"data": {
"fromCurrency": "USD",
"toCurrency": "BRL",
"baseExchangeRate": "5.15",
"targetExchangeRate": "0.19417475728155339806"
}
}
fromCurrency=USD&toCurrency=EUR&context=transfer
{
"success": true,
"data": {
"fromCurrency": "USD",
"toCurrency": "EUR",
"baseExchangeRate": "1.13",
"targetExchangeRate": "0.88495575221238938053"
}
}