I am using kite api with node.js, and trading in options.
Now, when I place an order for a nifty lot (eg. Nifty 12 Jan ), then for eg. it requires a 5000 margin, so the order goes through, and now if I exit it through the app, it needs no margin to close the position.
But as suggested in other threads, to exit through api, we need to take an opposite position, which is to sell the same instrument and quantity, but to place a sell order on an option requires a margin of around 1,00,000 for the same. So I want to know how to close the position without a margin requirement, similar to in-app flow.
Please let me know if any clarification is required. Thanks a lot in advance.
@hey_abhishek If you would already be having an open long position for X quantity, then placing a sell order for that X quantity or less would not require any additional margin. This will simply close the already open long position.
@hey_abhishek, Like @DD1365 answered, if the order is an exit order to an open position, there is no margin check no matter what your interface is (App or API).
As you guys shared, it worked after I resolved things on my end.