3

Given the address of a token, how I can get all the transactions related to that address using JSON RPC or an external api such a api.etherscan.io?

The transactions that gives a Ethereum address are different that the transaction that gives an ERC20 token. Example:

https://etherscan.io/address/0x9f7dd5ea934d188a599567ee104e97fa46cb4496 https://etherscan.io/token/Aragon?a=0x9f7dd5ea934d188a599567ee104e97fa46cb4496

I need to get the two transaction that are registered for Aragon via API.

3

3 Answers 3

1

First, you go to your address page and click Erc20 Tokens Txns tab.

Erc20 Token Txns Tab

https://etherscan.io/address/0x9f7dd5ea934d188a599567ee104e97fa46cb4496#tokentxns

Then you look for Aragon in token column and click it.

Aragon in Token column

You will end up on the page where you can export all your transactions in CSV.

CSV export

And here is your URL structure:

https://etherscan.io/token/0x960b236a07cf122663c4303350609a66a7b288c0?a=0x9f7dd5ea934d188a599567ee104e97fa46cb4496

Just add you address as ?a=0x9f7dd5ea934d188a599567ee104e97fa46cb4496 URL parameter to Aragon token URL to get all Aragon transactions for your address.

1

You can get all ERC 20 token transactions on address by using Etherscan API:

http://api.etherscan.io/api?module=account&action=tokentx&address=0x9f7dd5ea934d188a599567ee104e97fa46cb4496&startblock=0&endblock=999999999&sort=asc&apikey=YourApiKeyToken 

for more information you can refer to link given below:

https://etherscan.io/apis#accounts

Note: It will returns up to a maximum of the last 10000 transactions only

2
  • Not clear if this question is answered yet. I am still looking for the answer. The API you mention returns the ERC20 transactions only, not the etherium blockchain transactions.
    – user30994
    Jan 5, 2021 at 14:25
  • @user30994, the question is about getting all token transactions. You can refer this link etherscan.io/apis#accounts to get other transactions data. Jan 8, 2021 at 9:15
0

You can search TOKEN transactions via searching for events with specific transfer-from-address, if your token supports it...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.