Free Intraday Stock Data in Excel

You can choose the interval, the number of trading days, the ticker symbol and the exchange. The VBA is open, and not password protected – you can view, edit and learn from the code.

Many websites offers end-of-day historical quotes – this can often be downloaded into a spreadsheet via a programmable web API. The Bulk Stock Quote Downloader, for example, retrieves stock quotes from Yahoo Finance.

Intraday historical stock data is harder to find; you usually have to pay to find accurate data with no omissions. However, Google Finance offers an API that lets you download intraday backfill data in a CSV file.

This Excel spreadsheet employs this API to download intraday stock quotes for the past fifteen days. Just enter

One minor issue in the code is that data connections created by the .QueryTables.Add accumulate if not deleted. This has caused me problems in the past when thousands of old connections slowed everything down mysteriously.

Sir… can u provide with the code for automatic update after 1 min .. and also want to ask if its possible to get the data of two stocks in same excel or same page (that would b grt) since,, Im trying for the spread trading so I can plot the spread between two stocks for intraday buy sell signal…
Thanks do reply Im excited with this new strategy .. or any xpert who can help me with improvising this

Hi,
thanks for a great tool,
do you know if i will run a loop (under C#) and ask Google for many tickers info, let say 100 at a time, he may block me from his services ? do you think i need any sleep ?
thanks

Dear Samir:
This Excel Tool is so helpful. Thank you for sharing it online.
I had the same question as Simon mentioned, how can we get the historical data longer than 15 days?
Looking forward for your reply.

Mr. Kahn: this is awesome, even if Google drops support completely someday. Anyone who would write excel VBA to plot market profile TPO, VAH levels in Excel using tick or hi/lo on 1 minute from one/all of these sources might have him/herself a nice little business. Just sayin’

This is a great tool! thanks for sharing! Do you know if anything like this exists for intraday oil prices? I’ve been trying to find historic intraday data, and it’s proving to be a difficult task.
Thanks!

Thanks for the file Samir, this saved me a lot of time of having to write the code myself!

Anyway, when I downloaded it, the data was not downloading and so I delved into the code to find out why. A quick check found that the download url seems to have changed. If the code does not work for you, try changing the qurl code as shown below:

although good This was almost a solution for me but not exactly what i need for my purposes. I have been trying to find out if its possible to get all the intraday data from either google or yahoo finance for a single security i.e say the DOW. By this i mean every every tick change in price, instead of the OHLC for a 1 minute time frame. There must be a way to record this from the data stream using code or by downloading at the end of day to excell. Any ideas on how to do this?

HI , Im curious what it would take to persuade you to make a intra day quote downloader that could do more than 1 stock at a time.
Love your spreadsheets, thanks alot. I havent donated yet but I plan too.

can you please write a script for uploading some 50 scrips data from excel to metatrader after importing from google finance? I understand it might take your time, but I’d be willing to compensate if its reasonable. thanks.

Hey guys I am from South Africa and was struggling to get it to work with JSE (Johannesburg Stock Exchange) stocks – I think I worked it out… the code for the exchange info was left out in VBA. See below to put it in. hint: hit ALT F11 to open VBA from the spreadsheet 🙂
In VBA find this area and add in “&x=” & exchange & _ below the “q=” & ticker & _ line of code.
Eg:
qurl = “http://www.google.com/finance/getprices?” & _
“q=” & ticker & _
“&x=” & exchange & _
“&i=” & interval & _
“&p=” & numPastTradingDays & “d” & _
“&f=d,o,h,l,c,v”

Now you should be able to get stocks using your local exchange code, such as the JSE in my case.

Also, if you would like to add an auto-refresh function for the sheet, add this line Application.OnTime Now + TimeValue(“00:00:15”) above Application.ScreenUpdating = False
Eg: (near top of the module)