Get historical exchange rates for any date available from the Open Exchange Rates API, currently going back to 1st January 1999.

Like latest.json, our /historical/ route provides a standard response object containing all the conversion rates for all available symbols/currencies on your requested date, labeled by their international-standard 3-letter ISO currency codes.

The historical rates returned are the last values we published for a given UTC day (up to and including 23:59:59 UTC), except for the current UTC date.

The base property provides the 3-letter currency code to which all the delivered exchange rates are relative. This base currency is also given in the rates object by default (e.g. "USD": 1).

The rates property is an object (hash/dictionary/associative array) containing all the conversion or exchange rates for all of the available (or requested) currencies, labeled by their international-standard 3-letter currency codes. All the values are relative to 1 unit of the requested base currency.

The timestamp property indicates the time (UNIX) that the rates were published. (If you’re using the timestamp value in JavaScript, remember to multiply it by 1000, because JavaScript uses time in milliseconds instead of seconds.)

📘

Additional Parameters

Changing the base currency and requesting specific symbols are currently available for clients on the Developer, Enterprise and Unlimited plans.

🚧

Historical Timezones & Daylight Saving Time

For the sake of consistency, all dates and timestamps in the Open Exchange Rates API refer to the UTC timezone (i.e. GMT+00:00), with no daylight saving applied.

If your server/integration operates in a different timezone (or supports multiple timezones), you should convert your server's local time to the equivalent UTC time before making your request.

🚧

Historical requests for the current day's UTC date

Historical rates are generally the last values we published on a given UTC day (up to and including 23:59:59 UTC), with the exception of the current UTC date.

If you make a request for the current day's historical file, you will receive the most recent rates available for your subscription plan at that moment, as the day is not yet complete (therefore in such cases, the values returned would be the same as you would find via our latest.json endpoint).

This behaviour was added early on in response to client feedback, because the historical endpoint aims to always provide a value for a valid date (even if that date is the same as today's date and therefore no end-of-day values are available).

If you wish to obtain rates for a historical date that is the same as today's date (in UTC), you may prefer to make use of the latest.json endpoint instead, in order to prevent unexpected behaviour.

Basic Code Samples

var date = "2010-10-10";

$.get('https://openexchangerates.org/api/historical/' + date + '.json', {app_id: 'YOUR_APP_ID'}, function(data) {
    console.log("On " + date + ", 1 US Dollar was worth " + data.rates.GBP + " GBP");
});
More code samples are on their way! Please get in touch if you'd like to submit a new/improved code sample in your languague or framework.

To request rates for a different base currency, please see Changing Base Currency.

Errors

Please see API Error Messages for a list of possible errors not specified above.

Language
Credentials
Query
Click Try It! to start a request and see the response here!