We placed CO(Cover Order) manually through kite mobile app, it goes with two orders one with status completed and another with status trigger pending, but for automation purpose we need second order updating as per market rate ,so how system (application) will recognize order id for second order? We analysed that the second order’s id is first order's id +1, Will the same logic works for every CO (cover order)? Please advise us on this. Note : 171218001552343 and 171218001552344 are yesterday’s sample order id .
Once a cover MARKET order is placed, an order id is returned. A user has to fetch order book and find the order with parent order id same as returned order id. Don't use the logic order id + 1. It is not reliable as far as I know.
@sujith Thanks. Please confirm if 'getOrders()' method (Java API, KiteConnect.java class) will return order book which you mentioned above. Also, please let me know whether this method returns all orders (all exchanges, instruments) for current date only or previous day orders as well.
Don't use the logic order id + 1. It is not reliable as far as I know.