
The latest endpoint returns exchange rate data in real-time for all available currencies or for a specific set. The endpoints indicated below must be attached to (eg: latest becomes ), and added the access_key param with your API access key. Depending on the subscribed plan, endpoints may or may not be available (their pricing page explains what features are covered by each tier). To narrow down the results to just a few of them, we indicate the currency codes via param symbols.įor instance, to retrieve data for the USD, British pound, Australian dollar, Japanese Yen and Chinese Yuan (compared against the Euro, which is the base currency by default), we execute this endpoint: ĮxchangeRatesApi.io provides several REST endpoints, to fetch different sets of data. ( Large preview)Īs can be possibly appreciated in the image above, the data for all 168 currencies has been retrieved. To visualize the response, copy/paste the endpoint in your browser: Viewing the response to the REST API on the browser. We grab our API access key, and append it to the endpoint:
#BEST FREE CURRENCY CONVERTER API FREE#
It is always up-to-date, compiling the data from a broad base of commercial sources and banks around the world.Īfter signing up on their service ( tip: they have a free tier), we will be assigned an API access key: Dashboard in ExchangeRatesApi.io. How Do We Do ItĮxchangeRatesApi.io provides a REST API, offering the latest forex data for 168 currencies. Having access to exchange rate data via an API, we can implement this same functionality for our own online shops. ( Large preview)įinally, back on the product page, the price is displayed in euros: Product page in .uk, with price shown in euros.


From among them, I’ve chosen the Euro: Dropdown with region settings. ( Large preview)Īfter clicking on “Change”, we are presented a select input, containing several pre-defined currencies.

In the country/region settings, there is the option to change the currency: Dropdown with region settings. ( Large preview)īut we can also see the price in a different currency, if we wish to. When visiting a product page in .uk, we are presented the price in British pounds: Product page in .uk, with price shown in pounds. Simply said, we want to do what Amazon is doing: Give the option to the user in our online shop to display the prices in a currency of their own choosing. In this article, we will introduce ExchangeRatesApi.io, a popular API solution providing data for current and historical exchange rates for 168 currencies. Thanks to APIs providing currency exchange data, we can add a currency convertor to our online shops rather effortlessly. This means that we can’t have a pre-defined list of exchange rates stored in our application these must be gathered in real-time. To achieve that, we can convert the price of the item from a base currency (say, EUR) to the visitor’s currency (say, CNY) using the exchange rate between the two currencies at that specific time.Ĭurrency exchange rates change constantly, on an hourly basis (and even faster). If we want to provide a great user experience for them, to increase the chances of them buying our product, and coming back to the site, there is something very simple we can do: Display the price of the shopping items in their own currency. As we live in a global village, if we have an online shop, many of our visitors will quite likely be based on a different country than our own, and use a different currency than our own.

Products and services are increasingly accessed and bought online. This article has been kindly supported by our dear friends at ExchangeRatesApi.io who provide developers with powerful data and conversion APIs for current and historical exchange rates.
