There are no special API calls for exiting instruments from holdings and positions portfolios. The way to do it is to place an opposite BUY or SELL order depending on whether the position is a long or a short (MARKET order for an immediate exit). It is important to note that the exit order should carry the same product as of the existing position. If the exit order is of a different margin product, it may show up as a new position in the portfolio.If I have successfully placed 3 different CO for the same symbol with 3 different stop loss value, how would I be able to exit one of them using the api call?
kite.order_cancel(order_id='XXXXX', variety='co', parent_order_id=None)