Excel VBA Stock API

Excel VBA Stock API Bulk Download

Here you can find an Excel VBA script for multiple (bulk) downloads: vba-multiple-download.xlsm. It’s easy to test and use, you just need to do the following two things:

  • Change the TEST API KEY to your own API KEY, since the test API Key will work only with AAPL.US
  • Add stocks you want to download.

Subscribe to API

Excel VBA Historical prices bulk download

That’s easy!

Excel VBA Stock API Add-In

We created Excel VBA example that works with our API. You can easily download an example of XLS-file and read our instructions below. It’s really easy to use it:

VBA Example for downloading EOD Historical Data

For accessing our API you can use our defined function “=EODSymbolData(Symbol, From_Date, To_Date)”. It’s easy, like you use other functions “=SUM(…)” or “=AVERAGE(…)”

If you open the file you will need to change your API Key in the ‘config’ sheet. The current key works only with AAPL.US:

To see the code, you just type ALT+F11 and open VBA Module ‘EODHistoricalData’ to check function:

Excel VBA Modules EOD Historical Data

Just download our XLS-file example for getting EOD Historical Data via API and check source to create your own spreadsheet.

Also check our article How to Migrate from Yahoo Finance API.


If you need only one field, any one field, just use ‘filter=FIELDNAME’ parameter. For examples, if you use the following URL:


Then only one number will be returned: 172.5. Which is very useful for Excel WEBSERVICE function like this:


Subscribe to API

In case if you have more questions and need help, send us email to support@eodhistoricaldata.com.


  1. Puneet

    How can I get the API for different stocks? You have demonstrated it only for Apple.

  2. Elliot

    How do you get prices throughout the day? Also, dividend/share? Preferably for Excel for Mac 2016 or Windows 10

  3. Pingback: Excel VBA Bulk Example — API Documentation for EOD Historical Data

  4. Ray

    Hi, is there any way to display the price data in reverse order with the latest price at the top?

    1. EOD Historical Data Support Article Author

      Yes, it’s possible, just use the following instructions:

      Parameter: “order” – use ‘a’ for ascending dates (from old to new) and ‘d’ for descending dates (from new to old). By default dates are in ascending order.