Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Documentation for OrderCancel? ...
bdcoder
Using C# API Version 10.30.01.
?
Only a few weeks into using this API and have noticed the documentation is severely lacking in all areas (which seems to be the state of the programming world these days).? Regardless, I needed to use the cancelOrder method.
?
The shows an example of the cancelOrder method as:
client.cancelOrder(nextOrderId - 1, "");
?
The shows the same example as above.
?
However, the code (downloaded) from IB contains an EClient.cancelOrder method with the following arguments:
? ? ? ? public void cancelOrder(int orderId, OrderCancel orderCancel) ?
The code downloaded from IB shows the default constructor for an "OrderCancel" object as:
? ? ? ? public OrderCancel()
? ? ? ? { ? ? ? ? ? ? ManualOrderCancelTime = EMPTY_STR; ? ? ? ? ? ? ExtOperator = EMPTY_STR; ? ? ? ? ? ? ExternalUserId = EMPTY_STR; ? ? ? ? ? ? ManualOrderIndicator = int.MaxValue; ? ? ? ? } ?
I ended up calling the cancelOrder method as follows, which works ...
?
? ? ? ?cancelOrder( order_id, new IBApi.OrderCancel() );
?
But I am ASSUMING this is OK as I do not receive any errors.? If someone knows of a resource that fully describes the "OrderCancel" object, please post a link.
?
Also, any ideas as to how often the documentation is actually updated?
?
Thanks in advance.
?
?
?
?
?
|
Recently, this mailing list was already the venue for an investigation into this apparent breaking change. You can search for the respective tread. As far as I can rely on my memory, the second argument is inconsequential for retail investors and it's OK to use both null and a default new instance. чт, 21 нояб. 2024 г., 17:06 bdcoder via <bdaviduck=[email protected]>:
--
Best, DS |
In these situations, I always do the following:
1) I contact IB via support ticket. They will contact someone knowledgeable in the API team that will provide a detailed answer. 2) I read the relevant sections of the source code which is always the best and most updated documentation. Often, I will have managed to find by myself how to proceed before IB replies to my support ticket confirming my findings. Hope this helps. -- |
to navigate to use esc to dismiss