Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to retreive historical Option Data in C# #20

Open
jackpotcityco opened this issue Feb 21, 2020 · 0 comments
Open

How to retreive historical Option Data in C# #20

jackpotcityco opened this issue Feb 21, 2020 · 0 comments

Comments

@jackpotcityco
Copy link

jackpotcityco commented Feb 21, 2020

Hello!

I am trying to understand how I get retreive historical option chain data and how found this code in one example.

But this C# code does not compile. I am trying to use this code in the terminal here:
https://www.quantconnect.com/terminal/#

option = qb.AddOption("SPY", Resolution.Minute)
option.SetFilter(-2, 2, timedelta(0), timedelta(20))
option_history = qb.GetOptionHistory(option.Symbol, datetime(2017, 1, 4, 10 ,0, 0), datetime(2017, 1, 4, 10 ,5, 0),sort = True)
df = option_history.GetAllData()
print(df.tail())

Is it possible to know how to write a code that is complete including the correct classes etc that prints out the requested optionHistory Data. That would be so greatful as I can't find such example?

Kind Regards

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

No branches or pull requests

1 participant