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.
hi @liuyigh, is your code in https://github.com/liuyigh/FinanceScripts ?
@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.
@liuyigh That was helpful, thanks!
Noted at https://github.com/rsvp/fecon235/issues/7#issuecomment-342568193
Also getting this issue.
Why not IEX? Doesn't require API key registration: https://iextrading.com/developer/docs/#getting-started
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)
https://finance.google.com/finance/historical?q=SPY&startdate=2017/01/01&enddate=2017/05/22&output=csv
Try this out with pandas read from url
That's great and working!!!
@VicTangg in your file, it looks like there are date missing. See what I'm saying? Do you know why that is?
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
@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.
@ritviknv Please be aware that stocks markets close on weekends and public holidays. 馃憤
@paintdog Did you try pandas read_csv? I think it works fine as well.
@VicTangg wow i'm so dumb. thanks for catching.
@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!?
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!
@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
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.
IEX: Is it possible to get historical data (dataset) or only the last prices from IEX?
Yahoo has been deprecated.