1
votes

Using the YQL console I did:

select * from yahoo.finance.options where symbol="FB"

but I got the following result in JSON. There is no data in the optionsChain. Based on other posts I believe the request to be formatted correctly. How do I get the data that should be in the options chain? Is this out of date or am I missing something? Thanks in advance.

{
  "query": {
  "count": 1,
  "created": "2015-01-10T17:26:16Z",
  "lang": "en-US",
  "diagnostics": {
  "url": [
    {
     "execution-start-time": "0",
     "execution-stop-time": "71",
     "execution-time": "71",
     "content": "http://www.datatables.org/yahoo/finance/yahoo.finance.options.xml"
    },
    {
     "execution-start-time": "74",
     "execution-stop-time": "1620",
     "execution-time": "1546",
     "content": "http://finance.yahoo.com/q/op?s=FB"
    }
   ],
   "publiclyCallable": "true",
   "log": [
   "results.length(): 0",
   "no elements"
   ],
   "javascript": {
   "execution-start-time": "74",
   "execution-stop-time": "1647",
   "execution-time": "1573",
   "instructions-used": "11272",
   "table-name": "yahoo.finance.options"
  },
  "user-time": "1648",
  "service-time": "1537",
  "build-version": "0.2.278"
 },
 "results": {
  "optionsChain": {
   "symbol": "FB"
  }
 }
}
}
1
I got empty optionChains too. Not sure if Yahoo still supports this. - CodeBrew

1 Answers

0
votes

Lots of people having problems with this myself included.

After looking around I found out that Google's Option information is also available via JSON.

It's no good for production environments as it's unsupported and really just a function of how there site operates, but if your interested I did a tutorial with full sample code on it. Even better it's REST based so can be consumed fairly easily in any language. Google Stock Option Chain Data