TriportRPC

getblockbylatestnum

POSThttps://triport.io/rpc/tron/wallet/getblockbylatestnum

Returns a requested count of the latest native Tron blocks.

Tron mainnettron:rpcfree+; tron_read_rpc: 15 / 20 / 100 / 250 RPS (free / basic / pro / business; default, unmeasured)

getblockbylatestnum returns the requested count of recent blocks in the native wallet representation. It is useful for polling a short confirmed range without issuing one request per block.

The num field is a positive decimal count, not a block height and not an EVM hex quantity. This reads included blocks; Tron does not expose a public pending transaction queue or mempool through the wallet surface.

Parameters

The JSON body contains one required field.

numintegerrequired
Positive decimal count of latest blocks to return.

Response

The concrete response example is unknown: the OpenAPI operation supplies a request example but no response example. The response schema guarantees only an extensible JSON object, represented above by a schema-valid placeholder.

responseobject
Operation-dependent wallet result; field names are not specified in the contract.

Errors

Wallet failures use HTTP status plus JSON. See Tron errors.

HTTPMeaningWhen it happens
400Bad requestnum is missing, not an integer, or less than one.
401UnauthorizedThe API key is missing or invalid.
403ForbiddenThe scope or tier does not permit the request.
429Rate limitedThe tron_read_rpc budget is exceeded.

Examples

const response = await fetch("https://triport.io/rpc/tron/wallet/getblockbylatestnum", {
  method: "POST",
  headers: { "x-token": process.env.TRIPORT_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({ num: 3 }),
});
const recentBlocks = await response.json();

Notes

  • This endpoint returns recent included blocks, not pending transactions.
  • No wallet WebSocket or mempool API is published for Tron.
  • Related: getnowblock returns one current solid block.