Returns information about a transaction by block hash and transaction index position.
Request
curl 'https://rpc.web3api.io?x-api-key=YOUR-API-KEY' \
-X POST \
-H 'x-amberdata-blockchain-id: ethereum-mainnet' \
-d {"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"]}'
index | Description |
---|---|
0 - blockHash | The hash of a block. |
1 - index | The integer of the transaction index position. |
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
"blockNumber": "0x5bad55",
"from": "0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98",
"gas": "0x249f0",
"gasPrice": "0x174876e800",
"hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00",
"nonce": "0x5e4724",
"to": "0x4b9c25ca0224aef6a7522cabdbc3b2e125b7ca50",
"transactionIndex": "0x0",
"value": "0x0",
"v": "0x25",
"r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
"s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410"
}
}
Field | Description |
---|---|
| The transaction object, or |
| The hash of the block where this transaction was in. |
| The block number where this transaction was in. |
| The address of the sender. |
| The gas provided by the sender. |
| The gas price provided by the sender in Wei. |
| The hash of the transaction. |
| The data send along with the transaction. |
| The number of transactions made by the sender prior to this one. |
| The address of the receiver. |
| The integer of the transaction's index position in the block. |
| The value transferred in Wei. |
| The ECDSA recovery id. |
| The ECDSA signature r. |
| The ECDSA signature s. |