Skip to main content

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​

ParameterTypeExampleDescription
fromCurrencyenumBRLSource currency for quote calculation
toCurrencyenumUSDDestination currency for quote calculation
contextenumpayment_orderQuote context that identifies the type of operation

Response Example​

{
"success": true,
"data": {
"fromCurrency": "BRL",
"toCurrency": "USD",
"baseExchangeRate": "5.20",
"targetExchangeRate": "0.19230769230769230769"
}
}

Note: baseExchangeRate always represents the exchange rate with USD as the base currency (i.e., how many units of the non-USD currency equal 1 USD). targetExchangeRate is 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"
}
}