Transaction

?module=transaction

https://eth-sepolia.g.alchemy.com/v2/WddzdzI2o9S3COdT73d5w6AIogbKq4X-/api?module=transaction

Get transaction info

gettxinfo

Information related to a specified transaction. Includes:

  • blockNumber

  • confirmations

  • from

  • gasLimit (in wei)

  • gasPrice (in wei)

  • gasUsed

  • hash

  • input

  • logs (array)

  • revert reason

  • success

  • timeStamp

  • to

  • value (in wei)

Example

Copy

https://eth-sepolia.g.alchemy.com/v2/WddzdzI2o9S3COdT73d5w6AIogbKq4X-/api
   ?module=transaction
   &action=gettxinfo
   &txhash={transactionHash}

Request ParamsExample Result

Parameter
Description

txhash

string containing the transaction hash

index

optional nonnegative integer that represents the log index used for pagination.

Get transaction receipt status

gettxreceiptstatus

Also available through a GraphQL 'transaction' query. Status field return:

  • 0 = failed transaction

  • 1 = successful transaction

Example

Copy

https://eth-sepolia.g.alchemy.com/v2/WddzdzI2o9S3COdT73d5w6AIogbKq4X-/api
   ?module=transaction
   &action=gettxreceiptstatus
   &txhash={transactionHash}

Request ParamsExample Result

Parameter
Description

txhash

string containing the transaction hash

Get error status and message

getstatus

Also available through a GraphQL 'transaction' query. Includes the following:

  • errDescription: string with error message

  • isError

    • 0 = pass, no error

    • 1 = error

Example

Copy

https://eth-sepolia.g.alchemy.com/v2/WddzdzI2o9S3COdT73d5w6AIogbKq4X-/api
   ?module=transaction
   &action=getstatus
   &txhash={transactionHash}

Request ParamsExample Result

Parameter
Description

txhash

string containing the transaction hash

Last updated