I have noticed some websites which display TP data through several months. How are they able to do it?
I have put this in API category as I suspect API involvement. Some details will be appreciated.
I don't think there is an endpoint to pull the prices for the last months. These websites probably just pull the prices regularly and store them in their databases. Then they can show the price trends of the last months to the user.
If you don't want to do this yourself you could check if these websites you mentioned provide an API to pull the price trends.