3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Yahoo has changed their protocol
[Re: jcl]
#465979
05/19/17 08:26
05/19/17 08:26
|
Joined: Jul 2000
Posts: 27,986 Frankfurt
jcl
OP
Chief Engineer
|
OP
Chief Engineer
Joined: Jul 2000
Posts: 27,986
Frankfurt
|
Not for stocks, but for ETFs. But we'll try to find an alternative solution. Here's a modified Google download script that does not crash anymore when an asset is not found:
void main()
{
int N = assetList("AssetsZ8");
while(--N >= 0)
{
string URL = strf("https://www.google.com/finance/historical?q=%s&startdate=01-Jan-2000&output=csv",Assets[N]);
string Content = http_transfer(URL,0);
if(!Content) continue;
file_write("History\\history.csv",Content,0);
dataNew(1,0,7);
if(!dataParse(1,"%d-%b-%y,f3,f1,f2,f4,f6","History\\history.csv"))
continue;
printf(" %s",Assets[N]);
dataSave(1,strf("History\\%s.t6",Assets[N]));
}
}
|
|
|
Re: Yahoo has changed their protocol
[Re: hatten]
#466011
05/20/17 00:58
05/20/17 00:58
|
Joined: Apr 2014
Posts: 482 Sydney, Australia
boatman
Senior Member
|
Senior Member
Joined: Apr 2014
Posts: 482
Sydney, Australia
|
For anyone using the quantmod library in R, Joshua Ulrich (the package's author) released a workaround that you can get by updating quantmod to the development version. In R, do either: remotes::install_github("joshuaulrich/quantmod", ref="157_yahoo_502") or devtools::install_github("joshuaulrich/quantmod", ref="157_yahoo_502") More info on the GitHub page: https://github.com/joshuaulrich/quantmod/issues/157This works for me. I was able to successfully use quantmod::getSymbols() to query the Yahoo API.
|
|
|
Re: Yahoo has changed their protocol
[Re: boatman]
#466015
05/20/17 19:52
05/20/17 19:52
|
Joined: Dec 2013
Posts: 568 Fuerth, DE
Sphin
User
|
User
Joined: Dec 2013
Posts: 568
Fuerth, DE
|
I search for a Yahoo API substitute also for another reason than Zorro and I stumbled upon a site, I don't know really what to think of it. alphavantage.co offers free (you can apply a free API key) intraday, daily, weekly and monthly prices for US stock, ETFs etc. Their history e.g. of TLT goes back to 2002, of SPY back to 2001. The output format is JSON but this is to handle I guess. I did not verify the quality of their prices so far. They declare their aim as "democratizing access to institution-grade financial analytics" but they have no address or company name on their site and even the domain name alphavantage.co is registered by an agent it seems. The IP address 216.239.36.21 of their server belongs to a Google net block. As said, I don't know how reputable they are.
|
|
|
Re: Yahoo has changed their protocol
[Re: Sphin]
#466049
05/23/17 03:29
05/23/17 03:29
|
Joined: Jan 2017
Posts: 64
Jeff1228
Junior Member
|
Junior Member
Joined: Jan 2017
Posts: 64
|
|
|
|
Re: Yahoo has changed their protocol
[Re: Jeff1228]
#466097
05/24/17 18:13
05/24/17 18:13
|
Joined: Dec 2013
Posts: 568 Fuerth, DE
Sphin
User
|
User
Joined: Dec 2013
Posts: 568
Fuerth, DE
|
Also an elegant solution by Ed0906. Following are code snippets of his approach. It works for now, the question is how long ...
|
|
|
|