Historical closing price query on a date

I’m wondering what the best way to get historical prices for ETH. I have historical transactions from an address and need the price of ETH per date of transaction.

Technically using sparkline works using date for start and date +1 for end date and getting the first price in the prices array, but after looping only 67 times I get a 429 too many request error.

How do I work around the 429 or is there an easier way to grab closing prices historically with a specific date & time?

Hello,

The best way to get historical prices is via the Aggregated OHLCV Candles endpoint:
https://nomics.com/docs/#operation/getCandles

429 error means you are exceeding the limits of the free API plan, you will need to slow down your requests.