Currently, to my knowledge, Kite APIs does not offer an endpoint to get a single order by using it's identifier. It has only 1 way of getting orders which sends list of all orders. If a developer wants to get only 1 order from Kite, only way is to get all orders, then manually find the order of interest and then proceed.
While the existing get all orders endpoint should remain available, I would like to request Kite API team to develop and provide a new endpoint to get an order by it's identifier. Additionally, please make this feature available via Node.js and other SDKs.
I am aware of this endpoint Nivas, however, what I am requesting is to be able to get an absolute final state of an order by its identifier.
I understand this endpoint will provide details based on which we can calculate and get the final version of the order. However, we can do the same from getting all orders and finding the order we are interested in. So as I have mentioned there are multiple way of beating around the bush to get an order but it would be ideal to have an endpoint which would DIRECTLY give us order's final state by it's identifier. I think this is basic feature that you would expect from any API service - not only it would reduce the payload, it would also reduce the processing time required to deliver and receive the same at both ends. Wouldn't you agree?
The OMS and internal systems don't have a provision to fetch one order. Kite Connect is purely an execution platform. We don't intend to write solutions to develop strategies. You may fetch the orderbook and write a simple list.where() method to find the relevant order.
We are already doing what is required to get the order we are looking for from the list of orders provided. But thank you for advising us anyway.
However, If we can do that at our end, it should be possible to do the same (before sending response back to the client) at your end, and then send us only order that is queried. It is simplest thing to do but is left for developers to implement rather than provide support for.
Developers love Zerodha and it's offerings as a platform. But that brings a huge responsibility on Zerodha's shoulders to keep and maintain that love. I strongly suggest Zerodha to keep an eye on what Dhan has been doing so far... It keeps on launching amazing features and APIs for developers on regular basis. And as far as getting order by order id is concerned, here you go: https://dhanhq.co/docs/v2/orders/#get-order-by-order-id
Our love and loyalty goes for Zerodha. But more than that we have invested time, money and efforts to develop solutions around Zerodha so it is difficult to move to another broker without a strong reason. But till how long? I sincerely wish and hope Zerodha keeps up with others. Because I want it to be the best of all.
> I am aware of this endpoint Nivas, however, what I am requesting is to be able to get an absolute final state of an order by its identifier.
Our API returns the entire order trail and its as easy as just doing `order[order.length-1]` instead of introducing yet another endpoint to just get the final order state. Every vendor has their own API structure and its opinionated, this is the data structure we expose. Let us know if you have any other query we can help you with.
As I have mentioned before, we are already doing what is required to get the final state of an order from the order trail. Thank you for advising anyway.
However, in algo trading, metrics like execution time, processing time, payload etc matters. I thought this can be easily done at Zerodha's end or might there be a solution already which I am not aware of, which is why I raised this query.
> However, in algo trading, metrics like execution time, processing time, payload etc matters
You are underestimating how fast array/slice access in modern programming language is (it will be in nanoseconds even in language like Python). Most of the time your will be spent on IO and other math rather than this and at retail scale (which is what our API is meant for) it doesn't make sense to focus on micro optimisations such as this case.You are underestimating how fast array/slice access in modern programming language is (it will be in nanoseconds even in language like Python). Most of the time your will be spent on IO and other math rather than this and at retail scale (which is what our API is meant for) it doesn't make sense to focus on micro optimisations such as this case.
We will close this thread for now. If you have any other query please let us know,
I understand this endpoint will provide details based on which we can calculate and get the final version of the order. However, we can do the same from getting all orders and finding the order we are interested in. So as I have mentioned there are multiple way of beating around the bush to get an order but it would be ideal to have an endpoint which would DIRECTLY give us order's final state by it's identifier. I think this is basic feature that you would expect from any API service - not only it would reduce the payload, it would also reduce the processing time required to deliver and receive the same at both ends. Wouldn't you agree?
We are already doing what is required to get the order we are looking for from the list of orders provided. But thank you for advising us anyway.
However, If we can do that at our end, it should be possible to do the same (before sending response back to the client) at your end, and then send us only order that is queried. It is simplest thing to do but is left for developers to implement rather than provide support for.
Developers love Zerodha and it's offerings as a platform. But that brings a huge responsibility on Zerodha's shoulders to keep and maintain that love. I strongly suggest Zerodha to keep an eye on what Dhan has been doing so far... It keeps on launching amazing features and APIs for developers on regular basis. And as far as getting order by order id is concerned, here you go: https://dhanhq.co/docs/v2/orders/#get-order-by-order-id
Our love and loyalty goes for Zerodha. But more than that we have invested time, money and efforts to develop solutions around Zerodha so it is difficult to move to another broker without a strong reason. But till how long? I sincerely wish and hope Zerodha keeps up with others. Because I want it to be the best of all.
Regards.
Our API returns the entire order trail and its as easy as just doing `order[order.length-1]` instead of introducing yet another endpoint to just get the final order state. Every vendor has their own API structure and its opinionated, this is the data structure we expose. Let us know if you have any other query we can help you with.
As I have mentioned before, we are already doing what is required to get the final state of an order from the order trail. Thank you for advising anyway.
However, in algo trading, metrics like execution time, processing time, payload etc matters. I thought this can be easily done at Zerodha's end or might there be a solution already which I am not aware of, which is why I raised this query.
You can close this discussion.
Regards.
You are underestimating how fast array/slice access in modern programming language is (it will be in nanoseconds even in language like Python). Most of the time your will be spent on IO and other math rather than this and at retail scale (which is what our API is meant for) it doesn't make sense to focus on micro optimisations such as this case.You are underestimating how fast array/slice access in modern programming language is (it will be in nanoseconds even in language like Python). Most of the time your will be spent on IO and other math rather than this and at retail scale (which is what our API is meant for) it doesn't make sense to focus on micro optimisations such as this case.
We will close this thread for now. If you have any other query please let us know,