jsonrates + currencylayer  Read more

We're happy to announce that the jsonrates API has been integrated into the currencylayer API.
You can continue using our API for free by signing up here ยป

Important: This documentation has been deprecated and is no longer valid. For detailed reference about API integration, usage guides and language examples please visit: currencylayer.com/documentation

Historical Data

Endpoint
Parameters
Examples


Endpoint

The endpoint for historical data is http://jsonrates.com/historical/


Parameters

base Defines the base currency for which historical exchange rates are returned.
from Defines the from-currency for which historical exchange rates are returned.
to Defines the to-currency for which historical exchange rates are returned.
date Defines the date for which historical exchange rates are returned.
dateStart Defines the start date of the timeseries for which historical exchange rates are returned.
dateEnd Defines the end date of the timeseries for which historical exchange rates are returned.
period Defines the period, which determines the time points of the time series. Possible values: 'day' (default), 'week', 'month', 'year'
prettify If this parameter has the value 'yes', the JSON result will be reader-friendly formatted.
apiKey Your API key. Signup and get your key.


Examples

To get all exchange rates for a base currency for a historical date, make the following call:
http://jsonrates.com/historical/?
    base=USD
    &date=2014-06-23

And you will get the following result:
{
  "base": "USD",
  "rates": {
    "2014-06-23": {
      "utctime": "2014-06-23T23:50:03+02:00",
      "AED": "3.67320000",
      "AFN": "56.72000100",
      "ALL": "103.04000100",
      "AMD": "409.00000000",
      "ANG": "1.79000000",
      "AOA": "97.65000200",
      --- other historical rates ---
      "XPF": "88.30000300",
      "XPT": "0.00068600",
      "YER": "214.85499600",
      "ZAR": "10.58960000",
      "ZMW": "6.09000000",
      "ZWL": "322.35501100"
    }
  }
}
To get a historical timeseries of rates for two currencies, make the following call:
http://jsonrates.com/historical/?
    from=XBT
    &to=USD
    &dateStart=2014-06-23
    &dateEnd=2014-06-28

And you will get the following result:
{
  "from": "XBT",
  "to": "USD",
  "rates": {
    "2014-06-23": {
      "utctime": "2014-06-23T23:50:03+02:00",
      "rate": "585.60009370"
    },
    "2014-06-24": {
      "utctime": "2014-06-24T23:50:02+02:00",
      "rate": "583.90069017"
    },
    "2014-06-25": {
      "utctime": "2014-06-25T23:50:01+02:00",
      "rate": "564.45831758"
    },
    "2014-06-26": {
      "utctime": "2014-06-26T23:50:02+02:00",
      "rate": "570.98809490"
    },
    "2014-06-27": {
      "utctime": "2014-06-27T23:50:02+02:00",
      "rate": "582.10267127"
    },
    "2014-06-28": {
      "utctime": "2014-06-28T23:50:02+02:00",
      "rate": "596.43095715"
    }
  }
}