Great tip, John. Thank you. Is there a way to get all the expiration dates in one page? Thanks again. Arturo
No, you have to loop through all the expiries. Call a simplified version of the URL: https://query1.finance.yahoo.com/v7/finance/options/APPL That gets you a json response with underlying info, a list of expiries and strikes, and the first expiries option chain. If you are using python get the expiry list like this: url = 'https://query1.finance.yahoo.com/v7/finance/option/AAPL' uConn = urllib2.urlopen(url) ii = uConn.readline() ii = demjson.decode(ii) uConn.close() uaExpiries = ii['optionChain']['result'][0]['expirationDates']
Sorry for being somewhat off-topic, but I would be interested also in getting the statistcs from this yahoo page: http://finance.yahoo.com/quote/AAPL/key-statistics?p=AAPL Is there any workaround also for retrieving these data? Thanks in advance. Arturo
Tip, here how one can convert from epoch on Linux: date -d @1469145600 or with a custom format: date -d @1469145600 +"%d-%m-%Y %T %z" get the current time in epoch: date +%s