Is it possible to cancel more than one with an OCO order? Ie. say I have 3 buy Call orders and if one of them gets filled then immediately the other 2 orders shall be cancelled. Can this be done with an OCO ? Or any other conditional order? Of course timing is important the faster the better. Can the following TDA API example be modified for the above requirement? : Conditional Order: One Triggers A One Cancels Another Buy 5 shares of XYZ at a Limit price of $14.97 good for the Day. Once filled, 2 sell orders are immediately sent: Sell 5 shares of XYZ at a Limit price of $15.27 and Sell 5 shares of XYZ with a Stop order where the stop price is $11.27. When one of the sell order fills, the other order is immediately cancelled. Both Sell orders are Good till Cancel. Also known as a 1stTrigger OCO order. Code: { "orderStrategyType": "TRIGGER", "session": "NORMAL", "duration": "DAY", "orderType": "LIMIT", "price": 14.97, "orderLegCollection": [ { "instruction": "BUY", "quantity": 5, "instrument": { "assetType": "EQUITY", "symbol": "XYZ" } } ], "childOrderStrategies": [ { "orderStrategyType": "OCO", "childOrderStrategies": [ { "orderStrategyType": "SINGLE", "session": "NORMAL", "duration": "GOOD_TILL_CANCEL", "orderType": "LIMIT", "price": 15.27, "orderLegCollection": [ { "instruction": "SELL", "quantity": 5, "instrument": { "assetType": "EQUITY", "symbol": "XYZ" } } ] }, { "orderStrategyType": "SINGLE", "session": "NORMAL", "duration": "GOOD_TILL_CANCEL", "orderType": "STOP", "stopPrice": 11.27, "orderLegCollection": [ { "instruction": "SELL", "quantity": 5, "instrument": { "assetType": "EQUITY", "symbol": "XYZ" } } ] } ] } ] }
Update: Extending the other example there (Conditional Order: One Cancels Another) to >2 items seems to be possible. Will try that instead of the above one.
I submit 3 differing items in the OCO order, the server accepts it and creates an OrderId, but when getting details of the OrderId it shows that it accepted only 2 items, discarding the item in the middle. This means it seems not possibe to use more than 2 items. FugIt! Now I'm going to roll my own complex order type the way I like. It will be slow, but at least it will work...