1) get order_book, filter product = 'BO', status = 'OPEN' and parent_order_id is not null
2) if exchange_timestamp is greater than one minute then executes kite.cancel_order(order_id=order_id,variety ='bo')
but after the execution of above cancel statement both partially filled first leg and second orders got exited
February 2018