Search code examples
pythonblockchainethereumetherscan

Get a list of 'erc-20' Transactions By Address


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!


Solution

  • 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.