It looks like you're new here. If you want to get involved, click one of these buttons!
.Net API client
.Net / VBA / Excel (3rd party)
Algorithms and Strategies
Mobile and Desktop apps
Market data (WebSockets)
In this Discussion
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.
orderId = kite.place_order(
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.
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?
For every order placement API success response, there is an order id associated.
You can fetch orderbook and check order status.
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.