IB API multi leg order.

Discussion in 'Automated Trading' started by walterjennings, May 22, 2007.

  1. Hey I was wondering if any of you IB API gurus out there know wether its possible or not to create a multiple leg order which places a limit order on one security then if that limit is filled it automatically places a market order on a different security using IB's servers only? without having to transmit data back and forth to TWS before the market order is sent? thanks.
  2. I would like to know it either. But I don't think it's possible.
  3. If you can manually create this "multi-leg" order in TWS, there is a good chance you can do it via the API.

    In short, you are looking for a special kind of order type that will be run at IB. If you look at the order types supported by IB on their website I don't think this is one of them - but you knew that already. I haven't checked myself, just going from memory.

    So, to answer your question, I believe the answer is no.

    You could set up this arrangement by the API though but it would necessarily mean being connected all of the time to listen for when the first order gets filled i.e you can't leave the contingent order at the broker to be automatically triggered by the fill on the first order - it has to be triggered client-side via the API or TWS.