eth_getTransactionByHash
Returns information about a transaction from a given hash.

Example

Command Shell
Bash
1
curl https://bsc-<network>.web3api.com/v1/YOUR-API-KEY
2
-X POST
3
-H "Content-Type: application/json"
4
-d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByHash\",\"params\": [\"0x5508f1e4304cdc7d1f601e8e0322629ddcfb4ad1b1858d09e6c0b78bc097e863\", \"latest\"],\"id\":1}"
Copied!
1
curl -X POST 'https://bsc-<network>.web3api.com/v1/YOUR-API-KEY' \
2
-H 'Content-Type: application/json' \
3
--data-raw '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0x5508f1e4304cdc7d1f601e8e0322629ddcfb4ad1b1858d09e6c0b78bc097e863"],"id":1}'
Copied!
Request Parameters
Response
  1. 1.
    TRANSACTION HASH - A string representing the hash (32 bytes) of a transaction.
Result Fields
TRANSACTION - A transaction object, or null when no transaction was found
Within the transaction object, the following information are available.
  1. 1.
    blockHash: 32 Bytes - hash of the block where this transaction was in, null when its pending.
  2. 2.
    blockNumber: block number where this transaction was in, null when its pending.
  3. 3.
    from: 20 Bytes - address of the sender.
  4. 4.
    gas: gas provided by the sender.
  5. 5.
    gasPrice: gas price provided by the sender in Wei.
  6. 6.
    hash: 32 Bytes - hash of the transaction.
  7. 7.
    input: the data send along with the transaction.
  8. 8.
    nonce: the number of transactions made by the sender prior to this one.
  9. 9.
    to: 20 Bytes - address of the receiver. null when its a contract creation transaction.
  10. 10.
    transactionIndex: integer of the transactions index position in the block. null when its pending.
  11. 11.
    value: value transferred in Wei.
Body
1
{
2
"jsonrpc":"2.0",
3
"id":1,
4
"result":{
5
"blockHash":"0xde6533bd819945cbee552728721a8bef25279ead24de58fe17f34e7c063abed3",
6
"blockNumber":"0x6ef8d5",
7
"from":"0xa525121b54c473e3071ce15dba622d5e23970ed3",
8
"gas":"0x5208",
9
"gasPrice":"0x12a05f200",
10
"hash":"0x5508f1e4304cdc7d1f601e8e0322629ddcfb4ad1b1858d09e6c0b78bc097e863",
11
"input":"0x",
12
"nonce":"0x1",
13
"to":"0x71c7656ec7ab88b098defb751b7401b5f6d8976f",
14
"transactionIndex":"0x1b7",
15
"value":"0x54e0048173400",
16
"v":"0x1b",
17
"r":"0x437b3bef6de3da5b079448134f3813f34901a2473ecdcb7712f5b138c5ca33c3",
18
"s":"0x35d08bdcf368764d753c3825b2d99d082efca1402313ec48d9e301ff0e355e09"
19
}
20
}
Copied!
​
Last modified 6mo ago
Copy link