Exchange Rates
In the context of our API, exchange rates refer to the conversion values between different currency pairs. This feature allows users to retrieve real-time exchange rates to facilitate cross-border transactions.
Our API provides an endpoint to fetch the latest exchange rates, ensuring accurate and up-to-date currency conversion. The available currency pairs at the moment are:
USD/ARS
ARS/USD
USD/BRL
BRL/USD
ARS/BRL
BRL/ARS
These rates are periodically updated based on market conditions.
Retrieve exchange rate
This endpoint allows you to retrieve the latest exchange rate between two supported currencies. It returns both conversion directions for the requested currency pair.
GET https://stage.api.payments.depay.us/v2/exchange-rates/rates/{base}/{target}
Headers
Authorization*
String
Bearer Token.
Query Parameters
precision
String
Number of decimal places used in the exchange rate returned by the API.
Path Parameters
base*
String
The currency code you want to convert from (e.g., USD).
target*
String
The currency code you want to convert to (e.g., BRL).
Response
exchangeRate_1
String
Conversion rate from target_currency to base_currency
description_xr_1
String
Description of the exchange rate.
exchangeRate_2
String
Conversion rate from base_currency to target_currency
description_xr_2
String
Description of the exchange rate.
{
"exchangeRate_1": "0.17",
"description_xr_1": "1 BRL = 0.17 USD",
"exchangeRate_2": "5.86",
"description_xr_2": "1 USD = 5.86 BRL"
}{
"eventId": "BadRequest",
"detail": "One or more validation errors occurred.",
"correlationId": "e9119b1b-07ee-4734-8fb4-ceac60ecabc4",
"errores": [{
"code": "400",
"title": "",
"detail": "The X field is required."
}]
}{
"statusCode": 409,
"message": "Conflict error"
}Last updated