Is there a place where we can get average_price for an executed order (not individual trades in an order), or do we have to calculate the average_price for the executed order from the average_price and quantity of individual trades under that order?
def trades(self) Retrieve the list of trades executed (all or ones under a particular order). An order can be executed in tranches based on market conditions. These trades are individually recorded under an order. order_id is the ID of the order (optional) whose trades are to be retrieved. If no order_id is specified, all trades for the day are returned.
do we have to calculate the average_price for the executed order from the average_price and quantity of individual trades under that order?
You can know the average price for an open position(all intra-day executed order creates open position) from Position fetch.
Also, I see: trades method does not take order ID as parameter though the documentation says so here
No trades() method, doesn't take order_id as optional param. We will edit this. You can look to order_trades(order_id) for all trades of particular order.
As per the documentation, I can use order_history(order_id) to fetch history of order. Howerver, I am trying to get details of an order in the past (executed on Friday 20th Nov 2020) and it returns an error.
trades()
method, doesn't take order_id as optional param. We will edit this. You can look toorder_trades(order_id)
for all trades of particular order.As per the documentation, I can use order_history(order_id) to fetch history of order. Howerver, I am trying to get details of an order in the past (executed on Friday 20th Nov 2020) and it returns an error.
Similarly, kite.order_trades(order_id), returns nothing.
Even
curl "https://api.kite.trade/orders/<order_id>" \
-H "Authorization: token api_key:access_token"
returns Please advise.
Thanks