@sujith But the order book will return all orders placed during the day and I have to loop through them to get the order I want. So isn't using getOrderHistory with order_id simpler?
Looping through 1000 order items (worst case scenario) will not even take a second with today's hardware capabilities. But I am not aware of the context of your script. So it is just a suggestion if it doesn't work then leave it.
average_price
field.But I am not aware of the context of your script. So it is just a suggestion if it doesn't work then leave it.