TriportRPC

eth_getTransactionByHash

POSThttps://triport.io/rpc/bsc

Return a transaction by hash.

BNB Smart Chainbsc:rpcbsc_read_rpc - 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured); enterprise unlimited

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

JSON-RPC params is a positional array: [transactionHash].

transactionHashstring (32-byte hex hash)required
The 32-byte hash of the transaction to query.

Response

The response below is the checked fixture for this method; it is reproduced without changing its fields or values.

resultobject or null
Transaction object, or null when unavailable.
result.hashstring
Transaction hash.
result.fromstring
Sender address.
result.tostring or null
Destination address, or null for contract creation.
result.valuestring
Transferred native value as a hex quantity.
result.gasstring
Gas limit as a hex quantity.
result.gasPricestring
Gas price as a hex quantity.
result.inputstring
Transaction input byte data.
result.noncestring
Sender nonce as a hex quantity.
result.typestring
Transaction type as a hex quantity.
result.blockHashstring or null
Containing block hash, or null while pending.
result.blockNumberstring or null
Containing block number, or null while pending.
result.transactionIndexstring or null
Index in the containing block, or null while pending.

Errors

Errors use the standard JSON-RPC error envelope. See BSC errors for network-specific classification and the linked shared reference.

CodeMeaningWhen it happens
-32602Invalid paramsA required positional parameter is missing or a value does not match the OpenRPC schema.
401UnauthorizedThe x-token API key is missing or invalid.
429Rate limitedThe request exceeds the configured category RPS for the caller's tier.

Examples

JavaScript (fetch)

const response = await fetch("https://triport.io/rpc/bsc", {
  method: "POST",
  headers: {
    "x-token": process.env.TRIPORT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getTransactionByHash",
    "params": [
      "0x0000000000000000000000000000000000000000000000000000000000000000"
    ]
  }),
});


const payload = await response.json();
console.log(payload.result);

Notes

  • A null result means the selected node did not return the transaction; it is not a synthetic error envelope.
  • The BSC categories use configured defaults of 15 / 20 / 100 / 250 RPS; they are marked unmeasured in the tier matrix.
  • Related methods: eth_getTransactionReceipt, eth_getBlockByNumber, txpool_content.