Skip to main content

eth_getTransactionByBlockHashAndIndex

POST

Returns the transaction information for the specified block hash and transaction index.
param[0]
blockHashstringrequired
Block hash is the unique identifier of a block. The block hash is represented as a 64-character hexadecimal string.
param[1]
transactionIndexstringrequired
Transaction index indicates the position of a transaction within the block. Expressed as a 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://base-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getTransactionByBlockHashAndIndex",
"params": [
"0x59f63e3840e0f4a1659074c1a4021e881a268a52d31958688da1d66bfbf6d2ca",
"0x0"
]
}'