Currently, it is not possible to place a GTT (Good Till Triggered) order via API v2. We are actively working on enabling GTT functionality within the V2 API. Updates will be provided to you as soon as it becomes available.
In the meantime, you can still manage your trades by placing a buy order followed by a stop-loss (sell) order.
Cancel order API is used to cancel an open or pending which can be applied to both After Market Orders (AMO) and regular orders, for more information please refer this Cancel Order API
To exit/square off a position you need to place an order of opposite leg.
@Anand_Yadav This item is currently in our backlog and will be scheduled for development soon. While we do not have an exact ETA at the moment, we will notify you once it has been selected for development.
But will this method will work for option buyers , if we bought and option premium lets say for 100 INR, So can we place a sell order at 90 INR which can act as a stop loss and then modify it as the price increases, just not sure if we need a quite a large margin for this as it might be considered as a new and fresh sell order. kindly put some light in this direction.
Bro today my script created an buy signal for a option CE for nifty 50 and then SL-M order request was sent initially, but it was unsuccessful with the comment SL-M order not allowed for this script.
Then i used Market order which was successfully placed giving response of 200, and i had a open position, then from mobile app i tried to sell the same Nifty 50 CE option with same quantity but not squaring it off or closing the position and it was showing that i need a huge margin. and moreover if i am selling then if its considering my position then there should not be any capital at all required. please share if you have some insight on this or any idea what could be the issue here.
When we can place a GTT order? Zerodha is providing this service using API. if you canāt able to do it by next 1 week then I have to move my Demat account from Upstox to Zerodh