3

Context: I am trying to get a history of transactions for an address. I plan to use the getSignaturesForAddress() to get all the signatures I could use to find all the confirmed transactions using the getTransaction() function. I am currently using the free public RPC node provider and endpoint https://rpc.ankr.com/solana.

const publicKey = new solanaWeb3.PublicKey('<SOME VALID ADDRESS>'); 
const transSignatures = await solana.getSignaturesForAddress(publicKey);

But I have noticed weird results using the getSignaturesForAddress(). For some addresses that I know have transactions, it returns empty or returns only a few of the transactions.

  • Am I misusing the getSignaturesForAddress()?
  • Is there another way to get a history of transactions?
  • Is the public RPC node faulty in that it somehow does not have all the transaction history?
2
  • There is no standard for how much transaction history an rpc provider has to provide, it could theoretically even be none at all. I suggest you check your rpc provider's docs to see how much history they provide and check if this lines up with the transactions you can't seem to find.
    – Ahri
    Commented Feb 5, 2023 at 11:14
  • Thanks, that's what I suspected. Will check out different rpc providers and their docs, thanks!
    – Henry
    Commented Feb 7, 2023 at 2:50

1 Answer 1

2

As Elliot Solskjaer mentioned in the comments, there isn't a standard for how much transaction history an rpc provider has to provide.

Instead of using the free public endpoints, I switched to Quicknode's rpc provider and that solved the issue.

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.