Hi @ksv, Once you place an order, it goes through various states at the OMS. You can check a typical order's history here.
UPDATE status in the notification is an interim status which means there is an update to the order. It can be a partial fill or order modification or state change like the above case (SL-M). To know the actual status of an order you need to pull orderbook.
Can we always rely on onorderupdate notification? Is there any chance that we do not end up getting these notifications?
After placing the buy order, I would like to know if the order is complete. After placing SL-M I want to know if the order is placed properly. After modifying the SL-M order, i want to be sure that its updated.
I want to prevent the getOrderHistory API call to get the exact state if I can get all the information as part of postbacks/notification.
If its not reliable, then I would like to use the getOrderHistory API.
We do send notifications whenever there is an update for an order. You won't get a notification for an open order. You need to fetch order history after placing an order. If there is an update to the order after that you will receive the notification. You can rely on order updates via websocket. You can check out documentation here.
Once you place an order, it goes through various states at the OMS. You can check a typical order's history here.
UPDATE status in the notification is an interim status which means there is an update to the order. It can be a partial fill or order modification or state change like the above case (SL-M).
To know the actual status of an order you need to pull orderbook.
I have one more small question.
Can we always rely on onorderupdate notification? Is there any chance that we do not end up getting these notifications?
After placing the buy order, I would like to know if the order is complete.
After placing SL-M I want to know if the order is placed properly.
After modifying the SL-M order, i want to be sure that its updated.
I want to prevent the getOrderHistory API call to get the exact state if I can get all the information as part of postbacks/notification.
If its not reliable, then I would like to use the getOrderHistory API.
Can you please advise on the best practice ?
Thanks again!
You won't get a notification for an open order. You need to fetch order history after placing an order. If there is an update to the order after that you will receive the notification.
You can rely on order updates via websocket.
You can check out documentation here.