getaccount
https://triport.io/rpc/tron/wallet/getaccountReturns the current native Tron account state.
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^41[0-9a-fA-F]{40}$ by default.visiblebooleanoptionalfalse; 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.
responseobjectErrors
Wallet failures use HTTP status plus JSON. See Tron errors.
| HTTP | Meaning | When it happens |
|---|---|---|
400 | Bad request | The request shape or address encoding is invalid. |
401 | Unauthorized | The API key is missing or invalid. |
403 | Forbidden | The scope or tier does not permit the request. |
429 | Rate limited | The 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 withvisible: true. - This endpoint reads current account state and has no historical block parameter.
- Related:
eth_getBalance.