0

When I query for the transaction history of a solana wallet using the getSignaturesForAddress method, I don't get to see the amount that was transacted for each transaction. Is there a way I can view the transacted amount for each transaction that is returned on the transaction history array?

1 Answer 1

1

yes, in the parsed transaction object you have pre and post balances for each token involved in the transaction & pre and post balances for sol.

In the array of balances, the accounts are in the same order than in the transaction in many cases.

2
  • I don't think the getSignaturesForAddress method returns preBalances and postBalances for transactions. Commented Oct 13, 2023 at 9:36
  • 1
    There's one step missing, which is that you need to call getTransaction for each signature returned to get the full information docs.solana.com/api/http#gettransaction
    – Jon C
    Commented Oct 13, 2023 at 22:12

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.