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

# starknet_getTransactionByBlockIdAndIndex | Starknet

> Starknet API method that returns a transaction by its block ID and index within the block. Available on Starknet via Chainstack JSON-RPC nodes.

> [!NOTE]
>
> **Starknet OpenRPC spec**
>
> For the latest version of the publicly maintained OpenRPC spec, see the [Starknet specs GitHub repo](https://github.com/starkware-libs/starknet-specs).

Starknet API method that returns a transaction by its block ID and index within the block.

It provides the details of a specific transaction that is included in a block. This is useful for clients or wallets to inspect the details of a transaction, such as its sender, receiver, amount, and status.

## Parameters

* `block_id` — the string of the block ID in which the transaction is included.
* `index` — the integer of the index of the transaction within the block.

## Response

* `transaction` — the details of the transaction, including its sender, receiver, amount, and status.

## Use case

A practical use case for `starknet_getTransactionByBlockIdAndIndex` is to retrieve the details of a specific transaction. For example, a wallet may use this method to display the details of a user's past transactions, or a client may use it to verify the status of a transaction.


## OpenAPI

````yaml openapi/starknet_node_api/starknet_getTransactionByBlockIdAndIndex.json POST /mt_c524ad9781ae5dccd9ac6f5b0370e
openapi: 3.0.0
info:
  title: starknet
  version: 1.0.0
  contact: {}
servers:
  - url: https://starknet-mainnet.core.chainstack.com
security: []
paths:
  /mt_c524ad9781ae5dccd9ac6f5b0370e:
    post:
      summary: starknet_getTransactionByBlockIdAndIndex
      description: starknet_getTransactionByBlockIdAndIndex
      operationId: starknetGetTransactionByBlockIdAndIndex
      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: starknet_getTransactionByBlockIdAndIndex
                params:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          block_number:
                            type: integer
                            default: 7015
                      - type: integer
                        default: 19
              default:
                id: 1
                jsonrpc: '2.0'
                method: starknet_getTransactionByBlockIdAndIndex
                params:
                  - block_number: 7015
                  - 19
      responses:
        '200':
          description: Successful response

````