Hi, Below is my existing code for buying Bank nifty options. order_ID = kite.place_order(variety=kite.VARIETY_REGULAR, exchange=kite.EXCHANGE_NFO, tradingsymbol=tradingsymbol, transaction_type=kite.TRANSACTION_TYPE_BUY, quantity=quantity, product = kite.PRODUCT_MIS, order_type=kite.ORDER_TYPE_MARKET, validity=kite.VALIDITY_DAY) print(order_ID)
with open('order_CE.json','w') as json_file: json.dump(order_ID,json_file,ensure_ascii=True)
Does exit order helps to square off the exiting position. Please suggest. If not please advise the solution for squaring off order_ID = kite.exit_order(variety=kite.VARIETY_REGULAR, order_id=order_sqf)