This fetches complete order book. So, it doesn't take input param.
can you help with an example ?
To get required order_id average_price, you will have to iterate whole order book, filter required order_id(eg: 210504003918028 here) and extract average_price from the same. Or you can use order trades APIs(this takes order_id as input) to fetch all trades for required order_id and extract average_price for the same.
@SAPANKHUNTIA , use kite.order_history(orderid), if individual fetch suffices.
If you use websockets and store all your trades, then use kite.orders() and collate with your local storage. if any mismatch, add them to your storage and update your positionbook accordingly with user interrupt, for cross-verification.
print(kite.orders(210504003918028))
average_price
, you will have to iterate whole order book, filter required order_id(eg: 210504003918028 here) and extractaverage_price
from the same. Or you can use order trades APIs(this takes order_id as input) to fetch all trades for required order_id and extractaverage_price
for the same.I'm finding it difficult to write a code for the get request to fetch the trades of a particular order_id.
https://kite.trade/docs/connect/v3/orders/#retrieving-an-orders-trades
can you please help me with this ?
Thank you.
use kite.order_history(orderid), if individual fetch suffices.
If you use websockets and store all your trades, then use kite.orders() and collate with your local storage. if any mismatch, add them to your storage and update your positionbook accordingly with user interrupt, for cross-verification.
I got it.