Modifying single/multiple "trades" in a single "order"

zerodhaVyankatesh
Let's assume that I placed an order with 1000 units for a stocks which opened 5 trades, along with 200 units in each.
Now at a certain price, I would like to exit 300 units through API.
Do I need to check all trades placed for particular order ID and call API to exit for each trades separately based on units allocated in each trade?
Or I can send request based on order ID only, and it will automatically exit mentioned units from open trades?

Please advise. @sujith Your suggestions are welcome.

Thank you.
  • sujith
    You can just place opposite transaction type order with quantity same as filled quantity of that order or net quantity of the position.
  • zerodhaVyankatesh
    zerodhaVyankatesh edited March 2023
    To make sure I understand correctly, if the total quantity executed in different trades for an order is 100 and I want to exit 75 quantity, I can place an opposite transaction type order for the specific order ID and product. This will exit 75 quantity even if it is in different "trades". Is that correct? Thank you, @sujith
  • sujith
    You can exit position, it has nothing to do with orderbook. So yes, if you place an order with quantity 75 and same product but different transaction type. You will exit the position partially.
Sign In or Register to comment.