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

# `eth_getTransactionByBlockNumberAndIndex`

Returns information about a transaction given block number and transaction index position. This method uses [150 credits](/services/get-started/pricing/) from your daily balance.

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

- `blockParameter`: (string) [_required_] A hexadecimal block number, or one of the tags `latest`, `earliest`, `pending` or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block).  
warning  
`safe` isn't supported. Use `finalized` instead.
- `transaction index position`: [_required_] A hexadecimal of the integer representing the position in the block.

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

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

```

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

- JSON

```
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "accessList": [],
    "blockHash": "0x1682216b3a937e57aeb8c7fcf64a8851ac9a5dd2407f7a76e01aad1ccc0aee19",
    "blockNumber": "0x11dca94",
    "chainId": "0x1",
    "from": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
    "gas": "0x565f",
    "gasPrice": "0xef8230501",
    "hash": "0x140fc3229057d6a484227cbcae16331f586310f68f2095dbc75b3af53d4874bd",
    "input": "0x",
    "maxFeePerGas": "0xef8230501",
    "maxPriorityFeePerGas": "0x0",
    "nonce": "0x63b1f",
    "r": "0x483a889fdbe4bcebd02fcef8b0644dd710de2b2b2f36f4762b90738016e5c639",
    "s": "0x39efb4a71072e6585223e9e77e63920fa65f3de5091d510667782d4cd34ce0a4",
    "to": "0x388c818ca8b9251b393131c08a736a67ccb19297",
    "transactionIndex": "0xa4",
    "type": "0x2",
    "v": "0x1",
    "value": "0x12ff2241f48fc83",
    "yParity": "0x1"
  }
}

```
