> ## 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](/nodeapi/about/billing).

***

## 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: [
  "0x801f9b08c43e9363292af641cd5a950bfa74e248314f2967a1bbc9693ed8089e",
  "0x1"
]
```

## 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": {
    "type": "0x2",
    "chainId": "0x82",
    "nonce": "0xbfeeb5f",
    "gas": "0x5578",
    "maxFeePerGas": "0x7a120",
    "maxPriorityFeePerGas": "0x0",
    "to": "0x0000000000000000000000000000000000000000",
    "value": "0x0",
    "accessList": [],
    "input": "0x426c6f636b204e756d6265723a203631323237383132",
    "r": "0xf4f40f96702772bcd99fac59dcfd599f476dfd034d99a806cbe428b4d4939e4e",
    "s": "0x740dcb4a26d37f028410aac75b35de4fd2bb25f4edd5f4632be0a4a25d544972",
    "yParity": "0x0",
    "v": "0x0",
    "hash": "0xbefd965068aaabb9b8ebdc9d3ed81f5b3b2bc7d2c7c28d34da6bcbab2b4748f5",
    "blockHash": "0x801f9b08c43e9363292af641cd5a950bfa74e248314f2967a1bbc9693ed8089e",
    "blockNumber": "0x3a64324",
    "transactionIndex": "0x1",
    "blockTimestamp": "0x6acf62eb",
    "from": "0xcabba9e7f4b3a885c5aa069f88469ac711dd4acc",
    "gasPrice": "0x7a120"
  }
}
```

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


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