TriportRPC

getaccount

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

Returns the current native Tron account state.

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

getaccount returns the current native wallet account object. Use it when the wallet-layer account representation is required; eth_getBalance returns only one EVM-encoded native balance quantity.

Addresses default to the native 21-byte hex form beginning with 41. A Base58 address is accepted only when visible is true. A mismatched representation can produce an empty object rather than an explicit error, so validate the pair before interpreting absence.

Parameters

The JSON body contains an address and an optional encoding switch.

addressstringrequired
Hex-41 address matching ^41[0-9a-fA-F]{40}$ by default.
visiblebooleanoptional
Defaults to false; set true only when the address is Base58.

Response

The concrete response example is unknown because tron.yaml publishes no response example and does not enumerate account fields. {} is a schema-valid placeholder; it must not be read as a captured response for the address above.

responseobject
Current native account object; properties are operation-dependent.

Errors

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

HTTPMeaningWhen it happens
400Bad requestThe request shape or address encoding is invalid.
401UnauthorizedThe API key is missing or invalid.
403ForbiddenThe scope or tier does not permit the request.
429Rate limitedThe tron_read_rpc budget is exceeded.

An empty 200 object can also indicate an address/visible mismatch; it is not equivalent to an HTTP error.

Examples

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

Notes

  • Hex-41 pairs with omitted or false visible; Base58 pairs with visible: true.
  • This endpoint reads current account state and has no historical block parameter.
  • Related: eth_getBalance.