1

Similar to this question How to get all the historical data from chainlink price feeds? I would like to retrieve the historical data of a particular price feed to be used off-chain for a large number of consecutive updates. However, according to the docs it seems like the round IDs are no longer incremental (i.e. you can't just call getRoundData(latest_round-_step) for steps in a certain range).

Is the solution to simply do a linear search backwards and try all entries smaller than the latest roundID, or is there a recursive way to achieve this right now (is the previous round ID saved somewhere)?

0

Is the solution to simply do a linear search backwards and try all entries smaller than the latest roundID

Basically, the answer to this is yes.

A better way would be to use the Graph to index the data feeds and then pull from the graph.

1
  • alright thanks, do you happen to have any resources at hand which I can read up on?
    – faihu
    Aug 6 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.