I'm looking for a way to get a list of transactions for a given address. If there are too many transactions I'd expect to be able to page the results. It would be better if I can give the latest processed transaction as parameter so I could get the latest transactions from a given point.
Something like this:
var page = 1;
txList = getTransactionList("0x323432432...", page, lastProcessedTx);
From my research so far there is no way to get transaction list for an address. You should check all the transactions in the blockchain for the given address or relate addresses to transaction hashes in a database. See this thread that confirms the lack of the needed API: https://github.com/ethereum/go-ethereum/issues/1897
An alternative to this is to use Etherscan API: https://etherscan.io/apis But it depends on a third party server.
If you want to fetch ethereum transaction list by using ethereum addrsss with geth console then you need to run below command after connecting get terminal--
eth.listTransactions
if you want to fetch full transaction information using txn hash then you can use-
eth.getTransaction command using geth
For count all transaction count --
getTransactionCount
You can also get information of completion of transaction by using -
eth.getTransactionReceipt
If you want full java class for all ethereum then tell me I will share code snippet written in java for ethereum transaction, create wallet, fetch transaction for particular account within block range and transaction listener of deposit ether.
Hope this will help
来源:https://stackoverflow.com/questions/36291117/how-to-get-ethereum-transaction-list-by-address