Skip to content

Save option chain to Pandas DataFrame on disk#23

Closed
rcapozzi wants to merge 6 commits intotastyware:mainfrom
rcapozzi:option-chain
Closed

Save option chain to Pandas DataFrame on disk#23
rcapozzi wants to merge 6 commits intotastyware:mainfrom
rcapozzi:option-chain

Conversation

@rcapozzi
Copy link
Copy Markdown
Contributor

This feature branch adds the ability of a user to save a chain to disk. The current program only prints option chain to the console. The ideal use case is to run this every X minutes to collect chain information over time. Another process can consume this data for visualization.

The changes include:

  1. refactoring the option chain process to separate the data collection from the data presentment;
  2. Creating a data frame from the option chain;
  3. Saving the data frame to a parquet file. This function updated the file if it already exists. It also ensures new trade have occurred since the previous update; and
  4. Exposing the chaindf sub command to the command line.

If you are not into feature creep, then nix this request. The option chain quote could be a nice add to the Tastytrade API.

@Graeme22
Copy link
Copy Markdown
Member

Hi @rcapozzi! This seems a bit outside the scope of the CLI. If you want to do this for personal use, I recommend just using the SDK directly.

@Graeme22 Graeme22 closed this Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants