Getting Historic OHLC Token Candle Prices

Dearest Regards, Fellow Moralians!

I am curious to know if a token’s historical OHLC (Open High Low Close) price data can be obtained using the Moralis SDK or API?

The answer is yes, I know, but from what I gather the current solution involves making separate API calls to get the price of the token at each individual desired block. As you could imagine, if I needed historical OHLC token prices dating back even 8 hours for the 1 minute candle, that would be alot of API calls. Having to make around 6 calls or so to get the OHLC data for EACH 1 MINUTE CANDLE.

In order to reduce the burden on the API (out of common courtesy and respect for Moralis and the community) I am hesitant to take this approach because doing so would really rack up a load for the Moralis servers (and my API rate / request limits), and I was wondering if there is a more efficient way of getting OHLC data?

For example, is there an endpoint where I could pass in parameters like “token contract”, “from date”, “to date”, and “candle size” then receive a response (an array of objects, for example) that states the Open, High, Low and Close (OHLC) price data for each minute?

Such a thing DOES EXIST, however, it is not Moralis that provides this service, and I really would prefer using Moralis if possible rather than the other provider.

Is there any way I could get historical OHLC data for tokens using Moralis by not using as many API calls?

I would like to note that there may be a significant commercial business opportunity here. Why? The ONLY other source for OHLC Dex price data right now (that I know of) is BitQuery. However, they do not support Fantom, which is the chain I am interested in getting OHLC price data for. This is what their testing OHLC endpoint looks like so you have an idea of what I am talking about.

Very easy to use, I must admit, however their historical OHLC price data is usually behind by about 10 minutes unfortunately.

Let me know your thoughts, thank you.

You can use theGraph Protocal do it