How to know average entry price of iceberg orders

akhilesh_singla
I use below code to know average price:
orders = kite.orders()
for order in orders:
if order['order_id'] == order_id:
avg_price = order['average_price']
But above code does not tell correct price for iceberg order and only tells entry price of 1st leg of the order. How to know correct entry price of an iceberg order?
Tagged:
  • Nivas
    To calculate the average price of an Iceberg order, you need to filter all its associated orders using the parent_order_id parameter. By calculating the average price of these individual slices linked to a specific parent_order_id, you can determine the overall average price of that Iceberg order. You may refer to the documentation here
  • akhilesh_singla
    Thanks for your help. You may close this thread.
This discussion has been closed.