TriportRPC

eth_getBlockByNumber

Return a block by number or tag.

Robinhood Chain mainnet (chain ID 4663)robinhood:rpcrobinhood_read_rpc - 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured); enterprise unlimited

eth_getBlockByNumber return a block by number or tag. The published signature and response shape come from the measured Robinhood OpenRPC contract.

Parameters

JSON-RPC params is a positional array.

blockBlockTagrequired
Positional OpenRPC parameter.
fullTransactionsbooleanrequired
Positional OpenRPC parameter.

Response

Representative envelope with the top-level shape of the accepted fixture:

Errors

See Robinhood errors. Invalid parameters return a JSON-RPC parameter error; authentication and quota failures use the shared client error contract. Unknown failures are returned without an implicit retry.

Examples

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

Notes

  • With the pending tag, the block is a right-now view. Its hash may be null or change, and the response is not finality.