Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cancel_all_orders():
- orders = kite.orders()
- for order in orders:
- # print(order)
- if order['status'] == 'TRIGGER PENDING' or order['status'] == 'OPEN':
- print(order['tradingsymbol'])
- cancel_id = kite.cancel_order(variety=order['variety'], order_id=order['order_id'],
- parent_order_id=order['parent_order_id'])
- print('cancelled', cancel_id)
Add Comment
Please, Sign In to add comment