Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_quote_yahoo and get_quote_google no longer work since Nov 1 #418

Closed
liuyigh opened this issue Nov 7, 2017 · 22 comments
Closed

get_quote_yahoo and get_quote_google no longer work since Nov 1 #418

liuyigh opened this issue Nov 7, 2017 · 22 comments

Comments

@liuyigh
Copy link

liuyigh commented Nov 7, 2017

A few months ago, we had a crisis over historical price from Yahoo. It was fixed in 0.5.0 release. Now get_quote_yahoo is the new victim:

In [1] web.get_quote_yahoo('DVAX')
RemoteDataError: Unable to read URL: http://finance.yahoo.com/d/quotes.csv?s=DVAX&f=sl1p2rt1s7

In [2] web.get_quote_google('DVAX')
RemoteDataError: Unable to read URL: http://www.google.com/finance/info?q=DVAX

I understand the get_quote_yahoo function is experimental. But It would be nice if we can fix it.

I switched to BarChart free api for quotes for now.

@liuyigh liuyigh changed the title get_quote_yahoo and get_quote_google no longer works since Nov 1 get_quote_yahoo and get_quote_google no longer work since Nov 1 Nov 7, 2017
@rsvp
Copy link

rsvp commented Nov 7, 2017

TODO

  • Barchart API, {JSON, CSV} -> Python pandas DataFrame
    • inclusion into pandas-datareader

hi @liuyigh, is your code in https://github.com/liuyigh/FinanceScripts ?

@liuyigh
Copy link
Author

liuyigh commented Nov 8, 2017

@rsvp hi, it is not. I am using BarChart http api in json format. I didn't bother to use its Python module. It is pretty simple:

import json, requests
quote = json.loads(requests.get('http://marketdata.websol.barchart.com/getQuote.json?apikey=<api_key>&symbols={}'.format(tic)).text)['results'][0]

Replace <api_key> with your own key.

@rsvp
Copy link

rsvp commented Nov 8, 2017

@liuyigh That was helpful, thanks!
Noted at rsvp/fecon235#7 (comment)

@bitdelivery
Copy link

Also getting this issue.

@lockefox
Copy link

Why not IEX? Doesn't require API key registration: https://iextrading.com/developer/docs/#getting-started

@paintdog
Copy link

At the moment it works for me and pandas_datareader does a great job. Does we still have a problem?

import pandas_datareader.data as web
import datetime

start = datetime.datetime(2017, 1, 1)
end = datetime.date.today()

google = False

if google:
    f = web.DataReader("ETR:SIE", 'google', start, end)
else:
    f = web.DataReader("SIE.DE", 'yahoo', start, end)

print(f.Close)

@VicTangg
Copy link

@paintdog
Copy link

That's great and working!!!

@ritviknv
Copy link

@VicTangg in your file, it looks like there are date missing. See what I'm saying? Do you know why that is?

@paintdog
Copy link

Look at this url:

https://finance.google.com/finance/historical?q=ETR:DAI&startdate=2000/01/01&enddate=2017/12/22&output=csv

This looks really fine (!!!). I think that google still support the csv download.

How can we correct pandas datareader to get Google data again? I hope that someone at pydata can fix the bug. Where do we stand at the moment? My local pandas installation does not work anymore.

(...)
pandas_datareader._utils.RemoteDataError: Unable to read URL: http://www.google.com/finance/historical?q=ETR%3ASIE&startdate=Jan+01%2C+2000&enddate=Dec+22%2C+2017&output=csv

@ritviknv
Copy link

@paintdog I'm a little confused by your post. I look at the google URL you provided but it's still missing dates, somewhat randomly in between...like the dates between nov 17th 2017 and nov 20th 2017 are missing. I'm not sure why this is the case. I need to keep digging around because I think it's a pandas issue.

@VicTangg
Copy link

@ritviknv Please be aware that stocks markets close on weekends and public holidays. 👍

@VicTangg
Copy link

@paintdog Did you try pandas read_csv? I think it works fine as well.

@ritviknv
Copy link

@VicTangg wow i'm so dumb. thanks for catching.

@paintdog
Copy link

@VicTangg : I'm unsure what you mean. Could you provide a snipplet of code, please?
I expect that I can use pandas datareader to get the data from google. I believe that many people use this way to grab the data from google and would have to fix a lot of software if this does not work anymore because pandas stops supporting this source. I don't understand if pandas or pydata is going to fix this probably small issue!?

@paintdog
Copy link

paintdog commented Dec 24, 2017

I just installed the last version of pandas-datareader from this repository and it works fine with yahoo and google! Google and Yahoo seem to deliver actual values for several years if you give the right parameters to the functions.

Can we close this issue or are there any other problems I don't know!?

Merry Christmas to you all!

@liuyigh
Copy link
Author

liuyigh commented Dec 25, 2017

@paintdog how did you "installed the last version of pandas-datareader from this repository"? Would you please elaborate?

0.5.0 (the latest release) is till showing the same error for get_quote_yahoo

@paintdog
Copy link

I tested it yesterday on my laptop and it worked both!? I don't use the quote-function. I used my source code showed above (web.DataReader("SIE.DE", 'yahoo', start, end)). On my computer I've some trouble with pandas datareader but I hope to solve it soon.

@addisonlynch
Copy link
Contributor

addisonlynch commented Jan 2, 2018

Would recommend IEX as an alternative. Similar python wrapper available here. Will be working on Datareader integration if that's a possibility.

@paintdog
Copy link

paintdog commented Jan 2, 2018

IEX: Is it possible to get historical data (dataset) or only the last prices from IEX?

@addisonlynch
Copy link
Contributor

@paintdog Yes. Historical prices available through the chart endpoint, dividends through the dividends endpoint.

@bashtage
Copy link
Contributor

Yahoo has been deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants