OrderEventArgs.Error == ErrorCode.OrderRejected
The most common cause for this is trying to enter on the wrong side of the price. But I noticed today there are other situations, such as "Rejected by Broker" if you try to short a ticker that cannot be shorted, like SGOV.
Questions:
1) Is there a way to differentiate the different kinds of rejections without parsing the error message in OrderEventArgs.Comment? (This seems ugly and error prone, obviously.)
2) Is there a list somewhere of all the possible error messages that I would need to parse, if I have to go that route?
Cheers.
Comment