Is it possible to cancel more than one with an OCO order?

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"
               }
            }
          ]
        }
      ]
    }
  ]
}
 
Last edited:
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...
 
TDA API Support just confirmed that only 2 items are possible in an OCO order:
...
An OCO order will consist of only 2 orders so you can't have a third order within an OCO. You are able to create an entry order with an OCO order attached to it. The order would be Conditional Order: One Triggers A One Cancels Another. We offer an example on the Place Order Sample page in the link below. If you have any additional questions feel free to reach back to us. Have a great day!

Place Order Samples: https://developer.tdameritrade.com/content/place-order-samples
...
 
Back
Top