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

# eth_getTransactionByBlockNumberAndIndex

> Get transaction details by block number and index.

export const chain = '1';

<ResponseExample>
  ```json Example response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "blockHash": "0x13c5311a78b9a8790c58f1d0d0660226352a498cc98b06e1861f1967d3a9d1b4",
      "blockNumber": "0xc6331d",
      "from": "0xd1af036d589b6ebfbaa184b339a30d32ef611708",
      "gas": "0x11170",
      "gasPrice": "0x5b7e259a7",
      "maxFeePerGas": "0x5b7e259a7",
      "maxPriorityFeePerGas": "0x5b7e259a7",
      "hash": "0xc7ef51f0bfe85eefbb1d4d88f5a39e82fbfc94987d8cbcb515f74d80b6e44902",
      "input": "0x2d2da806000000000000000000000000d1af036d589b6ebfbaa184b339a30d32ef611708",
      "nonce": "0x0",
      "to": "0xabea9132b05a70803a4e85094fd0e1800777fbef",
      "transactionIndex": "0x11a",
      "value": "0x57930b5db6a000",
      "type": "0x2",
      "accessList": [],
      "chainId": "0x1",
      "v": "0x0",
      "r": "0x595619be17755f7427d07626275e4c89b8f9d5a0a668515165ea000d30f26325",
      "s": "0x33d4b22c7c779fc9f04c81788cb4268d2c3f8dc9e219245570bdd384c6ca6690",
      "yParity": "0x0"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi/api-reference/endpoint/ethgettransactionbyblocknumberandindex.json GET /v2/api
openapi: 3.1.0
info:
  title: eth_getTransactionByBlockNumberAndIndex
  version: 2.0.0
  description: Get transaction details by block number and index.
  license:
    name: Etherscan API Terms
    url: https://etherscan.io/terms
servers:
  - url: https://api.etherscan.io
    description: Etherscan API.
security:
  - apiKey: []
paths:
  /v2/api:
    get:
      summary: eth_getTransactionByBlockNumberAndIndex
      description: Get transaction details by block number and index.
      operationId: getEthgettransactionbyblocknumberandindex
      parameters:
        - name: chainid
          in: query
          required: true
          description: >-
            Chain ID to query, eg 1 for Ethereum, 42161 for Arbitrum from our
            [supported chains](/supported-chains).
          schema:
            type: string
          example: '1'
        - name: module
          in: query
          required: true
          description: Set to proxy for this endpoint.
          schema:
            type: string
            default: proxy
          example: proxy
        - name: action
          in: query
          required: true
          description: Set to eth_getTransactionByBlockNumberAndIndex for this endpoint.
          schema:
            type: string
            default: eth_getTransactionByBlockNumberAndIndex
          example: eth_getTransactionByBlockNumberAndIndex
        - name: tag
          in: query
          required: false
          description: Block number in hex format.
          schema:
            type: string
          example: '0xC6331D'
        - name: index
          in: query
          required: false
          description: Transaction index position in the block, in hex.
          schema:
            type: string
          example: '0x11A'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC protocol version.
                  id:
                    type: integer
                    description: Request identifier, echoed back from the request.
                  result:
                    type: object
                    properties:
                      blockHash:
                        type: string
                        description: >-
                          Hash of the block containing the transaction. null if
                          pending.
                      blockNumber:
                        type: string
                        description: >-
                          Block number containing the transaction, in
                          hexadecimal. null if pending.
                      from:
                        type: string
                        description: Address that sent the transaction.
                      gas:
                        type: string
                        description: >-
                          Maximum units of gas the sender allowed for the
                          transaction, in hexadecimal.
                      gasPrice:
                        type: string
                        description: Price paid per unit of gas, in wei (hexadecimal).
                      maxFeePerGas:
                        type: string
                        description: >-
                          Maximum fee per gas the sender is willing to pay, in
                          hexadecimal.
                      maxPriorityFeePerGas:
                        type: string
                        description: >-
                          Maximum priority fee per gas the sender is willing to
                          pay, in hexadecimal.
                      hash:
                        type: string
                        description: The transaction hash.
                      input:
                        type: string
                        description: Data sent with the transaction, as a hex string.
                      nonce:
                        type: string
                        description: >-
                          Number of transactions made by the sender before this
                          one, in hexadecimal.
                      to:
                        type: string
                        description: >-
                          Recipient address. null for contract-creation
                          transactions.
                      transactionIndex:
                        type: string
                        description: >-
                          Index of the transaction within the block, in
                          hexadecimal. null if pending.
                      value:
                        type: string
                        description: >-
                          Value transferred, in wei (hexadecimal). Use the [unit
                          converter](https://etherscan.io/unitconverter) to
                          convert between units.
                      type:
                        type: string
                        description: Transaction type, in hexadecimal.
                      accessList:
                        type: array
                        description: >-
                          Access list of addresses and storage keys, for typed
                          transactions.
                      chainId:
                        type: string
                        description: Chain ID of the transaction, in hexadecimal.
                      v:
                        type: string
                        description: V component of the transaction signature.
                      r:
                        type: string
                        description: R component of the transaction signature.
                      s:
                        type: string
                        description: S component of the transaction signature.
                      yParity:
                        type: string
                        description: Y parity of the transaction signature.
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: apikey
      description: >-
        Enter your Etherscan API key, or [set one up](/set-up-your-api-key) if
        you don't have one.

````