Here is something that may be related. ?Take a look at line 512 of ib_async/wrapper.py, in the openOrder function, where it does
? ? ? ? ? ? trade.order.lmtPrice = order.lmtPrice
In my experience, after I submit a modified orde via ib_async to change the lmtPrice, later, when the modified order is then accepted by the server, IBKR sends back a response that ib_async handles via this openOrder function. ?Among other things, the openOrder function updates the lmtPrice field of the order registered with the trade (at the line noted above). ? This is how I've been tracking when IBKR accepts price modifications (which doesn't always happen right away). ?This has worked pretty reliably for me. ?There was a short email thread about it in the old ib_insync forum, which I don't have a copy of now.
Here is code for the "patched" limit order object that I've used to implement this. ?It adds a new event that fires when the price is accepted in this way:
class PatchedIBOrder(ibs.Order):
? ? def __init__(self, action, totalQuantity, orderType="LMT", **kwargs):
? ? ? ? ibs.Order.__init__(
? ? ? ? ? ? self,
? ? ? ? ? ? orderType=orderType,
? ? ? ? ? ? action=action,
? ? ? ? ? ? totalQuantity=totalQuantity,
? ? ? ? ? ? **kwargs,
? ? ? ? )
? ? ? ? self.priceAcceptedEvent = Event("priceAcceptedEvent")
? ? ? ? self.acceptedPrice = None
? ? ? ? self._lmtPrice = None
? ? @property
? ? def lmtPrice(self):
? ? ? ? return self._lmtPrice
? ? @lmtPrice.setter
? ? def lmtPrice(self, value):
? ? ? ? self._lmtPrice = float(value) if value else None
? ? ? ? if inspect.stack()[1][3] == "openOrder":
? ? ? ? ? ? self.acceptedPrice = value
? ? ? ? ? ? # logging.warning(f"order {self.priceAcceptedEvent}: price accepted")
? ? ? ? ? ? self.priceAcceptedEvent.emit()
? ? ? ? ? ? # logging.warning(f"order {self.orderId}: price accepted event emitted")