That was just a copy paste error. My real code references to expressions there and I replaced them with sample values.?
I feel it has something to do with the TWS C# library code. Maybe it had a bug in it.
Thanks,
toggle quoted message
Show quoted text
I am using C# TWS API and my code has been working fine with most of the APIs being used. REcently I wanted to try PriceCondition to the order but after the order was submitted, I got an error from EWrapper.
?
Here is a code snippet how I add the PriceCondition. The rest of the code has been working for 2 years so I won't worry about it.
?
? ? var priceCondition = new PriceCondition();
? ? priceCondition.Price = 125.00
? ? priceCondition.ConId = contract.ConId;
? ? priceCondition.IsMore = true
? ? priceCondition.Exchange = contract.Exchange;
??
? ? order.Conditions.Add(priceCondition);
? ? order.ConditionsCancelOrder = true;
? ? order.OutsideRth = true;
? ? order.ConditionsIgnoreRth = true;
It doesn't matter what value i set to OutsideRth and ConditionsIgnoreRth. I always got this error.
?
?
errorCode:320,str:Error reading request. Unable to parse field: 'Ignore Rth' for input string: 'o',advancedOrderRejectjson:,
Has anyone hit this issue before?
?