Placing OCO type orders in INTRADAY trading

Can anyone help me with a sample query format to place an OCO type orders in INTRADAY category using upstox APIv2.

Hi @n1Ls,

We will get back to you shortly with an answer.


Please be informed that at the moment, we do not provide support for the OCO (One-Cancels-the-Other) order. However, if we decide to enable this feature in the future, we will notify you accordingly.

For reference, the product should be specified as “OCO.” Below is a sample cURL call:

curl --location '' \
--header 'accept: application/json' \
--header 'Api-Version: '\''2.0'\''' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxx' \
--data '{
  "quantity": 1,
  "product": "OCO",
  "validity": "DAY",
  "price": 0,
  "tag": "string",
  "instrument_token": "NSE_EQ|INE669E01016",
  "order_type": "MARKET",
  "transaction_type": "BUY",
  "disclosed_quantity": 0,
  "trigger_price": 0,
  "is_amo": false

My end goal was to place GTT type orders using API. If you could only help me with the API syntax for the same it would be really helpful!

Currently, the API does not support the GTT feature. However, I would like to inform you that enabling GTT orders via the Upstox API is on our roadmap. We are actively working towards implementing this functionality, and once it’s ready, we will be sure to update our community blog with all the relevant details.

Stay tuned for further updates, and we appreciate your patience and support as we continue to improve our services.

can upstox api fetch stock prices i.e LTP on google excelsheet ?


If you wish to integrate data from Upstox API into your spreadsheet, you’ll need to rely on Excel’s native features, such as Web queries, VBA, or Power Query (Get & Transform Data). These tools allow you to fetch the required data and seamlessly incorporate it into your Excel spreadsheet.


What is the upstox API syntax for placing order for below type:
Order type = INTRADAY

  1. Placing a Stop loss order
  2. Placing a Take profit order

The following are the requirements for Stop Loss Limit Orders:

  • The trigger_price
  • The price

For Stop Loss Market Orders, the only requirement is:

  • The trigger_price

At the moment, we do not provide support for “Placing a Take profit order.” However, we plan to make this feature available once we enable the GTT order in Upstox API. In the meantime, you can use the Upstox mobile app and web application to place such orders.

I want to place GTT orders via Upstox APIv2 for INTRADAY. Please let me if if this feature is now available. If not please suggest me a way around. Let me know if we can at least achieve it using OCO order type. @Pradeep_Jaiswar

Hi @n1Ls - Placing GTT orders via Upstox API v2 is not yet supported at the moment.

However, we have taken this as a feedback and noted your requirement.


It’s been 2.5 months when this was thread was initiated for placing OCO type orders using API. Is that supported now?

If OCO order is not supported, what about CO order? Is that also not supported?


Hi @Ashu_G,

OCO format is not supported by Upstox platform via app or API.

You can combine market order with stop loss using SL-M order type to imitate cover orders at the moment.

Hope this helps, let me know if any further queries.

Any update about OCO order support in ApiV2