Grabbing transaction fee for a list of transaction hashes

120

Question: Grabbing transaction fee for a list of transaction hashes

I want to take a set of transaction hashes pulled from my contract info on etherscan and use those to grab the transaction fee from the transaction ethereum error details page, without having to manually click into each page.

Can anyone point me to the right endpoint on the api? I can't find it. I'm ideally trying ethereum error to grab the dollar amount rather than the gas then having to convert manually.

Total Answers: 1

43

Answers 1: of Grabbing transaction fee for a list of transaction hashes

You can use the txlist action of the Etherscan API to get transactions associated with a specific address. They only return raw blockchain data, not the price, so you'll need to calculate that separately.

Docs: https://docs.etherscan.io/api-endpoints/accounts#get-a-list-of-normal-transactions-by-address