12

I am looking for historical foreign exchange (forex) data for financial reporting purposes. For example, I would like to distribute a data source that could be used for determining forex gains and losses on floated amounts within open source financial software I help to develop.

The data doesn't have to be exactly what the bank would charge (standard average rates are fine as long as they are consistent), but the data needs to be semantically consistent, and would ideally cover most currencies most days.

  • What are forex rates? – RSFalcon7 May 9 '13 at 5:48
  • 1
    updated the question. Foreign exchange rates. I am looking, for example, for historical USD to EUR market conversion rates among others. – Chris Travers May 9 '13 at 5:49
6

I've used the Yahoo Finance API in the past, but apparently it doesn't exist (although it works fine). There is no documentation.

For a site with documentation, I'd suggest Open Exchange Rates, which contains forex values that you are looking for, via an API.

There are many API methods and in particular for your case, you can request a time series.

From their site:

You can access historical data snapshots, where available, in the format ‘/api/historical/yyyy-mm-dd.json’ (for example: /api/historical/2011-11-21.json.) There will soon be an 'available dates' endpoint available too.

You'll need a code to cycle over dates, here is an example of my python 2.7 code that collects 2013 precipitation and weather in Zurich.

import requests
def get_precip(gooddate):
    urlstart = 'http://api.wunderground.com/api/REDACTED_KEY/history_'
    urlend = '/q/Switzerland/Zurich.json'

    url = urlstart + str(gooddate) + urlend
    data = requests.get(url).json()
    for summary in data['history']['dailysummary']:
        print ','.join((gooddate,summary['date']['year'],summary['date']['mon'],summary['date']['mday'],summary['precipm'], summary['maxtempm'], summary['meantempm'],summary['mintempm']))

if __name__ == "__main__":
    from datetime import date
    from dateutil.rrule import rrule, DAILY

    a = date(2013, 1, 1)
    b = date(2013, 12, 31)

    for dt in rrule(DAILY, dtstart=a, until=b):
        get_precip(dt.strftime("%Y%m%d"))

update I noticed for the free account you can only make 1000 API calls per month (link). Not so open after all.

  • 1
    Also, most of the functionality you'll need to get data you want is only for paying customers – geotheory Jun 10 '14 at 16:16
3

Google finance have this information here are some examples.

According to their support page you can download some of this data

3

Several sources provide pretty nice information on exchange rates:

Ideally, of course, it would be a single daily forex rates dataset spanning over 40 years, but I haven't seen one yet.

2

This looks like the best source I've found, but no doubt there are others. http://www.oanda.com/currency/historical-rates/

  • Oanda's data are not open; they are aggregated from a variety of proprietary sources. – scruss Jun 3 '15 at 1:51
2

I started using Barchart's free api you can get daily, 15 min delayed and a ton of historical data http://freemarketdataapi.barchartondemand.com

  • can you please expand on the answer to include what is offered as part of the free API and what the limits/quotas may be? otherwise, this post looks like spam. – philshem Jul 30 '15 at 19:22
  • 1
    the barchartondemand remove or change the free api access. the url is not valid – Pedro Polonia May 16 '17 at 7:21
2

A popular tick data source is Dukascopy that offers free data spanning from 2003 (for most currencies) to now.

Data quality is usually considered good.

About the license:

Data is made available to users for personal use only, solely for the purpose of testing and evaluating their proprietary electronic trading strategies. Data is not intended and/or made available for any other purpose.

It is also prohibited to alter, modify, reverse-engineer, create derivative products on the basis of or otherwise temper with Data for purpose other than the one indicated above.

It is prohibited to publicly display any part of the Data or disseminate it to any third parties.

It is prohibited to refer, directly or indirectly, to Dukascopy and/or Data in connection with the performance of any trading strategy derived via Data. By providing access to Data, Dukascopy does not waive any of its rights in or with respect to the foregoing. No warranty by Dukascopy

Data is provided on “AS IS” and “WITH ALL ITS FAULTS” basis. Dukascopy makes no warranty and/or representation with regard to Data whatsoever. Dukascopy, its owners, subsidiaries, employees, management and agents shall have no liability whatsoever in connection with access to and use of Data by users. Without derogating from the generality of the foregoing, among other Dukascopy does not warrant or represent:


You could consider Gain Capital's historical quote data (CSV format).

The data contains the following fields: Currency Pair, Date, Bid Price and Ask Price.

The most outstanding feature of their tick data is the time range covered but:


Also http://www.fxhistoricaldata.com/ offers Forex intraday data provided in two different periods (hourly and daily) and for 17 FX pairs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.