@PJ_2018 Although, the ws.close and ws.stop are commented out in the above code but if they are used inside on_close, would it stop websocket from trying to reconnect.
Closing an MIS involves only placing an order of opposite transaction type. But to close a cover order position, one has to modify the second leg order to market type. This is taken care of by the sy…
I was not able to find a proper documentation on various parameter values of the order_place() API. Some of the order information is available at the Kite User Manual.