For End-of-Day data API we cover all US stocks, ETFs, and Mutual Funds (more than 120 000 in total) from the beginning, for example, the Ford Motors data is from June 1972. Other stock exchanges we cover mostly from Jan 3, 2000. We do provide daily, weekly and monthly data raw and adjusted to splits and dividends.

Quick Start

To get historical stock price data to use the following URL:

View
https://eodhistoricaldata.com/api/eod/MCD.US?api_token={your_api_key}
  • MCD.US consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID}, then you can use, for example, MCD.MX for Mexican Stock Exchange. or MCD.US for NYSE. Check the list of supported exchanges to get more information about stock markets we do support.
  • api_token – your own API KEY, which you will get after you subscribe to our services.
  • fmt – the output format. Possible values are ‘csv’ for CSV output and ‘json’ for JSON output. Default value: ‘csv’.
  • period – use ‘d’ for daily, ‘w’ for weekly, ‘m’ for monthly prices. By default, daily prices will be shown.
  • order – use ‘a’ for ascending dates (from old to new), ‘d’ for descending dates (from new to old). By default, dates are shown in ascending order.
  • from and to – the format is ‘YYYY-MM-DD’. If you need data from Jan 5, 2017, to Feb 10, 2017, you should use from=2017-01-05 and to=2017-02-10.

Register & Get Data

For testing purposes you can try the following API Key (works only for MCD.US ticker):  OeAFFmMliFG5orCUuwAKQ8l4WWFQ67YX:

https://eodhistoricaldata.com/api/eod/MCD.US?api_token=OeAFFmMliFG5orCUuwAKQ8l4WWFQ67YX&period=d

As a result, you will get the following data in CSV format:

Historical EOD API

Please note, that OHLC we provide in raw adjusted neither to splits nor to dividends, while adjusted closes are adjusted to both splits and dividends. If you need OHLC adjusted only to splits then it’s better to use our Technical API with the ‘function=spliadjusted’ parameter.

Daily Updates API

For daily updates your end of day data we recommend a special Bulk API for EOD, Splits and Dividends. With this API you will be able to download the data for particular day for the entire exchange in seconds. Even to download the entire US exchange with more than 45,000 active tickers, you will need 1 API request and 5-10 seconds.

Stock Prices Data API with Dates Support

We support two formats for historical data dates.

EOD Historical Data

Here you can use ‘from’ and ‘to’ parameters with format ‘YYYY-MM-DD’. For example, if you need to get data only from Jan 5, 2017 to Feb 10, 2017, you need to use from=2017-01-05 and to=2017-02-10. Then the final URL will be:

View
https://eodhistoricaldata.com/api/eod/MCD.US?from=2020-01-05&to=2020-02-10&period=d&api_token={your_api_key}

Filter fields. WEBSERVICE and YAHOO Support

We also support ‘=WEBSERVICE’ Excel function, to get only last value, just add ‘filter=last_close’ or ‘filter=last_volume’ with ‘fmt=json’ and you will get only one number which perfectly works with WEBSERVICE function. For example, with this URL:

View
https://eodhistoricaldata.com/api/eod/MCD.US?fmt=json&filter=last_close&api_token={your_api_key}

You will get one value – the last price for MCD.

Yahoo Finance API Support

To support clients who used Yahoo Finance non-official API which doesn’t work now (URL: ichart.finance.yahoo.com), we also support yahoo-style for dates. Here there will be 6 parameters.

  • First of all, for yahoo-style you need to use another endpoint:
  • https://eodhistoricaldata.com/api/table.csv.
  • For symbol you should use s, then for MCD it will be: s=MCD.US.
  • For ‘from date’ you should use a, b, c for month, day, year. Then 2017-01-05 will be: a=00, b=05, c=2017.
  • For ‘to date’ you should use d, e, f for month, day, year. Then 2017-02-10 will be: d=01, e=10, f=2017.
  • Please note, that in Yahoo! Finance API first months is 0 and last month (December) is 11. Then you need to substract 1 from months.
  • For ‘period’ you should use g. Possible values are d for daily, w for weekly and m for montly.

BE CAREFUL, date used here in American notation: MONTH, DAY, YEAR.

And the final URL will be:

View
https://eodhistoricaldata.com/api/table.csv?s=MCD.US&a=05&b=01&c=2017&d=10&e=02&f=2017&g=d&api_token={your_api_key}

We hope it will be very useful for you.

JSON Output Support

We support JSON output as well if you need it for your PHP, Python, Java, or Perl applications. All you need is to add a special parameter: “fmt=json” to your query, then the final query will be:

View
https://eodhistoricaldata.com/api/eod/MCD.US?from=2017-01-05&to=2017-02-10&period=d&fmt=json&api_token={your_api_key}
EOD Historical Data JSON Output

JSON output doesn’t work for Yahoo-like style.

We have API limits 100 000 requests per day. Each symbol request costs 1 API call.

Register & Get Data