#2: Get Historical Data
We can also get the historical data for analysis or to plot a chart.
Our historical data are queried using and will be returned in UNIX timestamp format.
Tips: if you’re not familiar with UNIX timestamp, you may use tool like epochconverter.com to convert between UNIX timestamp and human readable date
There are 3 different endpoints to get historical data of a coin:
To get the price & market data of a coin on a specific day in the past (00:00 UTC)
To get list of historical price & market data of a coin for X days before today.
To get list of historical price & market data of a coin for a date range, between 'from' and 'to'.
The data granularity (interval) for market_chart and market_chart/range endpoints is automatic and based on the date range:
- 1 day from current time = 5-minutely data
- 1 day from anytime (except from current time) = hourly data
- 2-90 days from current time or anytime = hourly data
- above 90 days from current time or anytime = daily data (00:00 UTC)
And yes, you may do so with contract address too: