hi @sujith , i have placed NFO order using API now how do i exit it grammatically, i mean which API need to be called to exit current position i have an order_id for that order
@jeevansevar There are no special API calls for exiting instruments from positions. 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.Go through this documentation.
"Exit position" and "exit all position", must be present in api , because now it involves 1 request to get position and 1 request to close it, so extra turn around time. If exit option is provided it will take only half the time. Also the api will be faster if exit is taken care from server side, pls implement it. In Kite website also there is exit option right, instead of buy / sell to close position, because that is the logical thing.
@sourirajan, Kite trade has to still place order on OMS for exiting a position. Error management becomes difficult and Kite Connect has always been simple and modular APIs, we want to keep it absolutely an execution platform.
Kite web just abstracts the same thing, it places orders in a loop to exit all positions. You can do the same at your end. You can just place orders in a loop once and fetch positions after that to check.
I am new to Kite Connect. Since exiting positions is a separate order to be placed, does it need additional margins? For eg. I have a NFO BUY leg in my positions, if I have to place a SELL order to exit that position do I need additional margins ?. Can anyone help pls
There are no special API calls for exiting instruments from positions. 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.Go through this documentation.
What about
kite.exit_order()
This is for python, I noticed this when using pycharm in autocomplete, I've not tested it
exit_order method is used only for exiting BO/CO order not for positions, you can go through this documentation.
Kite trade has to still place order on OMS for exiting a position. Error management becomes difficult and Kite Connect has always been simple and modular APIs, we want to keep it absolutely an execution platform.
Kite web just abstracts the same thing, it places orders in a loop to exit all positions. You can do the same at your end.
You can just place orders in a loop once and fetch positions after that to check.