eth_getTransactionByBlockHashAndIndex

Returns information about a transaction by block hash and transaction index position.

Parameters

  • DATA, 32 Bytes - hash of a block.
  • QUANTITY - integer of the transaction index position.
curl https://ethereum-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"eth_getTransactionByBlockHashAndIndex",
    "params":[
        "0xbb5a287e7a3b879beb9849897b9233c881860bbfb411c853e5695feeb7d10ee4",
        "0x0"
    ]
}'

Returns

  • Object - A transaction object, or null when no transaction was found:
    • blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
    • blockNumber: QUANTITY - block number where this transaction was in. null when its pending.
    • from: DATA, 20 Bytes - address of the sender.
    • gas: QUANTITY - gas provided by the sender.
    • gasPrice: QUANTITY - gas price provided by the sender in Wei.
    • hash: DATA, 32 Bytes - hash of the transaction.
    • input: DATA - the data send along with the transaction.
    • nonce: QUANTITY - the number of transactions made by the sender prior to this one.
    • to: DATA, 20 Bytes - address of the receiver. null when its a contract creation transaction.
    • transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
    • value: QUANTITY - value transferred in Wei.
    • v: QUANTITY - ECDSA recovery id
    • r: QUANTITY - ECDSA signature r
    • s: QUANTITY - ECDSA signature s
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xbb5a287e7a3b879beb9849897b9233c881860bbfb411c853e5695feeb7d10ee4",
        "blockNumber": "0xa3e504",
        "from": "0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c",
        "gas": "0x186a0",
        "gasPrice": "0x165a0bc00",
        "hash": "0x48fffba1a1eb7684d5510b07d199414aa0ea5338136c8ecedfdfec51f8e06f27",
        "input": "0x",
        "nonce": "0x5c3a22",
        "to": "0x8fd00f170fdf3772c5ebdcd90bf257316c69ba45",
        "transactionIndex": "0x0",
        "value": "0x5857e3dd92c2058d4",
        "type": "0x0",
        "chainId": "0x1",
        "v": "0x26",
        "r": "0x4834bd709b141848bdb167945e321650e1f97925c25387e2e8511106242030f7",
        "s": "0x6558b453a5171239053decb4660ca5f64ccf8cdad21af8e8c6cf0a0e318d5faf"
    }
}

Try Yourself

Language
Click Try It! to start a request and see the response here!