6

I'm looking for free open APIs (XML or REST(JSON)*) that I can access from my program code to get the (daily) exchange rate for foreign currencies to the Euro, Dollar or British Pound (especially from non-Euro European countries and the US).

No historical data required, I just want to query (on demand or each night) What is the exchange rate today? and store it in local database tables.
The source data should be updated at least once per day.

Ultimately, I want to encapsulate (updates from) several of these into my code (a standalone Windows program), so that our customers can choose which source they want to use for the exchange rates to their 'base currency' EUR or USD or GBP.
(This also means that the API should be free for commercial use, that it has a reputable source - i.e. it is not likely to disappear overnight, and that it can handle several 1000 requests/day).

From Philshem's answer I understand that in my case daily 'settlements' are preferable over real-time currency data.

* Actually, any parse-able format will do, but JSON or XML is preferable because more structured.


[Added 4-4-2016 by OP]
While my question was out, I kept searching and found this June 2010 post on StackOverflow: How do I get currency exchange rates via an API such as Google Finance? .
Since that is an old post and not limited to free APIs, I have verified which ones are still active and partially meet my requirements, and I have added these as an answer to this post, together with the European Central Bank resource that I mentioned here earlier.

Any APIs I find that meet all requirements, I will add as separate answers each.

6 Answers 6

6

These converters almost meet my requirements (see question text; per 4-4-2016):

1
  • 1
    Thank you for linking to my service free.currencyconverterapi.com , I've added the number of currencies supported.
    – Manny
    Oct 11, 2017 at 2:01
3

The Quandl API for Currency Data seems to meet all requirements:

Quandl offers spot exchange rates from the Bank of England (BOE) for over 40 currencies into USD, GBP and EUR. We also offer rates from the European Central Bank (ECB) for 30+ currencies into EUR and from the Federal Reserve Bank of St. Louis (FRED) for 20+ currencies into USD.

You need to register for an API key, then as an authenticated user you have a limit of 2,000 calls per 10 minutes, and a limit of 50,000 calls per day.

2

Currencies at the end of the day are published as settlements, which are often averages of the day's trading and are used as references. For real-time currency data, you actually are looking at Bid/Ask data (for example). This means that there isn't really a single correct or published "current exchange rate". Even for Bid/Ask prices, each marketplace will have different data, depending on volumes traded, market participants, etc.

In order to get free bid/ask pricing for currency exchange rates, one tool that would work is the unofficial Yahoo Finance API.

You can use the Yahoo Finance website to find the exchange rate search terms, for example:

https://finance.yahoo.com/q?s=EURCHF=X

Then use those search terms as part of the unofficial API

finance.yahoo.com/d/quotes.csv?s=EURCHF=X&f=sb2b3jk

Note: If you are providing this data to paying customers, then I don't suggest using an unofficial API. There are many paid services that will provider proper APIs with correct licensing. I found one such service that has unlimited queries with real-time and historical data from $1200 per year (which I find to be a modest expense for the convenience of stability, accuracy, legality).

1

One effective currency conversion API for me is money.js

Features: 165+ Currencies, updated often, infinite free requests.

You simply give it the currencies you wish to convert, and off you go! It's really simple & easy to use. For example:

fx.convert(1, {from: 'GBP', to: 'EUR'})

Will return 1 pound (GBP) in euros, with immense precision. Right now, it returned 1.254187176646604.

Additionally, that line of code can be made even simpler!

fx.settings = { to: "EUR" };
fx.convert(1, {from: "GBP"}); // Using EUR from previously set fx.settings.
1
  • That does not meet my requirements. It's Javascript code that I would have to host somewhere. It is however a frontend for OpenExchangeRates.org, where I overlooked earlier that it has free option that allows 1000 API requests (with JSON response) per month
    – user4293
    Apr 4, 2016 at 17:45
1

1Forge (http://1forge.com) provides what you're looking for.

To get rates for specific currency pairs try this:

https://forex.1forge.com/1.0.1/quotes?pairs=EURUSD,GBPJPY,AUDUSD

If you just want to convert currencies like in your example, try this:

https://forex.1forge.com/1.0.1/convert?from=USD&to=EUR&quantity=100
1
  • One of its strong points True tick data: 100+ updates per second counts against my requirement of daily settlements ;-) But it may be useful for others.
    – user4293
    Aug 3, 2018 at 9:01
0

I created a Free Currency Exchange API,

Some of it's features are

  • Free & Blazing Fast response
  • No Rate limits
  • 150+ Currencies, Including Common Cryptocurrencies
  • It's Daily Updated

The API is user friendly, to get the currency list with EUR as base currency use this URL: https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/eur.json

More Details for the API is available at https://github.com/fawazahmed0/currency-api

2
  • Whilst I commend you for going to the trouble of creating an api to serve up free data to the world, you seem to be scraping data from elsewhere and using your Github account to store it in text form under source control. Besides duplicating a lot of data, you're falling foul of a number of software engineering best practices. I suggest you look at your project's design again. A simple relational database seems a much better way to serve up your data. Jan 6, 2022 at 20:09
  • @user1007074 A simple relational database needs to have a server, and then I will need to rate limit everyone. The project is designed in such a way to avoid rate limits and to run free of cost using free public tools and services like GitHub, JSDelivr etc Jan 7, 2022 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.