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

Returns information about a transaction by block number 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_gettransactionbyblocknumberandindex)

## **Parameters**

1. `QUANTITY|TAG` - a block number, or the string `"earliest"`, `"latest"` or `"pending"`, as in the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block-parameter).
2. `QUANTITY` - the transaction index position.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
params: [
  "0x24bcf00",
  "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": "0x1e0",
    "nonce": "0xd4c27",
    "gas": "0x96cfb",
    "maxFeePerGas": "0x18f2b8",
    "maxPriorityFeePerGas": "0xf4240",
    "to": "0x0000000071727de22e5e9d8baf0edac6f37da032",
    "value": "0x0",
    "accessList": [],
    "input": "0x765e827f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000009dcf67cc6d08394d72ddff30c14b70...",
    "r": "0xb43063b2ee76a6817b7462f9e94a583b8a3762ca3ad4e025908954458265874a",
    "s": "0xd1d6486732887efaa2e1d5cd02c5a046f816051a46fd7d20ced5e6d815a0035",
    "yParity": "0x0",
    "v": "0x0",
    "hash": "0x976ede826ce145939ff1d6ba66d01aa5c8e9aea7fba57db427949a4516f870ce",
    "blockHash": "0x8aa29d1d553e01967d72dea6f60cf1c07c6563c85fa673ebb1e5e17dd27d6bd9",
    "blockNumber": "0x24bcf00",
    "transactionIndex": "0x1",
    "blockTimestamp": "0x6b1298d7",
    "from": "0x009dcf67cc6d08394d72ddff30c14b7012896c29",
    "gasPrice": "0x16e360"
  }
}
```

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


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