Look Up Transactions by Wallet

Now get transaction data for any wallet address without having to filter through extensive block data.

Look Up Transactions by Wallet

We here at QuickNode are very bullish on making blockchain data more accessible. We are constantly moving towards a more accessible web3 by creating tools and adding new features to our pre-existing arsenal of dev resources. Today we invite you to test our newest addition — a custom method:

qn_getTransactionReceiptsByAddress

The method is still in beta but available to all the new and pre-existing QuickNode Ethereum Mainnet and Goerli endpoints.

What is this new method and how to use it?

When someone wants to get transactions for a particular wallet address, they must get the entire block data and filter the transactions based on the sender or receiver addresses. Doing this for historical/archival blocks can be a lengthy process.

So to solve this, we’ve developed a custom method, qn_getTransactionReceiptsByAddress, which can be used with QuickNode RPCs to get transaction data for specific addresses. This new method saves a lot of time and processing on the user’s end.

Now let’s see how to implement this method and use it.

The following is an example of a JSON RPC request body to use qn_getTransactionReceiptsByAddress:

{
   "jsonrpc":"2.0",
   "id":2863690,
   "method":"qn_getTransactionReceiptsByAddress",
   "params":[
      {
         "fromBlock":"0xe1b402",
         "toBlock":"0xee878e",
         "fromAddresses":[
            "0xa21a16ec22a940990922220e4ab5bf4c2310f556"
         ],
         "toAddresses":[
            "0x9d7d561bd58a78a5cd033ef10ed8c18364e5e194"
         ],
			   "accounts":[
            "0x9d7d561bd58a78a5cd033ef10ed8c18364e5e194"
         ],
         "hashOnly":false,
         "ordering":"asc",
         "page":0
      }
   ]
}

qn_getTransactionReceiptsByAddress Parameters

Here’s a breakdown of the parameters for this method call:

  • The fromBlock and toBlock are optional fields that state the block range for which you want the transaction data to be retrieved. You can submit the block number for these parameters in hex or integer format.
  • You can look up a transaction by fromAddress and/or toAddress, or by accounts:
    • To get the transactions by the sender and/or receiver, submit address(es) in the fromAddress or toAddress field, respectively.
    • To look up the transactions that have been sent and/or received by an address, submit the address(es) in the accounts field. (Note: if addresses are mentioned in the accounts field, all the addresses mentioned in fromAddress or toAddress are ignored).
  • Set the hashOnly true if only the transaction hashes are to be retrieved; false otherwise.
  • If the data set is huge, you can use the page field for pagination. Results are limited to 1000 per page.

Read more about the method in QuickNode documentation.

All the Ethereum Mainnet and Goerli endpoints can be called against this method to retrieve the transaction data. Sign up here to get started with an endpoint if you don't have one already!


About QuickNode

QuickNode.com is building infrastructure to support the future of Web3. Since 2017, we've worked with hundreds of developers and companies, helping scale dApps and providing high-performance access to 15+ blockchains. Subscribe to our newsletter for more content like this and stay in the loop with what's happening in Web3!