We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is it possible to get a real time options chain on something like NDX?
The text was updated successfully, but these errors were encountered:
here's the basics
IBClient client = new IBClient(); try { client.Connect("127.0.0.1", 4001, 2); client..ContractDetails += c_ContractDetails; Contract e = new Contract("MSFT", "SMART", SecurityType.Option, "USD"); client.RequestContractDetails(1001, e); Console.WriteLine("Hit [Enter] to quit."); while(Console.ReadKey().Key != ConsoleKey.Enter) { System.Threading.Thread.Sleep(500); } Console.ReadLine(); } finally { client.Disconnect(); } ... void c_ContractDetails(object sender, ContractDetailsEventArgs e) { string desc = "Security Type Not Supported. See onContractDetails."; switch(e.ContractDetails.Summary.SecurityType) { case SecurityType.Option: Contract o = e.ContractDetails.Summary; desc = string.Format("Option for {0}, Id: {1}, Right{2}, Expiry:{3}, Strike:{4}", e.ContractDetails.Summary.Symbol, o.ContractId, o.Right, o.Expiry, o.Strike); break; case SecurityType.Stock: Contract eq = e.ContractDetails.Summary; desc = string.Format("Equity {0}, Id:{1}", eq.Symbol, eq.ContractId); break; } Console.WriteLine(desc); }
Sorry, something went wrong.
No branches or pull requests
Is it possible to get a real time options chain on something like NDX?
The text was updated successfully, but these errors were encountered: