Skip to main content

eth_getTransactionByBlockNumberAndIndex RPC Method

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

Updated on
Apr 01, 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. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain

index
string
REQUIRED

An integer of the transaction index position encoded as a hexadecimal

Returns

object
object | null

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

hash
string

The hash of the transaction

nonce
string

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

blockHash
string | null

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

blockNumber
string | null

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

transactionIndex
string | null

The integer of the transaction's index position that the log was created from, encoded as hexadecimal. null when it's a pending log

from
string

The address of the sender

to
string | null

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

value
string

The value transferred in wei encoded as hexadecimal

gasPrice
string

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

gas
string

The gas provided by the sender, encoded as hexadecimal

input
string

The data sent along with the transaction

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

type
string

The transaction type

creates
string | null

Represents the address of a newly created contract. Null when the transaction is not a contract creation

chainId
string

The chain id of the transaction, if any

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"type": "0x0",
5
"hash": "0x5ec2a2868ecf6497bea7a36fdb2aaf5e1d7488e4a966440af14e4f636d7f23e0",
6
"nonce": "0x4e744",
7
"blockHash": "0x4d7369d18a0e9910f37043384be84e06acf0e514e563518a9eeaef0fa8f98ad4",
8
"blockNumber": "0x394bfd",
9
"transactionIndex": "0x0",
10
"from": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",
11
"to": "0x3c2269811836af69497e5f486a85d7316753cf62",
12
"value": "0x0",
13
"gas": "0x35f30",
14
"gasPrice": "0x1bf08eb000",
15
"input": "0x3161b7f600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000013900000000000000000000000000000000000000000000a9db7bca4792107ff7c800000000000000000000000000000000000000000000000000000000000374ec0000000000000000000000000000000000000000000000000000000000000010",
16
"creates": null,
17
"chainId": "0xd0a",
18
"v": "0x1a37",
19
"r": "0x3c42d7de3c7ca4c32606437f1c54629ad65a7d544ae5fb733f5168820f902bf2",
20
"s": "0x33d05accd59da02372efdc2d61ef8e68304edffe3d850bcacbf1d42871eb7b00"
21
},
22
"id": 1
23
}
1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"type": "0x0",
5
"hash": "0x5ec2a2868ecf6497bea7a36fdb2aaf5e1d7488e4a966440af14e4f636d7f23e0",
6
"nonce": "0x4e744",
7
"blockHash": "0x4d7369d18a0e9910f37043384be84e06acf0e514e563518a9eeaef0fa8f98ad4",
8
"blockNumber": "0x394bfd",
9
"transactionIndex": "0x0",
10
"from": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",
11
"to": "0x3c2269811836af69497e5f486a85d7316753cf62",
12
"value": "0x0",
13
"gas": "0x35f30",
14
"gasPrice": "0x1bf08eb000",
15
"input": "0x3161b7f600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000013900000000000000000000000000000000000000000000a9db7bca4792107ff7c800000000000000000000000000000000000000000000000000000000000374ec0000000000000000000000000000000000000000000000000000000000000010",
16
"creates": null,
17
"chainId": "0xd0a",
18
"v": "0x1a37",
19
"r": "0x3c42d7de3c7ca4c32606437f1c54629ad65a7d544ae5fb733f5168820f902bf2",
20
"s": "0x33d05accd59da02372efdc2d61ef8e68304edffe3d850bcacbf1d42871eb7b00"
21
},
22
"id": 1
23
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free