Skip to main content

eth_getTransactionByBlockNumberAndIndex RPC Method

Returns information about a transaction given a block number and transaction index position.

Updated on
Feb 13, 2026

Parameters

blockNumber
string
REQUIRED

The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators

index
string
REQUIRED

An integer of the transaction index position encoded as a hexadecimal

Returns

object
object

The transaction response object, or null if no transaction is found:

blockHash
string

The hash of the block where this log was in. Null when it's a pending log

blockNumber
string

The block number where this log was in. Null when it's a pending log

from
string

The address of the sender

gas
string

The gas provided by the sender, encoded as hexadecimal

gasPrice
string

The gas price provided by the sender in wei, encoded as hexadecimal

maxFeePerGas
string

Maximum fee per gas set by the sender, encoded as hexadecimal

maxPriorityFeePerGas
string

Maximum priority fee per gas set by the sender, encoded as hexadecimal

hash
string

The hash of the transaction

input
string

The data sent along with the transaction

nonce
string

The number of transactions made by the sender before this one encoded as hexadecimal

to
string

The address of the receiver. Null when it's a contract creation transaction

transactionIndex
string

The integer of the transaction's index position that the log was created from. Null when it's a pending log

value
string

The value transferred in wei encoded as hexadecimal

type
string

The transaction type

accessList
array

A list of addresses and storage keys that the transaction plans to access

chainId
string

The chain id of the transaction, if any

v
string

The standardized V field of the signature

r
string

The R field of the signature

s
string

The S field of the signature

yParity
string

The Y-parity value of the signature (0 or 1)

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": {
5
"blockHash": "0xcb8c95bbdccb761b0d278606bcb2888d0a767970efe6d3d9b9e6f392b1a95c22",
6
"blockNumber": "0x654740",
7
"from": "0x9a025f6bf1383626c100a8a36b3aa43d2450e0b5",
8
"gas": "0x5208",
9
"gasPrice": "0x77359407",
10
"maxFeePerGas": "0x165a0bc00",
11
"maxPriorityFeePerGas": "0x77359400",
12
"hash": "0x8020aa8c98247ca51ac752c66232604c965286d77cf14f40ab382393d8e43d50",
13
"input": "0x",
14
"nonce": "0x1c5f",
15
"to": "0x8eff4f6a3f8f9bfd2fd030dfc6428ef06f403a6b",
16
"transactionIndex": "0x0",
17
"value": "0x8b008d96c74854000",
18
"type": "0x2",
19
"accessList": [],
20
"chainId": "0x4115",
21
"v": "0x0",
22
"r": "0x8c524ede5a1dd9f5fe1f193877dcb7befa57b88295b25ef38cd4870d8467aa56",
23
"s": "0x7d4f2c012d5e97686111f4ba826a61b7080395d7129a5c71a102b4322d463f49",
24
"yParity": "0x0"
25
}
26
}
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": {
5
"blockHash": "0xcb8c95bbdccb761b0d278606bcb2888d0a767970efe6d3d9b9e6f392b1a95c22",
6
"blockNumber": "0x654740",
7
"from": "0x9a025f6bf1383626c100a8a36b3aa43d2450e0b5",
8
"gas": "0x5208",
9
"gasPrice": "0x77359407",
10
"maxFeePerGas": "0x165a0bc00",
11
"maxPriorityFeePerGas": "0x77359400",
12
"hash": "0x8020aa8c98247ca51ac752c66232604c965286d77cf14f40ab382393d8e43d50",
13
"input": "0x",
14
"nonce": "0x1c5f",
15
"to": "0x8eff4f6a3f8f9bfd2fd030dfc6428ef06f403a6b",
16
"transactionIndex": "0x0",
17
"value": "0x8b008d96c74854000",
18
"type": "0x2",
19
"accessList": [],
20
"chainId": "0x4115",
21
"v": "0x0",
22
"r": "0x8c524ede5a1dd9f5fe1f193877dcb7befa57b88295b25ef38cd4870d8467aa56",
23
"s": "0x7d4f2c012d5e97686111f4ba826a61b7080395d7129a5c71a102b4322d463f49",
24
"yParity": "0x0"
25
}
26
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free