following to the approach explained here to use etherscan api from Python to get transactions info such as input

How to retrieve transactions' info such as gaslimit and gasprice from Etherscan?

How can I decode transaction input to know what method was called and what arguments were passed in (and arguments types)?

In addition, is there a way to retrieve all verified contracts from etherscan? especially to retrieve creation code for each contract and the all contract's transactions?

1 Answer 1


An example of a response from etherscan API for transactions this:


The input is what you are interested in.

The first 4 bytes are the method (function) that is being called. The remaining are the parameters in words of 32bytes.

If you want to know the function name and types of the parameters you need to know the contract (ABI). Having the ABI you just need to make a quick look for the method.

You can retrieve the contracts you need to know the addresses, there is no way to download all at once. see here

Hope this helps

  • Thanks Jaime! i know how to get the contract API, but i need an automatic way (instead of manually looking at it) that return a function name and its required parameter by passing transaction input & contract api if required. for retrieving contracts, i think you are right since i tried and searched a lot, but did not find a way!
    – MWH
    Mar 11, 2019 at 21:53

Your Answer

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

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