I'm trying to get Transaction Action information from Etherscan Apis by using a transaction hash without success. Here is what I want to extract (Swap 1 Ether For 2 Yf-DAI) with the API. I have already tried to decode information returned by


Here but nothing close to getting transaction action. My question is which endpoint should I query or what do I do to get the transaction Action

3 Answers 3


I asked Etherscan support and got the answer.

We unfortunately do not have an endpoint that returns the "Transaction Action" information at this point of time.

It is a popular one by request, and we will definitely consider to add it in a future update.

btw API Pro doc is located at https://etherscan.io/apidocs#APIpro , I checked it as well, there is no such endpoint to get Transaction Actions for now.

You could workaround this by fetching transaction details page and parse it with BeautifulSoup if you really need it.

  • i wonder how etherscan derives it from the blocks. like its gotta be replicable somehow right? Commented Oct 31, 2021 at 4:17
  • I have no idea how Etherscan did it, don't know much about cryptocurrency stuff. didn't find alternatives. Commented Oct 31, 2021 at 12:29

Perhaps what is needed is available in the API PRO plan:

"Get Token Info by ContractAddress" from https://etherscan.io/apis#APIpro

  "status": "1",
  "message": "OK",
  "result": [
      "contractAddress": "0x...",
      "tokenName": "Token Name",
      "symbol": "Token Symbol",
      "divisor": "18",
      "tokenType": "ERC20",
      "totalSupply": "1000000000000000",

Another thing you can do is to retrieve the hash, and look up transaction by hash and it will give you details. Slow though as every hash in transactions needs to be looked up.

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.