How to get the latest Forex Exchange Rates via Fixer REST API? [JavaScript/AJAX Code]

An example of getting the latest foreign exchange rates by requesting the free foreign exchange rates and currency conversion REST API service. The real-time exchange rate API service is provided by Fixer.io. The exchange rates API key is passed as a URL parameter. You can request the free exchange rates API by making HTTP GET requests. The JavaScript/AJAX code was automatically generated for the Exchange Rates API example.
How to get the latest Forex Exchange Rates via Fixer REST API? [JavaScript/AJAX Code] Send
GET /api/latest?access_key={fixer_apikey}&base=EUR HTTP/1.1
Host: data.fixer.io
Accept: application/json

Updated: Viewed: 18085 times
JavaScript/AJAX code for Exchange Rates API example

JavaScript/AJAX code for Exchange Rates API Example

This JavaScript/AJAX code snippet was generated automatically for the Exchange Rates API example.
<< Back to the Exchange Rates API example

How do I request the Forex Exchange Rates API?

To get the current and historical foreign exchange rates via the REST API service, you need to make an HTTP GET request to the forex exchange rates REST API endpoint and provide your free REST API key as an URL parameter. Forex exchange rates are available for 170 world currencies.

http://data.fixer.io/api/latest?access_key={apikey}&base=EUR

Free Fixer accounts are limited to EURO base currency only. Paid accounts can pass the base currency as the second URL parameter.

http://data.fixer.io/api/latest?access_key={apikey}&base=USD

Generate code snippets for JavaScript/AJAX and other programming languages

Convert your Exchange Rates API request to the PHP, JavaScript/AJAX, Node.js, Curl/Bash, Python, Java, C#/.NET code snippets using the JavaScript/AJAX code generator.