'How to Pull HIstorical Price Data from Solana Devnet Contracts?

I am looking to grab historical data from our Solana Devnet feeds. Can you let me know if get_submissions is the function that should be called for historical data for the Solana contracts? And if not, can you tell me what is?

Also, are there perhaps instructions I'm missing somewhere for this?



Solution 1:[1]

The function you would want to run is get_round().

get_round() is similar to get_price() but you specify a timestamp and it will return the closest price that occurred just before that timestamp.

You can see this function on GitHub.

Full documentation is still underway for the Chainlink+Solana integration so keep your eyes out on this page in the chainlink docs to find it in the future.

Solution 2:[2]

I don't think that you can get the historical price data as of now on solana. Currently, those price feeds are available by chainlink

enter image description here

those will get you the current prices of pairs.

In Solana contract, our program will communicate with the chainlink program and the chainlink program will fetch the data from the available data feeds above and send to our program. As you see there is no historical price data feed.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zak Ayesh
Solution 2 Yilmaz