Live Token price chart with moralis

Hello Moralis, I am looking to implement your api to get Live Token price chart using Tradingview chart, I have seen your video of “Token Price Charts” and I have also received a response from your team

“Usually, they need to get the price for an entire interval at once, we only support in the API to get the price of a token at a specific time based on block number meaning that they need to do more work in order to get the token price on an entire interval, maybe to use some caching, it is not a simple api call to get all the info that they need with one api call”

Could you please give me more information, including some link, so that my developer understands what he has to do?

Best regards

By this do you mean price data after a periodic interval? like by every 30min or hourly.

If that is the case you can you use getDateToBlock to indentify the block by it its block time and get the price of token at the block if the block time is greater or equal to the interval period.

Check this docs: https://docs.moralis.io/moralis-dapp/web3-sdk/native#getdatetoblock

1 Like