开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Locked No documentation for new manualCancelOrderTime in cancelOrder?


Joel Gross
 

I saw this has been added, but did not see documentation for it (in client.py):
def cancelOrder(self, orderId:OrderId, manualCancelOrderTime:str):
? ? ? ? """Call this function to cancel an order.

? ? ? ? orderId:OrderId - The order ID that was specified previously in the call
? ? ? ? ? ? to placeOrder()"""

? ? ? ? self.logRequest(current_fn_name(), vars())

? ? ? ? if not self.isConnected():
? ? ? ? ? ? self.wrapper.error(NO_VALID_ID, NOT_CONNECTED.code(), NOT_CONNECTED.msg())
? ? ? ? ? ? return

? ? ? ? if self.serverVersion() < MIN_SERVER_VER_MANUAL_ORDER_TIME and manualCancelOrderTime:
? ? ? ? ? ? self.wrapper.error(orderId, UPDATE_TWS.code(), UPDATE_TWS.msg() + " ?It does not support manual order cancel time attribute")
? ? ? ? ? ? return

? ? ? ? VERSION = 1

? ? ? ? flds = []
? ? ? ? flds += [make_field(OUT.CANCEL_ORDER)]
? ? ? ? flds += [make_field(VERSION)]
? ? ? ? flds += [make_field(orderId)]

? ? ? ? if self.serverVersion() >= MIN_SERVER_VER_MANUAL_ORDER_TIME:
? ? ? ? ? ? flds += [make_field(manualCancelOrderTime)]

? ? ? ? msg = "".join(flds)

? ? ? ? self.sendMsg(msg)

Join [email protected] to automatically receive all group messages.