Does anyone know an API that will work based on any period of time. An API where I can put the year, month, day and time and it will give me the ETH to USD conversion at that moment?
1 Answer
Yes, there are APIs available that can provide historical exchange rates for ETH
to USD
based on specific dates and times.
Here are a few of the options:
CoinGecko API
CoinGecko provides a comprehensive API that includes historical data for various cryptocurrencies. You can get the historical price data by specifying the date.
Endpoint example: https://api.coingecko.com/api/v3/coins/ethereum/history?date=25-06-2024
Documentation: CoinGecko API Documentation
API key: Not required (as of now).
Cryptocompare API
Cryptocompare offers extensive historical data, including minute, hour, and day resolution for cryptocurrency prices.
Endpoint example: https://min-api.cryptocompare.com/data/pricehistorical?fsym=ETH&tsyms=USD&ts=1719273600
Documentation: Cryptocompare API Documentation
API key: Not required (as of now).
CoinAPI
CoinAPI provides real-time and historical data across a wide range of cryptocurrencies and exchanges.
Endpoint example: https://rest.coinapi.io/v1/exchangerate/ETH/USD/history?time_start=2024-06-24T00:00:00&time_end=2024-06-25T23:59:59
Documentation: CoinAPI Documentation
API key: Required, and you can get it for free (serving 100 daily requests).
Alpha Vantage API
Alpha Vantage offers digital currency time series data, including the ability to retrieve historical prices for cryptocurrencies.
Endpoint example: https://www.alphavantage.co/query?function=DIGITAL_CURRENCY_DAILY&symbol=ETH&market=USD&apikey=YOUR_API_KEY
Documentation: Alpha Vantage API Documentation
API key: Required, and you can get it for free. But, it also seems to be working with dummy api keys.