> ## 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_getTransactionByBlockHashAndIndex

Returns information about a transaction by block hash and transaction index position.

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_gettransactionbyblockhashandindex)

## **Parameters**

1. `DATA`, 32 Bytes - hash of a block.
2. `QUANTITY` - integer of the transaction index position.

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

## 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": {
    "accessList": [],
    "blockHash": "0xbfe147b96599be9c1bde4b59689187ba3b60cecb1872144488cbb3b8167d2b5c",
    "blockNumber": "0x1f42ac4",
    "blockTimestamp": "0x6b115c4c",
    "chainId": "0xe708",
    "from": "0xdeb02f83136766adf5f9add4a93b38de28087fee",
    "gas": "0x7a120",
    "gasPrice": "0x3b9aca07",
    "maxPriorityFeePerGas": "0x3b9aca00",
    "maxFeePerGas": "0x3b9aca19",
    "hash": "0x5dc8d47cfcda136bcd84d3661c7bbaf4e53e23ba70b46bb5a310481ed724a034",
    "input": "0xde5e0b9a000a5d7ac72f7f6e102979738bd07b91fc6346571ca8e2c44daa37c89f0a4f2d00000000000000000000000000000000000000000000000000000000...",
    "nonce": "0x4633",
    "to": "0x61b7492a40ae4c403629703a38d24851caa1e7e4",
    "transactionIndex": "0x0",
    "type": "0x2",
    "value": "0x0",
    "yParity": "0x0",
    "v": "0x0",
    "r": "0xccc4c8a7778c87c1d5bfd3581cb01c7eaaeee190608951d6715c2d7197ef96b8",
    "s": "0x21499e2cb2166b6db5d49f5358d98967874cb1fcfea12dd91237dc8c4e007fd1"
  }
}
```

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


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