how to modify an exit order?

amandeep179018

def modify_order(self,
variety,
order_id,
parent_order_id=None,
quantity=None,
price=None,
order_type=None,
trigger_price=None,
validity=None,
disclosed_quantity=None):
"""Modify an open order."""
params = locals()
del(params["self"])
for k in list(params.keys()):
if params[k] is None:
del(params[k])
return self._put("order.modify", params)["order_id"]


if I want to keep modifying the order in a loop then how can I get the value of the order id without putting it manually because in my strategy the time is very less and there is no way I can copy and paste the order id manually?
  • Imran
    hii @amandeep179018
    when you place an order it returns order id.

    order_id = kite.place_order(tradingsymbol="INFY",exchange=kite.EXCHANGE_NSE,transaction_type=kite.TRANSACTION_TYPE_BUY,quantity=1,order_type=kite.ORDER_TYPE_MARKET,product=kite.PRODUCT_NRML)
  • mangosystems
    How do we capture this orderid as it disappears as my excel keeps changing with time?
Sign In or Register to comment.