How to track NFT buy/sell using API

Hello, I am working on a small project. I want to keep track of all the sales of NFTs to create a script. I want to calculate P/L for that NFT for the selected wallet account.

I am trying to do this using Python. It would be really helpful if someone from here could help me find the correct endpoint to get the NFT buy and sell price for a selected wallet.