/wallet/getaccount - Tron
Example code for the getaccount REST method. Complete guide on how to use getaccount REST method in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/wallet/getaccount' \
--header 'Content-Type: application/json' \
--data-raw '{
"address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
"visible": true
}'const response = await fetch(
'https://go.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());import requests
response = requests.post(
'https://go.getblock.io/<ACCESS-TOKEN>/wallet/getaccount',
headers={'Content-Type': 'application/json'},
json={"address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "visible": true}
)
print(response.json())Response
{
"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
Field
Type
Description
Use Cases
Error Handling
HTTP Status
Message
Description
Was this helpful?