6

I can get daily data easily using this link:

https://www.google.com/finance/getprices?q=LHA&x=ETR&i=60&p=1d&f=d,c,h,l,o,v

But when I try to change "1d" to "1y" I still get 1 day's data.

I am trying to get 2 years' worth.

Is there a way to do this? yahoo or bing finance would be fine too.

ManInMoon
  • 6,795
  • 15
  • 70
  • 133
  • Here is the python code to get the data http://trading.cheno.net/downloading-google-intraday-historical-data-with-python/ – arulraj.net Aug 03 '15 at 05:52

4 Answers4

9

You need to use '1Y', not '1y' on your query to get a time period stretching back 1 year. However, you will also need to change the granularity of your query, as minute data is only available for the previous 5 days.

This query will provide you with minute data for the previous 5 days.

https://www.google.com/finance/getprices?q=LHA&x=ETR&i=60&p=5d&f=d,c,h,l,o,v

The following query will provide you with the last two years of prices at the close.

https://www.google.com/finance/getprices?q=LHA&x=ETR&i=86400&p=2Y&f=d,c,h,l,o,v

Conor Svensson
  • 1,151
  • 11
  • 17
9

google API "getprices" is NO more fetching intraday data of any interval (say 1 minute or 5 minute or 60 minutes .....). It is now fetching data in 1 day interval only irrespective of interval set.

R BHANJA
  • 91
  • 1
  • 2
  • 1
    Yes. In previous, we have got full minute ticker data. But now we will get only 1-day interval data as the daily summary :(. Any other api is there for get full minute ticker data? – Syam Kumar Oct 26 '17 at 07:32
1

I tried getting intraday data before, the furthest back I can get is 15 days, i.e. 15d Using 2w or 1y did not work for me.

references: http://www.mathworks.com/matlabcentral/fileexchange/32745-get-intraday-stock-price/content/getHistoricalIntraDayStockPrice.m http://www.codeproject.com/Articles/221952/Simple-Csharp-DLL-to-download-data-from-Google-Fin

pangyuteng
  • 1,749
  • 14
  • 29
1

Update [2020] Google and Yahoo deprecated their APIs so only direct website access works. However, the max resolution you can get is 1 day (end-of-day).

For historical high-resolution data Tickdata.com is a good source for tick-level data.

If 1-min bars are sufficient FirstRateData.com has 1-min data for most stocks and fx going back 20 years.

Judo
  • 5,167
  • 3
  • 24
  • 34