1

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

eth_getTransactionByHash

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

1

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",
      ...
    }
  ]
}
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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