From the documentation:
"An overfill is categorized as when an order returns a "Filled" or "PartFilled" state after the order was already marked for cancellation. The cancel request could have been induced by an explicit CancelOrder() call, from more implicit cancellations like those that occur when another order sharing the same OCO ID is filled, or from things like order expirations"
Given that the IOrder object only documents it's current order.OrderState (not it's state transitions over time), does this mean that every order object must be tracked in the event it's state becomes order.OrderState == OrderState.PendingCancel and subsequently its order.Filled units increases on subsequent Filled / PartFilled events?
Does every explicit and implicit cancellation occurrence go through OrderState.PendingCancel before OrderState.Cancelled?
When does the order.Overfill bool get set? What is it used for?
Is there any example code of how to properly structure overfill detection and subsequent overfill handling?
Comment