How Do I Automate Exporting Options Chains Into CSV Files?

ArtOfSunTzu

ArtOfSunTzu

New member
Hi,

How do I use a script/api/record-keys/etc. to automatically export, current, options chains data for all strikes for stocks in my watchlist?

For example, I know how to export options manually by using the menus. I'd like to initiate an automated way to export options chains into a .CSV file. Is ThinkScript the way to go? (how?). Is keystroke recording the better option? Or an API?

I don't need a link to real-time updates. Simply a .CSV snapshot of current options data for a particular stock.

Ideally, I'd like the automated method to export an individual file for each stock in a watchlist.

I appreciate any help pointing me in the right direction.

Mahalo.
20 years investment experience. Previous day trader and options broker.
6 months on ThinkOrSwim. Trading style: 1 week-to-expiry credit options diagonals.
Experienced coder but new to ThinkScript.
 
C

codydog

Active member
You can take a snapshot or export to excel and have excel do whatever you want.

What are you trying to do with the data?
 
ArtOfSunTzu

ArtOfSunTzu

New member
Thank you for allowing me to clarify:

I am able to manually export data into CSV's using menus, currently. I'm trying to get away from manual exporting.

I'm seeking a way to run a script/api/etc. that will... automatically... pull-up current options data for tickers... and then export the data into CSV files ... without me having to manually mouse-click the export function from the menu for each options chain.

The goal for the script is as follows:
  1. the script cycles through a list of tickers (maybe from the watchlist or a hard-coded list)
  2. the script then pulls-up the current options chain for each ticker
  3. the script then exports the ticker's options chain into separate CSV files (one file for each ticker)
  4. so that at the end of the script I have a folder of options-data CSV files for each ticker
I hope my reply makes sense. :)
 
C

codydog

Active member
@ArtOfSunTzu - Interesting idea, have you seen this done elsewhere?
 
ArtOfSunTzu

ArtOfSunTzu

New member
Not off-the-shelf. But I've coded it to work for some platforms in the past... sometimes using their back-engine script, sometimes API's, sometimes just plain timed keystroke recording. I was hoping that ThinkScript was something like Excel's use of VBA.
 
C

codydog

Active member
@ArtOfSunTzu - My experience is that tos throttles very quickly when you try and grab large options data series.

Maybe try thinkscripter's website or if your budget allows, bloomberg?
 

Similar threads

Top