Currency Data API provides a simple REST API with real-time and historical exchange rates for 168 world currencies, delivering currency pairs in universally usable JSON format - compatible with any of your applications.
Spot exchange rate data is retrieved from several major forex data providers in real-time, validated, processed and delivered hourly, every 10 minutes, or even within the 60-second market window.
Providing the most representative forex market value available ("midpoint" value) for every API request, the Currency Data API API powers currency converters, mobile applications, financial software components and back-office systems all around the world.
Available Endpoints
- /list Returns all available currencies.
- /live Get the most recent exchange rate data.
- /convert Convert one currency to another.
- /historical Get historical rates for a specific day.
- /timeframe Request exchange rates for a specific period of time.
- /change Request any currency's change parameters (margin, percentage).
Supported Symbols
The Currency Data API comes with a constantly updated endpoint returning all available currencies. To access this list, make a request to the API's list endpoint.
{
"success": true,
"symbols": {
"AED": "United Arab Emirates Dirham",
"AFN": "Afghan Afghani",
"ALL": "Albanian Lek",
"AMD": "Armenian Dram",
[...]
}
}
Tips
To reduce bandwidth you can limit the number of output currencies to a specific set of your choice on most API endpoints. To do so, simply append the Fixer API's symbols parameter to your API request and set it to one or more comma-separated currency codes.
curl --request GET 'https://api.apilayer.com/currency_data/live?base=USD&symbols=EUR,GBP' \
--header 'apikey: YOUR API KEY'
It is also possible to convert currencies using historical exchange rate data. To do this, please also use the API's date parameter and set it to your preferred date. (format YYYY-MM-DD)
curl --request GET 'https://api.apilayer.com/currency_data/convert?base=USD&symbols=EUR,GBP,JPY&amount=5&date=2018-01-01' \
--header 'apikey: YOUR API KEY'