> For the complete documentation index, see [llms.txt](/llms.txt).

# `eth_getTransactionByHash`

Returns information about a transaction for a given hash. This method uses [80 credits](/services/get-started/pricing/) from your daily balance.

MEV protection

Maximal Extractable Value (MEV) protection is available for all Infura customers on Mainnet. This means `r`, `s`, and `v` signature fields might return empty hex values (`0x0`) while the transaction is pending on Mainnet.

## Parameters[​](#parameters "Direct link to Parameters")

`transaction hash`: [_Required_] A string representing the hash (32 bytes) of a transaction.

## Returns[​](#returns "Direct link to Returns")

A transaction object, or null when no transaction was found. The transaction object will consist of the following keys and their values:

- `accessList`: [_optional_] A list of addresses and storage keys accessed by the transaction. See [access list transactions](/services/concepts/transaction-types/#access-list-transactions).
- `blockHash`: 32 bytes. A hash of the block including this transaction. `null` when it's pending.
- `blockNumber`: The number of the block including this transaction. `null` when it's pending.
- `chainID`: [_optional_] chain ID specifying the network. Returned only for [EIP-1559 transactions](/services/concepts/transaction-types/#eip-1559-transactions).
- `from`: 20 bytes. The address of the sender.
- `gas`: Gas provided by the sender.
- `gasPrice`: Gas price provided by the sender in wei.
- `hash`: 32 bytes. The hash of the transaction.
- `input`: The data sent along with the transaction.
- `maxPriorityFeePerGas`: [_optional_] Maximum fee, in wei, the sender is willing to pay per gas above the base fee. See [EIP-1559 transactions](/services/concepts/transaction-types/#eip-1559-transactions).
- `maxFeePerGas`: [_optional_] Maximum total fee (base fee + priority fee), in wei, the sender is willing to pay per gas. See [EIP-1559 transactions](/services/concepts/transaction-types/#eip-1559-transactions).
- `nonce`: The number of transactions made by the sender prior to this one.
- `r`: 32 bytes. The ECDSA signature `r`.
- `s`: 32 bytes. The ECDSA signature `s`.
- `to`: 20 bytes. The address of the receiver. `null` when it's a contract creation transaction.
- `transactionIndex`: The transaction's index position in the block, in hexadecimal. `null` when it's pending.
- `type`: The [transaction type](/services/concepts/transaction-types/).
- `v`: The ECDSA recovery ID.
- `value`: The value transferred in wei.
- `yParity`: [_optional_] Parity (`0x0` for even, `0x1` for odd) of the y-value of a [secp256k1](https://eips.ethereum.org/EIPS/eip-2098#:~:text=A%20secp256k1%20signature%20is%20made%20up%20of%203%20parameters%2C%20r%2C%20s%20and%20yParity.) signature.

## Example[​](#example "Direct link to Example")

Replace `<YOUR-API-KEY>` with an API key from your [Infura dashboard](https://app.infura.io/).

### Request[​](#request "Direct link to Request")

- curl
- WSS

```
curl https://mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}'

```

```
wscat -c wss://mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}'

```

### Response[​](#response "Direct link to Response")

- JSON

```
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "accessList": [],
    "blockHash": "0x0155db99111f10086bad292d3bd0be9472aff9cf0f33d7d35f2db4814ffad0f6",
    "blockNumber": "0x112418d",
    "chainId": "0x1",
    "from": "0xe2a467bfe1e1bedcdf1343d3a45f60c50e988696",
    "gas": "0x3c546",
    "gasPrice": "0x20706def53",
    "hash": "0xce0aadd04968e21f569167570011abc8bc17de49d4ae3aed9476de9e03facff9",
    "input": "0xb6f9de9500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000e2a467bfe1e1bedcdf1343d3a45f60c50e9886960000000000000000000000000000000000000000000000000000000064e54a3b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000de15b9919539113a1930d3eed5088cd10338abb5",
    "maxFeePerGas": "0x22b05d8efd",
    "maxPriorityFeePerGas": "0x1bf08eb000",
    "nonce": "0x12c",
    "r": "0xa07fd6c16e169f0e54b394235b3a8201101bb9d0eba9c8ae52dbdf556a363388",
    "s": "0x36f5da9310b87fefbe9260c3c05ec6cbefc426f1ff3b3a41ea21b5533a787dfc",
    "to": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
    "transactionIndex": "0x0",
    "type": "0x2",
    "v": "0x1",
    "value": "0x2c68af0bb140000",
    "yParity": "0x1"
  }
}

```
