> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getTransactionByHash

Returns the information about a transaction requested by transaction hash.

This method will use `40` [Compute Units](https://docs.validationcloud.io/nodeapi/about/billing.md).

***

## Reference: [Here](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash)

## **Parameters**

1. `DATA`, 32 Bytes - hash of a transaction

```javascript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
params: [
  "0x1edcfafe2394941ab6a70191a5ee7674c23c2d511d897ed7361c9455745621db"
]
```

## **Returns**

`Object` - A transaction object, or `null` when no transaction was found:

* `blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in. `null` when its pending.
* `blockNumber`: `QUANTITY` - block number where this transaction was in. `null` when its pending.
* `from`: `DATA`, 20 Bytes - address of the sender.
* `gas`: `QUANTITY` - gas provided by the sender.
* `gasPrice`: `QUANTITY` - gas price provided by the sender in Wei.
* `hash`: `DATA`, 32 Bytes - hash of the transaction.
* `input`: `DATA` - the data send along with the transaction.
* `nonce`: `QUANTITY` - the number of transactions made by the sender prior to this one.
* `to`: `DATA`, 20 Bytes - address of the receiver. `null` when its a contract creation transaction.
* `transactionIndex`: `QUANTITY` - integer of the transactions index position in the block. `null` when its pending.
* `value`: `QUANTITY` - value transferred in Wei.
* `v`: `QUANTITY` - ECDSA recovery id
* `r`: `QUANTITY` - ECDSA signature r
* `s`: `QUANTITY` - ECDSA signature s

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0xb4ac8c880ad6ab31b3b37546f5ad56b43ce07844e5bab88de23c2c969d32e50f",
    "blockNumber": "0x84dee8",
    "blockTimestamp": "0x6b003329",
    "from": "0xe5e078fbc78341a8de4b6cfde95b624323c6ef36",
    "gas": "0xd946",
    "gasPrice": "0x1dceeba0",
    "maxFeePerGas": "0x3ba6ff00",
    "maxPriorityFeePerGas": "0x0",
    "hash": "0x1edcfafe2394941ab6a70191a5ee7674c23c2d511d897ed7361c9455745621db",
    "input": "0x095ea7b3000000000000000000000000787344f1ac74d78772b5d9314551b3b727ee914b000000000000000000000000000000000000000000002dc6b0b11b80...",
    "nonce": "0x3e3",
    "to": "0x1742b836bd6acb3f996e17f4b5b3bd172d97a93b",
    "transactionIndex": "0x1",
    "value": "0x0",
    "type": "0x2",
    "accessList": [],
    "chainId": "0x1863d",
    "v": "0x0",
    "r": "0x45df295cbc5fea5d53c9c430e616e4b3fd6c4c436d2455b2f938294e3abf2d1b",
    "s": "0x59e3a8f8a40ed7a66885bad3dbcb4c179b9d14d8be6f4b71bb8ccd5d57e8c9df",
    "yParity": "0x0"
  }
}
```

```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://mainnet.elysium.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x1edcfafe2394941ab6a70191a5ee7674c23c2d511d897ed7361c9455745621db"],"id":1}'
```

```bash title="testnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://testnet.elysium.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xeefa1bf3d810b49062959ea7d4fc43687a0b28ba133124724f798865c0b4e01c"],"id":1}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.