I thought Yahoo had stopped supporting stock exchange queries a year or so ago; 
at least,  my old gethtml (?) calls from J stopped working for me.  

Tom McGuire and Gilles Kirouac commented helpfully at the time,  Nov 26, 2019.

I eventually resorted to “Google sheets” and clunky copy n paste, as J sessions 
tended to crash with my attempted get-arounds.

Cheers,

Mike

Sent from my iPad

> On 5 Jan 2021, at 05:37, Devon McCormick <[email protected]> wrote:
> 
> This is not really a J question, but has anyone successfully figured out
> how to download something using https protocol?  It's actually more
> complicated than this.  If I want to get, say, the price and volume history
> for Tesla from Yahoo Finance, the "Download" command there generates a
> string like this:
> https://query1.finance.yahoo.com/v7/finance/download/TSLA?period1=1277769600&period2=1609718400&interval=1d&events=history&includeAdjustedClose=true
> 
> I used to be able to take this string and substitute into it to download
> not only prices for TSLA but any other stock on Yahoo Finance for which I
> knew the ticker.  Now this sort of thing fails when I use my former method
> which was just invoking "wget" via the "shell" command in J.  Instead I get
> an 800+ byte html file with error messages.  I think the switch to https
> from http is to blame but having a query string instead of a filename may
> also be an issue.
> 
> The "wget" method still works for http files like this (to get the famous
> iris data): shell 'wget -O iris.data
> http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data'.
> So, I suspect it's probably https that is to blame but I do not have a
> working example of submitting a query string using http so I cannot be
> completely sure other than I think this used to work.
> 
> Any suggestions for an automatable way to do this would be welcome.
> 
> Thanks,
> 
> Devon
> -- 
> 
> Devon McCormick, CFA
> 
> Quantitative Consultant
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to