Hello Everyone,
I am trying to request historical option data. Here is my code below:
As a response I get error message: "Starting time must occur before ending time"
What am I doing wrong?
Regards,
BrazilForever
I am trying to request historical option data. Here is my code below:
Code:
Samples.EWrapperImpl ibClient = new Samples.EWrapperImpl();
ibClient.ClientSocket.eConnect("", 7496, 0);
Contract contract1 = new Contract();
contract1.ConId = 119571812;
contract1.Symbol = "SPX";
contract1.SecType = "OPT";
contract1.Exchange = "SMART";
contract1.Right = "P";
contract1.Strike = 1125;
contract1.Expiry = "20151217";
List<TagValue> BogusmktDataOptions = new List<TagValue>();
ibClient.ClientSocket.reqHistoricalData(2, contract1, "20150225 17:11:11 GMT",
"2 D", "1 hour", "BID_ASK", 1, 1, BogusmktDataOptions);
Console.ReadKey();
ibClient.ClientSocket.cancelHistoricalData(2);
ibClient.ClientSocket.eDisconnect();
As a response I get error message: "Starting time must occur before ending time"
What am I doing wrong?
Regards,
BrazilForever