Scott did not tell us, which TWS API version caused the issue. But I suspect it is 10.30 or higher.
Looks like 10.30.01 changed the cancelOrder() request signature:
- from cancelOrder(self, orderId: OrderId, manualCancelOrderTime: str)
- to cancelOrder(self, orderId: OrderId, orderCancel: OrderCancel)
That is true for all languages, not just Python. The new class OrderCancel has several fields, among them a string field called manualOrderCancelTime.
Programing languages other than Python should give you compilation errors since the second argument changed from type String to type OrderCancel.?Also, cancelOrder requests will likely fail unless and instance of OrderCancel is passed. An object with default fields might work, but I have not checked that.
The shiny new official TWS API documentation on IBKR Campus does not reflect that change yet and still suggests passing "" will work.
?
闯ü谤驳别苍
?
On Tue, Sep 10, 2024 at 01:39 PM, ds-avatar wrote:
toggle quoted message
Show quoted text
This looks so weird that I felt curious enough to sift through the source further.
?
The Python IBAPI source does not contain text 'manualOrderCancelTime' at all so it totally escapes me how it could even throw an error message that you quoted, featuring this text. B
eside all this, the error message itself does not follow from anything I see in the API source code.
?
That said, in Java and C# API that same argument is named 'manualOrderCancelTime'. But Python API is not dependent on either.
?
Pretty mind-boggling to say the least, and I still have only questions, no answers...
?
--
Best,
DS