New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image
eth

ETH

POST

GET

chevron-right

Last updated on January 1, 1970

2 min read

Method eth_getTransactionByHash undefined ()
connect with WS protocol

eth_getTransactionByHash

info-circle-fill

Returns transaction information for the specified transaction hash.

Parameters

DATA - None

32-byte transaction hash.

Request

wscat -c wss://eth.getblock.io/YOUR-API-KEY/mainnet/ 
# wait for connection and send the request body 
{"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0xcd718a69d478340dc28fdf6bf8056374a52dc95841b44083163ced8dfe29310c"],
"id": "getblock.io"}

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "accessList": [],
        "blockHash": "0xe6262c1924326d12b88aaa35a95a0c7cdd11f2d20ebae84618484120bd037c34",
        "blockNumber": "0x107d7b0",
        "chainId": "0x1",
        "from": "0x901c7c311d39e0b26257219765e71e8db3107a81",
        "gas": "0x31d74",
        "gasPrice": "0xb9029a7ea",
        "hash": "0xcd718a69d478340dc28fdf6bf8056374a52dc95841b44083163ced8dfe29310c",
        "input": "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000646701fb000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000a968163f0a57b400000000000000000000000000000000000000000000000000000000000010326d79400000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002bb7135877cd5d40aa3b086ac6f21c51bbafbbb41f002710dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000000000000000000000",
        "maxFeePerGas": "0xf22a22912",
        "maxPriorityFeePerGas": "0x5f5e100",
        "nonce": "0x4",
        "r": "0xef566fc229bb0a10eee5f99c9cabe47f0f20ebaa6d16e4f7b90ee144086b21e9",
        "s": "0x109de5d9baca8daeee1ce1b7d1a304e223d07b1420b37704e675ccffd364a4dc",
        "to": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b",
        "transactionIndex": "0xfc",
        "type": "0x2",
        "v": "0x0",
        "value": "0x0"
    }
}
banner icon

Start Building with GetBlock RPCs for Free