Access to Closed Positions

How to get the closed positions to calculate profit or loss for the stock in intraday?

You can query all fills for the day from Activities API now.