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.

LIVE API Excel WEBSERVICE support

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

https://eodhistoricaldata.com/api/real-time/AAPL.US?api_token=OeAFFmMliFG5orCUuwAKQ8l4WWFQ67YX&fmt=json&filter=close

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

=WEBSERVICE(https://eodhistoricaldata.com/api/real-time/AAPL.US?api_token=OeAFFmMliFG5orCUuwAKQ8l4WWFQ67YX&fmt=json&filter=close)

Subscribe to API

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