Executed Average Price - For Traded order or Trades

kiteapi
Question:

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?

===============================================

Also, I see: trades method does not take order ID as parameter though the documentation says so here https://kite.trade/docs/pykiteconnect/v3/#kiteconnect.KiteConnect.trades:

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.

10. trades = kite.trades(orig_order_id)

Pylint throwing error:
{
"resource": "/orderStatus.py",
"owner": "python",
"code": "too-many-function-args",
"severity": 8,
"message": "Too many positional arguments for method call",
"source": "pylint",
"startLineNumber": 10,
"startColumn": 10,
"endLineNumber": 10,
"endColumn": 10
}

Tagged:
  • rakeshr
    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.
Sign In or Register to comment.