tahseen

About

Username
tahseen
Joined
Visits
268
Last Active
Roles
Member

Activity

  • Ashok121
    Hi tahseen,

    Need your help to exit & cancelling multiple bracket orders in python.

    My requirement is
    How to fetch details of executed and non-executed orders in my account.

    After fetching orders details, following is required to cancel/exit the orders.

    If BO order is placed:
    1) Target position is open which needs to be cancelled
    2) SL trigger is open which needs to be exited
    If BO order is not executed,
    3) same needs to be cancelled

    I have abstracted following from api forum:

    #For fetching orders:
    orders=kite.orders()

    #First Option for exiting/cancelling orders:
    cancel_order=kite.cancel_order('bo',order_id=order['order_id'],parent_order_id=order['parent_order_id'])
    exit_order=kite.exit_order(self,'bo',order_id=order['order_id'],parent_order_id=parent_order_id)

    # Second option for cancelling orders:
    "https://api.kite.trade/orders/bo/XXX?api

    Please help me in above as I have to deal with more than 25 orders daily.
    March 2018