Is it okay if we cancel all BO orders and create fresh BUY or SELL order (MIS) to exit BO position before auto square off happens at 3:20? Please advice how to clear BO position via API.
Normally closing a position means, you have to place opposite order with same quantity. Example: if you bought 10 quantity of AXISBANK, to close that position, you have to place a SELL order in AXISBANK with 10 quantity. This is how normally it works (Regular Order)
In-case of BO/CO, the opposite orders (stoploss) are placed and managed by OMS on behalf of you as per the loss/target points you set while placing the entry order. So if you place a BUY BO order, then OMS will place SELL orders (SL) with same quantity.
When you send cancel request for any childorders(target/stoploss) of a BO leg, OMS will assume this as a intention to close that leg (position), accordingly does the below; *It will cancel the entry order (if it is partially filled) *It will cancel all target orders (LIMIT) *Modifies all stoploss orders (SL) to MARKET, thus closing that BO leg
So to put it simple, just send a cancel request for any childorders of a BO leg to close that leg (position).
Hope the below will clear;
Normally closing a position means, you have to place opposite order with same quantity. Example: if you bought 10 quantity of AXISBANK, to close that position, you have to place a SELL order in AXISBANK with 10 quantity. This is how normally it works (Regular Order)
In-case of BO/CO, the opposite orders (stoploss) are placed and managed by OMS on behalf of you as per the loss/target points you set while placing the entry order. So if you place a BUY BO order, then OMS will place SELL orders (SL) with same quantity.
When you send cancel request for any childorders(target/stoploss) of a BO leg, OMS will assume this as a intention to close that leg (position), accordingly does the below;
*It will cancel the entry order (if it is partially filled)
*It will cancel all target orders (LIMIT)
*Modifies all stoploss orders (SL) to MARKET, thus closing that BO leg
So to put it simple, just send a cancel request for any childorders of a BO leg to close that leg (position).