2

I need help getting data from a specific block in the past on a blockchain. Is there a way to access information from a particular block in the blockchain's history? Also, I'm curious if node providers offer support for archive nodes that store complete historical data of the blockchain. If you have any tips or suggestions on how to fetch data from a past block or if archive node support is available through node providers. thank you! - elchuo160

1 Answer 1

2

Yes, QuickNode provides Solana archival data.

You can use getBlock RPC method to get any particular block's data (it can be historical too).

Here is an example in solana/web3.js:

const web3 = require("@solana/web3.js");
(async () => {
  const solana = new web3.Connection("QUICKNODE_SOLANA_RPC_URL");
  console.log(
    await solana.getBlock(94101948, { maxSupportedTransactionVersion: 0 })
  );
})();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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