Hi 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.
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?
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()?
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.
The param stoploss is used only for bracket order.
You can fetch orderbook and check order status.
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()?
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.