I am trying to price an options chain to get the standard things back, such as underlying price, implied volatility etc.
I'm a programmer by trade and don't know a whole lot about trading. I am making this for someone else to use.
So I have my main call
This works fine to get the options chain. Now what I want to know is in the EWrapperImpl.cs is there a sane way to price the options without opening up 100+ realtime connections. I just need the prices in a loop, not a realtime connection.
The goal of this is to filter the options chain down to a few lines that meet our criteria.. so I just need the current information, not a persistent connection.
Here is what I have in the loop now
However this errors out, which I assume is due to having too many connections open.
I'm just not sure I am approaching the problem in the correct way. Viewing the options chain w/ pricing seems to be a pretty common view in trading applications, so what are the best practices here.
I'm a programmer by trade and don't know a whole lot about trading. I am making this for someone else to use.
So I have my main call
Code:
ibClient.ClientSocket.reqContractDetails(1, contract);
This works fine to get the options chain. Now what I want to know is in the EWrapperImpl.cs is there a sane way to price the options without opening up 100+ realtime connections. I just need the prices in a loop, not a realtime connection.
The goal of this is to filter the options chain down to a few lines that meet our criteria.. so I just need the current information, not a persistent connection.
Here is what I have in the loop now
Code:
Contract contract1 = new Contract();
contract1.ConId = contractDetails.Summary.ConId;
contract1.Symbol = contractDetails.Summary.Symbol;
contract1.SecType = contractDetails.Summary.SecType;
contract1.Exchange = "SMART";
contract1.Right = contractDetails.Summary.Right;
contract1.Strike = contractDetails.Summary.Strike;
contract1.Expiry = contractDetails.Summary.Expiry;
clientSocket.reqMktData(i, contract1, "100,101,106", false, null);
However this errors out, which I assume is due to having too many connections open.
I'm just not sure I am approaching the problem in the correct way. Viewing the options chain w/ pricing seems to be a pretty common view in trading applications, so what are the best practices here.
