Skip to main content
POST
/
eth_getTransactionByHash
curl --request POST \
  --url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xffc7cdc354942338ee028ab1c54ef395b908d6e062ef57821e2869ef37945221"
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {}
}
Monad API method that returns information about a transaction by transaction hash. This method allows you to retrieve detailed information about a specific transaction.
Monad-specific behavior: This method does not return pending transactions. It will only return transactions that have been included in a block. If you query for a transaction that is still in the mempool, the method will return null.
Get you own node endpoint todayStart 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

  • data — the 32-byte hash of the transaction.

Response

  • result — the transaction object, or null when no transaction was found:
    • blockHash — hash of the block containing this transaction
    • blockNumber — number of the block containing this transaction
    • from — address of the sender
    • gas — gas provided by the sender
    • gasPrice — gas price in wei
    • hash — hash of the transaction
    • input — the data sent along with the transaction
    • nonce — number of transactions made by the sender
    • to — address of the receiver
    • transactionIndex — integer of the transaction’s index position
    • value — value transferred in wei
    • v, r, s — signature values

eth_getTransactionByHash code examples

const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");

async function getTransaction() {
  const txHash = "0xffc7cdc354942338ee028ab1c54ef395b908d6e062ef57821e2869ef37945221";
  const tx = await provider.getTransaction(txHash);
  console.log(tx);
}

getTransaction();

Use case

A practical use case for eth_getTransactionByHash is retrieving transaction details for display in a DApp or for verifying transaction parameters.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:eth_getTransactionByHash
params
string[]

Response

200 - application/json

The transaction information.

jsonrpc
string
id
integer
result
object | null