Unable to place cover order

I'm trying to place cover order in python using the following API call. but getting error "Invalid trigger price entered".
i m not even passing trigger price so what I m doing wrong here.
Please advise.

orderId = kite.place_order(
  • sujith
    As the error says one has to send trigger_price for stoploss order while placing the cover order.
    The param stoploss is used only for bracket order.
  • sovan_nit
    Thanks .. Does this API return order id of the stop loss order i.e. (the order with status = trigger pending), how to get the order id of stop loss order directly without fetching all open orders again?
  • sujith
    For every order placement API success response, there is an order id associated.
    You can fetch orderbook and check order status.
  • sovan_nit
    one CO order creates atleast 2 orders 1) actual buy/sell order 2) stop loss order
    but api returns only one order id , i believe it returns order id of the buy/sell order but not the stop loss order id right? my question was is there any way i can get the order id of the stop loss order from this API ? or I need to fetch it separately using kite.orders()?
  • sujith
    Yes, you are right. A success response for placing a cover order returns the order id of the parent order/first leg order.
    In order to find the order id of the second leg order, one needs to fetch order book and search for the order with the parent order id equal to the order id received in the response.
Sign In or Register to comment.