How to sell stocks that I have purchased i.e how to exit a position

jkoracle23
Hi,
My steps are:
(1)I placed 5 orders to Buy Wipro stocks with quantity(100,70,90,110,80) --> Using public void placeOrder(KiteConnect kiteConnect)
(2)After completion of orders I need to sell my individual orders( based on order id) once sell condition is met.

I am not able to find any solution to exit individual position (based on ORDER ID).
In the api I see method (e.g modifyOrder()) to modify existing order but that will not work for executed order.

Please let me know how to "sell" my "successful buy orders".
  • sujith
    You can fetch positions and place sell market order for the same quantity to exit a long position.
  • jkoracle23
    Pls close this thread.
This discussion has been closed.