getaccount — Tron Wallet API
Returns the current native Tron account state.
https://triport.io/rpc/tron/wallet/getaccount- Network
- Tron mainnet
- Scope
- tron:rpc
- Auth
- x-token: $TRIPORT_API_KEY
- Rate limit
- free+; tron_read_rpc: 15 / 20 / 100 / 250 RPS sustained · short burst 30 / 40 / 200 / 500 (free / basic / pro / business; default, unmeasured); Burst capacity
Endpoint and plans: Tron RPC endpoint.
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.
account_resource contains resource-use timing and window information;
frozenV2 records staked resources. These fields describe account state, not
a current remaining-energy or bandwidth budget. That calculation requires
getaccountresource, which is not served by Triport today. getaccount
does not substitute for EnergyLimit - EnergyUsed.
To budget a transfer, use a successful contract simulation and current chain prices: estimate a USDT transfer fee. For the protocol distinction, see energy vs bandwidth.
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. - Empty object
{}? An address/visiblemismatch and a genuinely empty account return the same body — see why Tron wallet/getaccount returns an empty object for how to tell them apart. - TRX burned on transfers? Bandwidth and energy decide it — see why TRON transfers burn TRX.