eth_getTransactionByBlockHashAndIndex

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"]}'
indexDescription
0 - blockHashThe hash of a block.
1 - indexThe 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"
    }
}
FieldDescription
resultThe transaction object, or null when no transaction was found.
blockHashThe hash of the block where this transaction was in. null when its pending.
blockNumberThe block number where this transaction was in. null when its pending.
fromThe address of the sender.
gasThe gas provided by the sender.
gasPriceThe gas price provided by the sender in Wei.
hashThe hash of the transaction.
inputThe data send along with the transaction.
nonceThe number of transactions made by the sender prior to this one.
toThe address of the receiver. null when its a contract creation transaction.
transactionIndexThe integer of the transaction's index position in the block. null when its pending.
valueThe value transferred in Wei.
vThe ECDSA recovery id.
rThe ECDSA signature r.
sThe ECDSA signature s.