In IBrokers 0.10-2 the function IBrokers::placeOrder creates an order with algoStrategy that is written to the connection, but algoParams is not, while it is an argument to twsOrder. Therefore, orders that were created including algoParams tend to be rejected by TWS.
In plain terms: We can tell TWS to create a market order with "algoStrategy" == "Adaptive", but not with an adaptivePriority, e.g. "Urgent".
Expected behavior
The function should include algoParams such that algo orders can be created using IBrokers
Description
In
IBrokers 0.10-2
the functionIBrokers::placeOrder
creates an order withalgoStrategy
that is written to the connection, butalgoParams
is not, while it is an argument totwsOrder
. Therefore, orders that were created includingalgoParams
tend to be rejected by TWS.In plain terms: We can tell TWS to create a market order with
"algoStrategy" == "Adaptive"
, but not with anadaptivePriority
, e.g."Urgent"
.Expected behavior
The function should include
algoParams
such that algo orders can be created usingIBrokers
Minimal, reproducible example
Suggested fix
Include
Order$algoParams,
in line 65 in theplaceOrder
function. It works on my local version. I'll try to come up with a merge request.Session Info