With over 15 exchange rate data sources, the Exchangerates API is delivering exchanging rates data for more than 170 world currencies. This API has several endpoints, where each of them serves a different purpose, use case. The endpoints include functionalities like receiving the latest exchange rates information for a specific set, or for all currencies; conversion from one to another currency; receiving data Time-series for multiple or for one currency, and preserving the API daily for the fluctuation data.
API Key
The API has a unique identifier as an API key that gets passed into the API as a URL parameter access_key. This parameter serves as a unique identifying authentication with the Exchangerates API.
Base URL:
http://localhost:3005/v1/exchange-rates
Copy Append your API Key: Append your API Key: See an example of how to authenticate the Exchangerates API with the access_key parameter: https
http://localhost:3005/v1/exchange-rates/latest
? access_key = API_KEY
API Response:
The delivered exchange rates with the API are, by default, connected to the Euro. The data gets returned in a standard JSON format and can easily be reparsed in any programming language.
Example Response: See below an example of an API response that provides information about several world currencies that are commonly used, all in connection with the Euro currency and time-stamped with time information of the collected information.
As we can see from the example above, when it is queried for exchange rates in real-time, the API response always contains a timestamp object, which is a standard UNIX timestamp that shows the time when the provided exchange rate information was collected. Also, we have a base object, which contains the short currency code of the currency, an object that contains the date when the given exchange rate information was collected, and rates object that contains the exchange rate data. Below, in the Endpoints section, we will discuss the API response structure more in detail. https
Available Endpoints
The API comes with a number of endpoints where each of them provides different functionality. Please have in mind that depending on your subscribed plan, some endpoints will be available and some may not be available.
Latest Rates Endpoint: This endpoint, depending on your subscription plan will return real-time exchange rate data which gets updated every 60 minutes, every 10 minutes, or every 60 seconds Convert Endpoint: With this endpoint, we have any amount conversion from one currency to another. Historical Rates Endpoint: This endpoint returns exchange rate data in real-time for all available currencies or for a given date frame. Fluctuations Endpoint: This endpoint returns the fluctuation data between specified dates. The data can be for all available currencies or for a specific set.
SSL Connection
Every subscription plan on exchangeratesapi.net is with 256-bit SSL encryption. Simply use the https protocol instead of http in order to connect to the API through SSL.
This endpoint, depending on your subscription plan will return real-time exchange rate data which gets updated every 60 minutes, every 10 minutes, or every 60 seconds.
API Request :
https://api.exchangeratesapi.net/v1/latest
? access_key = API_KEY
& base = USD
& symbols = GBP,JPY,EUR
Request Parameters
Parameter
Description
access_key
[required] Your API Key.
base
[optional] Enter the three-letter currency code of your preferred base currency..
symbols
[optional] Enter a list of currency codes to limit output currencies
API Response :
Response Objects
Parameter
Description
success
depending on whether or not your API request has succeeded.
timestamp
Returns the exact date and time (UNIX time stamp) the given rates were collected..
base
Returns the three-letter currency code of the base currency used for this request..
rates
Returns exchange rate data for the currencies you have requested.
With this endpoint we have the possibility to see historical rates of the currencies back to 1999, most of the currencies data are available until 1999. You can query the Exchangerates API for historical rates by appending a start date and an end date (format YYYY-MM-DD ) ) to the base URL. Maximum time frame is 365 days..
API Request :
https://api.exchangeratesapi.net/v1/historical
? access_key = API_KEY
& start_date=2021-01-01
& end_date=2021-02-01
Request Parameters
Parameter
Description
start_date
[required] Start date in the past for which historical rates are requested
end_date
[required] End date in the past for which historical rates are requested
access_key
[required] Your API Key.
base
[optional] Enter the three-letter currency code of your preferred base currency..
currency_codes
[optional] Enter a list of currency codes to limit output currencies
API Response :
{
"base": "USD"
"success": true,
"start_date": "2021-01-01",
"end_date": "2021-02-01",
"rates": {
"2021-01-01": {
"AED": 3.673204,
"AFN": 77.571739
...}
"2021-01-02": {
"AED": 3.673204,
"AFN": 77.571739
...}
"2021-01-03": {
"AED": 3.67291,
"AFN": 77.571739
...}
...}
}
Response Objects
Response Object
Description
success
Returns true or false depending on whether or not your API request has succeeded
start_date
Returns the start date for which historical rates were requested.
end_date
Returns the end date for which historical rates were requested.
timestamp
Returns the exact date and time (UNIX time stamp) the given rates were collected..
base
Returns the three-letter currency code of the base currency used for this request..
rates
Returns exchange rate data for the currencies you have requested. Object will contain dates between start and end date. Each date will contain rates object with the exchange rate data for the currencies you have requested.
This is a separate endpoint for currency conversion that comes with the Exchangerates API and can be used toconvert an amount from one currency to another. Please use this API endpoint for the conversion of any currency. It is also possible to convert currencies using historical exchange rate data. To do this, please also use the API'sdate PARAMETERand set it to your preferred date. (format YYYY-MM-DD).
API Request :
https://api.exchangeratesapi.net/v1/convert
? access_key=API_KEY
& from=GBP
& to=JPY
& amount=25
Request Parameters
Parameter
Description
access_key
[required] Your API Key.
from
[required] The three-letter currency code of the currency you would like to convert from.
to
[required] The three-letter currency code of the currency you would like to convert to.
amount
[required] The amount to be converted.
date
[optional] Specify a date (format YYYY-MM-DD) to use historical rates for this conversion.
API Response :
{
"result": 4801.337299,
"historical": false,
"date": "2024-05-04",
"success": true,
}
Response Objects
Response Object
Description
success
Returns true or false depending on whether or not your API request has succeeded
historical
Returns true if historical rates are used for this conversion.
date
Returns the date (format YYYY-MM-DD) used for this conversion.
With the fluctuation API endpoint, you can receive information about the currency'sfluctuation on a day-to-day basis. To be able to use this feature, add thestart_date and end_date and select which currencies (currency_code) you would like to receive info for from the API..
API Request :
https://api.exchangeratesapi.net/v1/fluctuations
? access_key=API_KEY
& start_date=2020-12-01
& end_date=2022-12-24
Request Parameters
Parameter
Description
access_key
[required] Your API Key.
start_date
[required] The start date of your preferred fluctuation timeframe.
end_date
[required] The end date of your preferred fluctuation timeframe.
base
[optional] Enter the three-letter currency code of your preferred base currency..
currency_codes
[optional] Enter a list of currency codes to limit output currencies
API Response :
{
"base": "USD",
"success": true,
"start_date": "2021-01-01",
"end_date": "2022-01-02",
"rates": {
"AED": {
"start_rate": 3.673204,
"end_rate": 3.67298,
"change": -0.00022400000000022402,
"change_pct": -0.006098218340179963
},
...}
},
}
Response Objects
Response Object
Description
success
Returns true or false depending on whether or not your API request has succeeded
start_date
The start date of your time frame.
end_date
The end date of your time frame.
base
Returns the three-letter currency code of the base currency used for this request..
rate
Returns fluctuation date for the given date frames.
rates > start_rate
Returns the exchange collected on your start date.
rates > end_rate
Returns the exchange collected on your end date.
rates > change
Returns the change (decimal number) of the given currency rate between your start and end date.
rates > change_pct
Returns the percentage change of the given currency rate between your start and end date.
Specify Currency Codes
In order to have reduced bandwidth, you can limit the number of output currencies to a specific set of your choice on most API endpoints. To do this, simply append the Exchangerates API's currency_codesparameter to your API request.
Example :
https://api.exchangeratesapi.net/v1/latest
? access_key=API_KEY
& currency_codes=USD¤cy_codes=EUR
The API's response for the request above will be limited to the currencies USD and EUR.
Changing Base Currency
Provided changing base currency is supported on your subscription plan, you can change the currency to which your output currency rates are relative to by appending the base parameter to your API request URL and setting it to the three-letter code of your preferred base currency.
You will be charged for your monthly subscription plan, plus any overage fees applied. Your credit card will be billed after the billing period has ended.
I would like to upgrade my plan. How can I do that?
You can easily upgrade your plan by going to your Dashboard and selecting the new plan that would be more suitable for your business needs. Additionally, you may contact your.