Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

rpc call to get transactions given an address #12411

Closed
roccomuso opened this issue Sep 23, 2020 · 9 comments
Closed

rpc call to get transactions given an address #12411

roccomuso opened this issue Sep 23, 2020 · 9 comments
Milestone

Comments

@roccomuso
Copy link

roccomuso commented Sep 23, 2020

Problem

what's the RPC to get the list of transactions given an address?

I saw getConfirmedSignaturesForAddress2 but I don't want only the list of signature, instead I'd like to get some basic info like amount received/sent and addresses involved. Something more verbose.

I assumed having the signatures and call getConfirmedTransaction would give me the txs details, but what if I want the timestamp of the tx instead of the slot?
Nesting rpc calls seems a wrong approach to me.

@CriesofCarrots
Copy link
Contributor

Oops, duplicate issues. solana-labs/solana-web3.js#992 I'll close the other

Right now chaining those calls (getConfirmedSignaturesForAddress2 and getConfirmedTransaction) is the way to go. getBlockTime will return the timestamp from the slot

@roccomuso
Copy link
Author

I saw that getBlockTime could have issues depending on the validator: #12413

@roccomuso
Copy link
Author

Do you know if there are planned improvements to allow pagination on getConfirmedSignaturesForAddress2 ?
For pagination I mean keeping a "cursor" that allow to filter out old transactions (the opposite of "before" parameter).
Instead of the before parameter an after parameter would do the job.

@CriesofCarrots
Copy link
Contributor

Yes! There is actually already an until parameter enabled on the RPC side. I just filed an issue about getting that exposed in the web3.js sdk: #12417

@roccomuso
Copy link
Author

Oh thanks, that's a lot useful! I guess also the documentation must be updated.

@CriesofCarrots
Copy link
Contributor

Oh thanks, that's a lot useful! I guess also the documentation must be updated.

💯 on my list for today

@roccomuso
Copy link
Author

Wouldn't be also useful to get rid of the upper limit of 1000 txs ?

@CriesofCarrots
Copy link
Contributor

I think we'll keep that limit for now. RPC isn't optimized for huge data dumps.

@roccomuso
Copy link
Author

Any plan to aggregate those nested calls?
Like using one single REST call to get all the tx detail

@mvines mvines added this to the The Future! milestone May 10, 2021
@CriesofCarrots CriesofCarrots closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants