Problem Exiting Cover Order

RajatNagpure
RajatNagpure edited June 2020 in Python client
This is the message when i try to exit my cover order: "Order cannot be cancelled as it is being processed. Try later."

my code:
order_id = kite.place_order(kite.VARIETY_CO,
kite.EXCHANGE_NSE,
stock_quote,
action,
quantity,
kite.PRODUCT_MIS,
kite.ORDER_TYPE_LIMIT,
price=order_price,
trigger_price=stop_loss_trigger)
# order was completed and then after booking P/L i wanted to exit my position.
try:
kite.exit_order('co', order_id=order_id)
except Exception as e:
logger.critical("Problem exiting order: {}".format(e))

The same error regardless of order is complete or not. i have to manually cancel them from kite each time
  • sujith
    You need to send child order id and parent order id to exit a cover order. You can check out the documentation here.
Sign In or Register to comment.