Get avg_entry_price for a filled order


I’m using context.blotter.orders[self.catalyst_order_id] to access data for recently completed orders.

I can see the amount_filled field in there to see how much was bought. How do I get the average price the order completed at?

I see in the code there are transactions and orders. Am I using the right approach to examine completed orders? I keep a list of opened order ids which I compare to blotter.open_orders then I get info from context.blotter.orders as orders drop out of the blotter.open_orders list.


I found the answer: call catalyst.api.get_order() with return_price=True.