2

I'm trying to get a list of ERC-20 transactions by address. I've tried Etherscan API it doesn't seem to have a url to accomodate. Here are the Etherscan APIs that are similar but do not accomplish the task:

  1. Get a list of 'Normal' Transactions By Address
  2. Get a list of 'Internal' Transactions by Address
  3. Get a list of 'ERC20 - Token Transfer Events' by Address

How are y'all monitoring erc-20 transactions by smart contract address?

PS Ideally there's a solution for this directly from the blockchain but I'll take whatever clue you can provide. Thank you!

DefiBax
  • 37
  • 7
  • Please provide enough code so others can better understand or reproduce the problem. – Community Dec 13 '21 at 11:15
  • By address do you mean contract address or wallet address? – geralt0 Dec 16 '21 at 23:34
  • @geralt0 thanks! I mean by contract address. – DefiBax Dec 22 '21 at 15:12
  • @DefiBax if you're looking for DEX trades, you might want to see https://ethereum.stackexchange.com/questions/87306/how-to-get-a-token-pairs-uniswap-trade-history/87312 Also, you should ask this question in the Ethereum version of stackoverflow – geralt0 Dec 23 '21 at 22:13

1 Answers1

2

Using Etherscan's API, you can do the job.


Arguments to be replaced:

  • Replace TargetAddress with your desired EOA/Contract address.
  • Replace StartBlockNumber with your desired start block number to be queried from.
  • Replace EndBlockNumber with your desired end block number to be queried to.
  • Replace YourApiKeyToken with your etherscan's API key.
Rouhollah Joveini
  • 158
  • 1
  • 3
  • 14
  • 1
    Everything is clear. These API links are working for both EOA and contract addresses. To use them, simply replace their addresses with TargetAddress. However that there is no need for more specifications, but I will add some more explanations and/or examples to my answer. – Rouhollah Joveini Mar 16 '22 at 09:05
  • 1
    There are also examples in the links provided in this answer. – Rouhollah Joveini Mar 16 '22 at 09:18