Docs

starknet_getTransactionByBlockIdAndIndex - ...

Get the details of a transaction by a given block id and index

Get the details of a transaction by a given block id and index

Get the details of the transaction given by the identified block and index in that block. If no transaction is found, null is returned.

Request Parameters

Request
block_idstring

Block reference ("latest", "l1_accepted", block hash, or block number)

indexinteger

Transaction index in the block

Response Body

Response
resultOBJECT

Transaction details at the specified index

Errors

CodeMessage
24Block not found
27Invalid transaction index in a block

Examples

Bash
curl -X POST https://api-starknet-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "starknet_getTransactionByBlockIdAndIndex",
    "params": [
      {
        "block_hash": "0x15d2401c3a65e0a2b74b20402b01bbea28b118291b07cdca4a94fe4e964270a"
      },
      0
    ],
    "id": 1
  }'

On this page