Skip to main content

eth_getTransactionByHash

POST

Returns the transaction information for the specified transaction hash.
param[0]
transactionHashstringrequired
Transaction hash is the unique identifier of a transaction. It is expressed as a 64-character hexadecimal string.
Responses
blockHashstring
Hash of the block containing this transaction. Null for pending transactions
blockNumberstring
Block number containing this transaction (hex). Null for pending transactions
fromstring
Sender address of the transaction
gasstring
Gas limit set for the transaction (hex)
gasPricestring
Gas price (hex, in wei)
maxPriorityFeePerGasstring
Maximum priority fee per gas (EIP-1559, hex)
maxFeePerGasstring
Maximum fee per gas (EIP-1559, hex)
hashstring
Transaction hash
inputstring
Transaction input data (hex encoded)
noncestring
Number of transactions sent by the sender prior to this one (hex)
tostring
Recipient address. Null for contract creation transactions
transactionIndexstring
Transaction position index within the block (hex). Null for pending transactions
valuestring
Amount of ETH transferred (hex, in wei)
typestring
Transaction type (0x0=Legacy, 0x1=EIP-2930, 0x2=EIP-1559)
EIP-2930 access list (type 0x1 and 0x2)
addressstring
Contract address to be accessed
storageKeysarray
Storage keys to be accessed
chainIdstring
Chain ID of the network this transaction belongs to (hex)
vstring
ECDSA signature v value
rstring
ECDSA signature r value
sstring
ECDSA signature s value
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://ethereum-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getTransactionByHash",
"params": [
"0xda148d856aef6d77d0b76c90ef1091ffe77afe9ee9b1c6cc23f28f042f198bd8"
]
}'