Skip to content

eth_getRawTransactionByBlockHashAndIndex ​

served · same as reth

Returns the encoded transaction (EIP-2718) at a position in a block, by block hash.

When to use ​

Use it to get the exact bytes of a transaction when you have the block hash.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getRawTransactionByBlockHashAndIndex", "params": ["0x88392e71b7c4893c80cadfdeadcbaa91add6a41a1a9e2bda3aef6774053617a5", "0x0"]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByBlockHashAndIndex",
  "params": [
    "0x88392e71b7c4893c80cadfdeadcbaa91add6a41a1a9e2bda3aef6774053617a5",
    "0x0"
  ]
}

Response ​

Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x02f903700183025c3080841570de41830711a4940000000aa232009084bd71a5797d089aa4edfad480b9030409c5eabe000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002bd0000cca0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000082bedcbe00000000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead908... 1370 more characters"
}

Full response

Parameters ​

NameTypeRequiredMeaning
blockHash32-byte hashyesThe hash of the block.
indexhex numberyesThe position of the transaction in the block, from 0x0.

Returns ​

The encoded transaction as hex data, or null when the block or the position does not exist.

Errors ​

CodeMessageWhen
-32602Invalid paramsA parameter is missing or does not parse. data has the text of reth, with the position.

Compared with reth ​

The live example above gives the same answer on Cinder and on reth 2.7.

eth_getRawTransactionByBlockNumberAndIndex.

Schema (OpenRPC) ​

Parameter blockHash: Hash32
json
{
  "title": "32 byte hex value",
  "type": "string",
  "pattern": "^0x[0-9a-f]{64}$"
}
Parameter index: Quantity
json
{
  "title": "hex encoded unsigned integer",
  "type": "string",
  "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
Result: Bytes or null
json
{
  "oneOf": [
    {
      "title": "hex encoded bytes",
      "type": "string",
      "pattern": "^0x[0-9a-f]*$"
    },
    {
      "type": "null"
    }
  ]
}