/wallet/getaccount - Tron

This endpoint returns the on-chain data for an account, including its TRX balance in SUN, permissions, TRC-10 asset balances, and staking state.

This is a read endpoint. It is also served by the Solidity node at https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/walletsolidity/getaccount, which returns only confirmed, irreversible data. Use the Solidity node for balance and payment verification.

Parameters

ParameterTypeRequiredDescription
addressstringYesAccount address, base58 (T...) when visible is true, otherwise hex
visiblebooleanNoReturn and accept addresses in base58 format. Default false

Request

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/wallet/getaccount' \
--header 'Content-Type: application/json' \
--data-raw '{
  "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
  "visible": true
}'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/wallet/getaccount',
    {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({"address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "visible": true})
    }
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.post(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/wallet/getaccount',
    headers={'Content-Type': 'application/json'},
    json={"address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "visible": true}
)

print(response.json())

Response

json{
  "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
  "balance": 85623170,
  "create_time": 1675582485000,
  "account_resource": {
    "energy_window_size": 28800000
  },
  "owner_permission": {
    "permission_name": "owner",
    "threshold": 1
  },
  "frozenV2": [
    {
      "type": "ENERGY"
    }
  ],
  "assetV2": [
    {
      "key": "1004977",
      "value": 8888880000
    }
  ]
}

Response Parameters

FieldTypeDescription
addressstringThe queried account address
balanceintegerTRX balance in SUN (1 TRX = 1,000,000 SUN)
frozenV2arrayStake 2.0 staking positions by resource type
account_resourceobjectEnergy-related resource state for the account
assetV2arrayTRC-10 asset balances held by the account

Use Cases

  • Balance Display: Show an account's TRX balance and assets
  • Staking State: Read an account's Stake 2.0 positions
  • Permission Checks: Read an account's owner and active permissions
  • Account Activation: Detect whether an address has been activated on-chain

Error Handling

HTTP StatusMessageDescription
200OKThe request succeeded; some TRON errors are returned in the 200 body as an Error field
400Bad requestThe request body is malformed or a required field is missing
500Internal errorThe node failed to process the request