Order rejected error handling from notify_order
orenshkol last edited by
When live trading on IB I wish to handle orders rejected by the type of error code received from IB, the problem is that the error code is received in notify_store, when I only want to address errors for rejected orders when I encounter them them in notify_order (notify_store receives many other messages that I don't wish to address).
The only way I see of doing this is by logging notify_store messages as they come in, then getting the last message received for the order id when I get order.Rejected for it in notify_order.
Is there an easier way of doing this? Is there a way of getting the error code from notify_order that I missed?