Returns the information about a transaction requested by transaction hash. In the response object, `blockHash`, `blockNumber`, and `transactionIndex` are `null` when the transaction is pending.
Parameters
DATA, 32 Bytes - hash of a transaction
DATA
params: [ "0xfaa094639848ffa5c0adb4e3a23f02e8b18a505e4c94a02f913c17bcae4814e8" ]
Returns
Object - A transaction object, or null when no transaction was found:
Object
blockHash: DATA, 32 Bytes - hash of the block where this transaction was in. null when its pending.
blockHash
blockNumber: QUANTITY - block number where this transaction was in. null when it's pending.
blockNumber
QUANTITY
from: DATA, 20 Bytes - address of the sender.
from
gas: QUANTITY - gas provided by the sender.
gas
gasPrice: QUANTITY - gas price provided by the sender in Wei.
gasPrice
hash: DATA, 32 Bytes - hash of the transaction.
hash
input: DATA - the data send along with the transaction.
input
nonce: QUANTITY - the number of transactions made by the sender prior to this one.
nonce
to: DATA, 20 Bytes - address of the receiver. null when it's a contract creation transaction.
to
transactionIndex: QUANTITY - integer of the transactions index position in the block. null when its pending.
transactionIndex
value: QUANTITY - value transferred in Wei.
value
v: QUANTITY - ECDSA recovery id
v
r: DATA, 32 Bytes - ECDSA signature r
r
s: DATA, 32 Bytes - ECDSA signature s
s
Request example
Result
Last updated 3 years ago
curl https://bsc.api.watchdata.io/node/jsonrpc?api_key=your_api_key -X POST \ -H "Content-Type: application/json" \ -d'{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xfaa094639848ffa5c0adb4e3a23f02e8b18a505e4c94a02f913c17bcae4814e8"],"id":0}'
URL: https://bsc.api.watchdata.io/node/jsonrpc?api_key=your_api_key RequestType: POST Body: { "jsonrpc":"2.0", "method":"eth_getTransactionByHash", "params":["0xfaa094639848ffa5c0adb4e3a23f02e8b18a505e4c94a02f913c17bcae4814e8"], "id":0 }
{ "jsonrpc": "2.0", "id": 0, "result": { "hash": "0xfaa094639848ffa5c0adb4e3a23f02e8b18a505e4c94a02f913c17bcae4814e8", "nonce": "0xe110a", "transactionIndex": "0x62", "from": "0xea0a6e3c511bbd10f4519ece37dc24887e11b55d", "to": "0x0000000000000000000000000000000000001000", "value": "0x12c438e2772cae5", "gasPrice": "0x0", "gas": "0x7fffffffffffffff", "input": "0xf340fa01000000000000000000000000ea0a6e3c511bbd10f4519ece37dc24887e11b55d", "v": "0x94", "r": "0xf23e3c81c405683ad83a01648470eb042981a76682a8465f01423bf0b00e9f91", "s": "0x30b752f7cbc98fb5e9a45ca75771084783dae99bf2ddc2b56f914bb167dad66a", "chainId": "0x38", "blockHash": "0x18b8e20d83a9c9636c6e9828157b1d684934e3e4c540531831460f9c8be60b9f", "blockNumber": "0x119b752" } }