Where I am now confused is how to modify an existing order using permID and not orderID.
I have been modifying orders within a running instance of TWS using an Order() object, eg to change a stoploss:
stopLoss = Order()
stopLoss.orderId = 99
stopLoss.action = "SELL"
stopLoss.orderType = "STP"
stopLoss.auxPrice = 100.01
stopLoss.tif = "GTC"
stopLoss.totalQuantity = 1
stopLoss.parentId = 98 # Parent ID
stopLoss.transmit = True
stopLoss.eTradeOnly = ""
stopLoss.firmQuoteOnly = ""
self.placeOrder(99, IBContract, stoploss)
Where does permID get put in here?
And once TWS is closed, all of this information becomes redundant (eg- "parentId" because this is the stop loss in an OCA Buy order) - so how do I modify an order now? (I use python).
Thanks.