I'm not sure I understand your question. The strike nearest to the current nderlying is usually considered the "ATM Strike" (or the interpolation between the two nearnest). Are you saying that Yahoo data for the weeklies doesn't include all strikes? If that is the case you can access the list of strikes-for-expiries for a given symbol from the OCC with this call:Does anyone know of a good way to find the atm strike for a given expiration? Currently I download the option chain from yahoo finance ... However Yahoo option data is really unreliable for weeklys.
https://www.theocc.com/webapps/series-search?symbolType=U&symbol=AAPL
You'll get back an ascii file with a few lines of headers and the rest space delimited rows sorted by expiry, strike. It includes all strikes.
Even if you could point me to a good website to scrape off of. I wrote a scraper for NASDAQ but they index the option chain expirations with numbers 1:x rather than expiration date.
You can pretty easily match the NASDAQ index numbers to expiry dates. You need to do a regexp search for the following regular expresson:
'<div id="OptionsChain-dates" .*> <a .*>[JFMASOND][a-y]{2} [12][0-9]</a>'
A rest API would be ideal!
Ps. Does anyone have some hacks to scrape off of Barchart, it looks like they will not allow users to scrape data
There are still a few hidden rest API's for option chains; none as good as Barcharts free core-api used to be though. I will pm you on this, as Barchart closed off core-api access (put it behind proxies.barchart.com) due, I suspect, to low-post-count ET'ers over-using it. You can still get the barchart options chain json api to work but you have to send the right cookies and auth token along with the request, and since the auth token is generated by dynamically loaded javascript on the page and resets every 10 or so chain requests, you have to use Selenium (or, e.g. a custom coded version of ELinks) to repeatedly get the token -- tldr: not worth the effort anymore.
What's your yearly carrying cost on $1000? Your best choice is to open an account with a low-minimum, low activity requirement broker and use their API for pulling realtime option chains. TD, Tradier... a few others meet this criteria. TD rate limits you to 120 chain requests per minute, but that should be adequate for your purposes.