If a position netQuantity is zero, that position is supposed to be closed? 1) Is this correct, if so is there any other way to check a position is closed? 2) Is there a way to check if the placed order is not completed? I mean every order can have multiple status, like "OPEN", "TRIGGER PENDING", "MODIFY PENDING", "OPEN PENDING" etc... I need to identify orders which are not yet started execution. Like "OPEN" order is still not sent for execution, "TRIGGER PENDING" is also not sent for execution, but if you take "OPEN PENDING" is an intermediate status that happens when zerodha has a transaction with the exchange not with the client. If so, please let me know.
If a position netQuantity is zero, that position is supposed to be closed?
Yes, netQuantity field should be Zero.
Is there a way to check if the placed order is not completed?
You can check all different order status here. Maybe you can fetch complete order book and check for status field, with the required status('OPEN',etc).
status
field, with the required status('OPEN',etc).