Pandas-datareader: Google Finance

Created on 17 Jul 2018  路  8Comments  路  Source: pydata/pandas-datareader

As far as I understand, the Google Finance API is currently not supported. However, it seems that other projects such as
https://github.com/pdevty/googlefinance-client-python

are obtaining historical data from Google using the following URL:
https://finance.google.com/finance/getprices

Is there a reason why we can not do the same?

Most helpful comment

I started writing some code and should have a PR later today.

All 8 comments

hi @vnmabus The last URL leads to a blank page.
Is it just a stem for something intended to be more specific?

I think you are supposed to pass query parameters in order to download the data, as it is done in the mentioned project, using the requests module. I have tried doing that and it worked.

Is this Google API documented anywhere? Haven't been able to find it.

Rather than taking start/end dates it seems only to take an argument for how many days/month/years of history to provide. And it provides data at frequencies of up to a minute. This would require quite a few changes to the _DailyBaseReader class.

Some example calls:

@stoffprof I couldn't find the documentation either, but the googlefinance client python package does indeed work for me per their simple usage example. Was able to obtain daily OHLC + vol for the examples provided. @vnmabus, are you aware of any documentation available from Google?

We wouldn't need to change _DailyBaseReader directly, but rather rewrite the GoogleDailyReader class (currently deprecated) which overrides the necessary base class methods.

It seems the pydata guys don't like additions without provider documentation, but given the high usage of this particular reader, it may be a good idea to re-implement google using this endpoint if the data seems reliable.

I started writing some code and should have a PR later today.

@stoffprof I'm happy to help if you need anything. Just saw your email

This URL doesn't seem to work any longer. Is there some data that Google provided that isn't in Yahoo or another source already? We can add some other source if needed.

As of v0.7.0 Google finance and Morningstar have been immediately deprecated due to large changes in their API and no stable replacement.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

walsha2 picture walsha2  路  5Comments

paintdog picture paintdog  路  7Comments

nithints picture nithints  路  7Comments

tr4cefl0w picture tr4cefl0w  路  3Comments

waswaswas10 picture waswaswas10  路  7Comments