Skip to main content
24 events
when toggle format what by license comment
Nov 10, 2016 at 14:04 comment added Rod @JonathanKinlay, Im having the same problem. Maybe there was some changes at the YQL server side, as the query seems to be broken somehow...
Nov 7, 2016 at 7:34 comment added Jonathan Kinlay This no longer appears to work. For example: acquireOptions["MSFT", "2016-11", "C"] // TableForm produces FetchURL::httperr: The request to URL query.yahooapis.com/v1/public/yql?q=SELECT%20‌​*%20FROM% 20yahoo.finance.option_chain%20WHERE%20symbol%3D'MSFT'%20AND%20expiration%3D'2016-11'%20and%20type%3D'C'&format=json&diagnostics=true&env=http%3A%2F%2Fdatatables.‌​ org%2Falltables.env&callback= was not successful. The server returned the HTTP status code 400 ("Bad Request").
Jul 4, 2013 at 17:38 comment added Rod That's true... sometimes tickers like GOOG and APPL return no values. However, it works almost all the time for other tickers, like JPM, XOM, PBR, MSFT, VALE, etc... It might also depend upon the stock exchange where the stock is traded, once NYSE tickers work almost all the time while NASDAQ tickers don't...
Jul 4, 2013 at 17:34 comment added C. E. Works sometimes and sometimes not (400 bad request or 505). I think it's on their end. When I built a stock trading platform for a competition with fictional money I used the .csv API I'm talking about in the last paragraph because YQL proved itself to be unreliable, sometimes being down for hours (one can read about this on other forums, it's well known). However, I would expect it to mostly work. Maybe tomorrow it'll work the whole day for example. It worked all morning.
S Jul 4, 2013 at 16:00 history suggested Rod CC BY-SA 3.0
Code correction.
Jul 4, 2013 at 15:32 comment added Rod Please try the code I've put in the edit.
Jul 4, 2013 at 15:32 review Suggested edits
S Jul 4, 2013 at 16:00
Jul 4, 2013 at 15:19 history edited C. E. CC BY-SA 3.0
added 34 characters in body
Jul 4, 2013 at 15:18 comment added Rod If you want I can edit your post to put the correct code...
Jul 4, 2013 at 15:17 comment added C. E. Let's hope it works for most people, I get a weird HTTP 505 error. I will look more at that later. Thanks a lot for the help, I always stumble at the very end and it makes me so angry.
Jul 4, 2013 at 15:11 comment added Rod Yes, now the code is working perfectly for all stocks...
Jul 4, 2013 at 15:10 comment added C. E. @RodLm Does that work for you? I'm still having problems, of a different kind though. But try for example YHOO or AAPL or GOOG.
Jul 4, 2013 at 15:05 comment added Rod This is easy to solve... just replace the first Import[] by Import["http://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%\ 20yahoo.finance.option_chain%20WHERE%20symbol%3D'" <> stock <> "'%20AND%20expiration%3D'" <> expiration <> "'%20and%20type%3D'" <> type <> "'&format=json&diagnostics=true&env=http%3A%2F%2Fdatatables.\ org%2Falltables.env&callback=", "JSON"].
Jul 4, 2013 at 14:56 comment added Rod There is another error in your code. Please see that inside the first Import[] the ticker MSFT is fixed! So everytime you look for the options chain of any symbol you get it only for MSFT!
Jul 4, 2013 at 14:26 comment added C. E. @RodLm Thanks for pointing that out, fixed it!
Jul 4, 2013 at 14:23 history edited C. E. CC BY-SA 3.0
deleted 14 characters in body
Jul 4, 2013 at 12:37 comment added Rod Your code is (somehow) not working for me... there is an undefined part of the code (optionsList) which returns an error message for me... Am I forgetting something?
Jul 4, 2013 at 11:26 history edited C. E. CC BY-SA 3.0
added 584 characters in body
Jul 4, 2013 at 11:04 history edited C. E. CC BY-SA 3.0
deleted 7 characters in body
Jul 4, 2013 at 7:57 history edited C. E. CC BY-SA 3.0
deleted 117 characters in body
Jul 4, 2013 at 7:49 history edited C. E. CC BY-SA 3.0
added 441 characters in body
Jul 4, 2013 at 7:41 history edited C. E. CC BY-SA 3.0
added 441 characters in body
Jul 4, 2013 at 7:27 history edited C. E. CC BY-SA 3.0
added 441 characters in body
Jul 4, 2013 at 7:18 history answered C. E. CC BY-SA 3.0