Token Price API - Dates


Happy new year! I have been working on getting the token prices for Avalanche tokens using the SDK and rest api. At first I tried using the SDK but later found the rest api to be easier to use and test with.

What would be the best way to get the prices for specific dates for the tokens? I was hoping to get the prices for the tokens for multiple days. So far, I have only been able to get the price for specific blocks and not the dates for specific days.

Thank you for your time and help!

Hey @karubsuke,

Happy new year!

To achieve you can use getDateToBlock to get the precise block for certain time, then using the block from the output you can use the getTokenPrice API you are using. Seems like that is the way to go for you to achieve that for now with Moralis. :raised_hands: