TriportRPC

eth_getTransactionByHash

BNB Smart Chain / https://triport.io/rpc/bsc

Minimum tier: Free

BNB Smart Chain method guide

Last updated:

eth_getTransactionByHash returns a BNB Smart Chain transaction identified by its 32-byte hash, or null when the selected node cannot find it.

Use it to retrieve sender, destination, value, gas fields, input data, nonce, type, and block placement for a known hash. Pending transactions can have null block fields under the OpenRPC schema.

This method returns the transaction itself, while eth_getTransactionReceipt returns execution status, gas consumption, and logs. It is read-only; raw transaction submission is not exposed for BSC.

Parameters

eth_getTransactionByHash parameters
NameTypeRequiredDescription
transactionHashHashYes

Returns

eth_getTransactionByHash return value
FieldType
transactionTransactionOrNull

Examples

curl https://triport.io/rpc/bsc \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByHash","params":["<transactionHash>"]}'
const res = await fetch("https://triport.io/rpc/bsc", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "<transactionHash>"
  ]
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/rpc/bsc",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByHash","params":["<transactionHash>"]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: BNB Smart Chain.
  3. Clusters: mainnet.
  4. Credit cost: 1 per call.

FAQ

What does eth_getTransactionByHash do?
Return a transaction by hash.
How many credits does eth_getTransactionByHash cost?
eth_getTransactionByHash costs 1 credit(s) per call on Triport by default.
Is eth_getTransactionByHash available over WebSocket?
eth_getTransactionByHash is an HTTP JSON-RPC method.