Author |
Topic: Option-Chain? (6 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
MMuhammad80 Posts: 7 Joined: Feb 25, 2010 |
I want to retrieve (subscribe to) prices for S&P-EMini Options.
E.g. for OESJ0 C1170. For the underlying future ESM0 one simply calls either SubScribeBars() and gets the message OnBarsReceived() back. Or SubScribeTicks() with OnTicksReceived(). When calling SubScribe() with the contract "OESJ0 C1170" when gets the corresponding message back too, but bars[] or ticks is empty. There are Option-Ticks available. Live-Trade and also eSignal reports current ticks. I have not found something like an OptionsChain() method. What is the correct method to retrieve Index-Futures Option-Prices? Note: The API-documentation has some potential for improvement. Its some sort of reverse engineering to implement the API. Muhammad Ali |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Hello,
We are not providing historical data for options. To get options chain, you need to call RequestContracts for OES base contract. As soon as you rececieve the response, the underlying contract ("ESM0") will contain option chain in the property Contract.Options. To get any prices you need to use Subscribe(contract) method. |
||||
MErshov1302 Posts: 4 Joined: Aug 05, 2021 |
Hello, I tried something similar (subscribe for greeks of the option) on the demo API account
so I set Client.Options.VolatilitySource = Api.Options.OptionVolatilitySource.Client; then subscribed on greeks (slightly modifying GF Advanced Example) protected override void PrepareControlEventHandlers() ... public void ChartSelectedContractChangedEventHandler(IContract contract) Please help me to figure out, is its limitation of the demo account or should do something additional to receive greeks? Also, may I ask whether if "GF.Api.Contracts.Volatility" related to options? Or it's not a something-related option Implied Volatility (IV)? |
||||
MErshov1302 Posts: 4 Joined: Aug 05, 2021 |
The problem is that
private void OnGreeksChanges(IGFClient client, GreeksChangedEventArgs e) never called. And volatility event handlers supplying some strange values, that doesn't look like an option's Implied Volatility |
||||
MErshov1302 Posts: 4 Joined: Aug 05, 2021 |
I'm sorry, I wanted to post my question into another topic
https://apisupport.gainfutures.com/Topic/Index/1357 |
||||
MErshov1302 Posts: 4 Joined: Aug 05, 2021 |
It seems I should subscribe to price changes of underlying future
Client.Subscriptions.Price.Subscribe(cbSymbol.SelectedContract.ID); And then I will receive GreeksChanged often because future price often changes. Or I can subscribe to price changes of the option itself Client.Subscriptions.Price.Subscribe(cbSymbol.SelectedContract.ID); but the price usually changes rare, so I will receive updates...sometime. |
||||