ranaroussi / ezibpy

ezIBpy, a Pythonic Client for Interactive Brokers API
Apache License 2.0
324 stars 116 forks source link

move target order? #11

Closed 4ever911 closed 7 years ago

4ever911 commented 7 years ago

For bracket orders,there is a function to move the stop order. Can we move the other target order?

ranaroussi commented 7 years ago

Sure!

You can modify an existing order by submitting a new order and providing the orderId of the order you with to modify, like so:

ibConn.placeOrder(contract, new_order, orderId=existing_order_id)

As for moving stops, there's an easier way: 😃

ibConn.modifyStopOrder(existing_orderId, existing_order_parentId, newStop, quantity):
ranaroussi commented 7 years ago

Closing this for now.