> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getTransactionByBlockHashAndIndex | Monad

> Monad API method that returns information about a transaction by block hash and transaction index position. Chainstack Monad reference.

Monad API method that returns information about a transaction by block hash and transaction index position. This method allows you to retrieve a specific transaction from a block when you know both the block hash and the transaction's position within that block.

## Parameters

* `data` — the 32-byte hash of the block.
* `quantity` — the transaction index position within the block, encoded as hexadecimal.

## Response

* `result` — the transaction object, or `null` when no transaction was found:
  * `blockHash` — hash of the block containing this transaction
  * `blockNumber` — number of the block containing this transaction
  * `from` — address of the sender
  * `gas` — gas provided by the sender
  * `gasPrice` — gas price in wei
  * `hash` — hash of the transaction
  * `input` — the data sent along with the transaction
  * `nonce` — number of transactions made by the sender
  * `to` — address of the receiver
  * `transactionIndex` — integer of the transaction's index position
  * `value` — value transferred in wei
  * `v`, `r`, `s` — signature values

## `eth_getTransactionByBlockHashAndIndex` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const { ethers } = require("ethers");

  const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");

  async function getTransactionByIndex() {
    const blockHash = "0xf3cf930f1b4d9637134d09f126c57c30c3f4f40edf10ba502486b26d14b4f944";
    const index = "0x0"; // First transaction
    const tx = await provider.send("eth_getTransactionByBlockHashAndIndex", [blockHash, index]);
    console.log(tx);
  }

  getTransactionByIndex();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"

  web3 = Web3(Web3.HTTPProvider(node_url))
  block_hash = "0xf3cf930f1b4d9637134d09f126c57c30c3f4f40edf10ba502486b26d14b4f944"
  tx = web3.eth.get_transaction_by_block(block_hash, 0)
  print(tx)
  ```
</CodeGroup>

## Use case

A practical use case for `eth_getTransactionByBlockHashAndIndex` is iterating through all transactions in a block when analyzing block contents, or retrieving specific transactions based on their execution order.


## OpenAPI

````yaml openapi/monad_node_api/transaction_info/eth_getTransactionByBlockHashAndIndex.json POST /
openapi: 3.0.0
info:
  title: Monad Node API
  version: 1.0.0
  description: This is an API for interacting with a Monad node.
servers:
  - url: https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800
security: []
paths:
  /:
    post:
      tags:
        - Transactions info
      summary: eth_getTransactionByBlockHashAndIndex
      operationId: eth_getTransactionByBlockHashAndIndex
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getTransactionByBlockHashAndIndex
                params:
                  type: array
                  items:
                    type: string
                  default:
                    - >-
                      0xf3cf930f1b4d9637134d09f126c57c30c3f4f40edf10ba502486b26d14b4f944
                    - '0x0'
      responses:
        '200':
          description: The transaction object.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
                    nullable: true

````