POST
/
365cf697a3ad6d950b4c4a911e2e4f4d
curl --request POST \
  --url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "starknet_getTransactionByBlockIdAndIndex",
  "params": [
    {
      "block_number": 7015
    },
    19
  ]
}'

Starknet OpenRPC spec

For the latest version of the publicly maintained OpenRPC spec, see the Starknet specs GitHub repo.

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.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

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.

Deprecated feeder gateway method

The feeder gateway was deprecated on December 11, 2023.

Example of the call you had to make to the feeder gateway before the deprecation:

Shell
curl 'https://alpha-mainnet.starknet.io/feeder_gateway/get_transaction_hash_by_id?transactionId=888888'

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:starknet_getTransactionByBlockIdAndIndex
params
array

Response

200

Successful response