How can I get the Profit or Loss of a close position?

I am using the Alpaca API, and it only supports getting open positions. If I want to get the profit or loss of a closed position, how can I do it?