Retrieving closed orders data from API

Hi,
I want to get data of orders which have been fulfilled and closed. Either Sell side or buy side. My goal is to get the sell order closed for a symbol e.g. ‘AAPL’ Can anyone tell me if its is possible using api> get_orders() method only shows active orders not closed yet, thus its not helpful. Please share any python code example, if any? Thank you.

1 Like

Hey, I am able to. However, I set a client_order_id when i place orders. I use ticker + doy. because I only place 1 trade for a ticker each day. So today is the 99th day of the year…
so if i traded AAPL yesterday… I can do this
client_order_id = ‘AAPL98’
my_order = api.get_order_by_client_order_id(client_order_id)
and it will give me the order regardless of status

1 Like

Hi,
Nice strategy. Easy to trace back orders. Thanks,