Can anyone help me with a sample query format to place an OCO type orders in INTRADAY category using upstox APIv2.
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 'https://api-v2.upstox.com/order/place' \
--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
- Placing a Stop loss order
- 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.
Hi,
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?
Thanks,
Ashu.
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
Any update on the OCO order support? I understand that there is a workaround for this by placing multiple orders (one after the other), however, that would be a lot of rework when this gets implemented within the api. This would really be a game changer as no brokers have this functionality currently and hence a tentative timeline on when to expect this would help developers plan accordingly
Weâre working on getting GTT orders live over APIs. This would solve for BO and OCO/CO too in a much smarter way. Shall keep you posted on it once weâre live.
Any update on this @MohitGolecha ?