I'm working on a front-end for IB and I'd like to be able to update orders, even those that are created by different clients. When the order is created by the same client that's doing the update, the code is simple:
order.m_transmit = true
ibclient.placeOrder(order.m_orderId, contract, order)
When the order comes from a different client, I will get a duplicate orderId error or code[135], msg[Can't find order with id =23018].
I've debated just cancelling the order & resubmitting but since the order can be a part of a OCA group, cancelling outright will cancel all of the orders which is not what I want.
I've tried setting the Client ID to 0, setting the m_clientId of the order and calling ibclient.reqAutoOpenOrders(true) to bind the orders to the app, and while I am getting non-zero order IDs, I can't find a way to modify them.
Has anyone worked around this before? Does anyone have any guesses or ideas to try? I've exhausted all my bright ideas here.
Thanks
order.m_transmit = true
ibclient.placeOrder(order.m_orderId, contract, order)
When the order comes from a different client, I will get a duplicate orderId error or code[135], msg[Can't find order with id =23018].
I've debated just cancelling the order & resubmitting but since the order can be a part of a OCA group, cancelling outright will cancel all of the orders which is not what I want.
I've tried setting the Client ID to 0, setting the m_clientId of the order and calling ibclient.reqAutoOpenOrders(true) to bind the orders to the app, and while I am getting non-zero order IDs, I can't find a way to modify them.
Has anyone worked around this before? Does anyone have any guesses or ideas to try? I've exhausted all my bright ideas here.
Thanks