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

> Optimism API method eth_getRawTransactionByBlockHashAndIndex retrieves the raw transaction data as a hexadecimal string for a transaction in a specific block.

Optimism API method `eth_getRawTransactionByBlockHashAndIndex` retrieves the raw transaction data as a hexadecimal string for a transaction in a specific block, identified by the block hash and the transaction's index position within that block. This method is useful for obtaining the complete transaction data, including its signature, without needing the transaction hash.

## Parameters

* `blockHash` — the hash of the block containing the transaction.
* `transactionIndex` — the index position of the transaction in the block, specified as a hexadecimal. The example uses `"0x1"`.

## Response

* `result` — the raw transaction data as a hexadecimal string.

## Use case

The `eth_getRawTransactionByBlockHashAndIndex` method is essential for:

* Services that need to verify or inspect the complete transaction data and signature.
* Wallets and exchanges that require the raw transaction for auditing or processing purposes.
* Developers and tools that analyze transactions at a low level for security, performance, or other research purposes.


## OpenAPI

````yaml openapi/optimism_node_api/eth_getRawTransactionByBlockHashAndIndex.json POST /efb0a5eccd2caa5135eb54eba6f7f300
openapi: 3.0.0
info:
  title: eth_getRawTransactionByBlockHashAndIndex example
  version: 1.0.0
  description: >-
    This is an API example for eth_getRawTransactionByBlockHashAndIndex, a
    method to get the raw transaction  data for a transaction in a specific
    block identified by block hash and transaction index.
servers:
  - url: https://optimism-mainnet.core.chainstack.com
security: []
paths:
  /efb0a5eccd2caa5135eb54eba6f7f300:
    post:
      tags:
        - Ethereum Operations
      summary: eth_getRawTransactionByBlockHashAndIndex
      operationId: getRawTransactionByBlockHashAndIndex
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - id
                - params
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getRawTransactionByBlockHashAndIndex
                id:
                  type: integer
                  default: 1
                params:
                  type: array
                  default:
                    - >-
                      0x7e4aea365093a183b0df5f003f26144ef04ec8a6e7f4910356590c5fc7b1671f
                    - '0x1'
                  items:
                    type: string
      responses:
        '200':
          description: Raw transaction data for the given block hash and index
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string

````