/wallet/getaccountnet¶
Query an account's bandwidth (Net) usage. Deprecated — prefer /wallet/getaccountresource.
- Source:
framework/src/main/java/org/tron/core/services/http/GetAccountNetServlet.java - Method:
GET/POST
Request parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
address |
string | Yes | Account address |
visible |
bool | No | Address format |
Example:
curl --request POST \
--url https://nile.trongrid.io/wallet/getaccountnet \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"address": "41dd791d6b49e190062d650e6a23c575510d35f2f9"
}
'
Response¶
Returns api.AccountNetMessage (protocol/src/main/protos/api/api.proto):
| Field | Type | Description |
|---|---|---|
freeNetUsed |
int64 | Free bandwidth used |
freeNetLimit |
int64 | Free bandwidth quota (resets every 24h) |
NetUsed |
int64 | Staked bandwidth used |
NetLimit |
int64 | Staked bandwidth quota |
assetNetUsed |
map\<string,int64> | Per-TRC10 bandwidth used |
assetNetLimit |
map\<string,int64> | Per-TRC10 bandwidth quota |
TotalNetLimit |
int64 | Network-wide total bandwidth quota |
TotalNetWeight |
int64 | Network-wide total staked TRX for bandwidth |
Response example:
{
"freeNetUsed": 441,
"freeNetLimit": 600,
"assetNetUsed": [
{ "key": "1005416", "value": 0 }
],
"assetNetLimit": [
{ "key": "1005416", "value": 10000 }
],
"TotalNetLimit": 43200000000,
"TotalNetWeight": 68305209098
}
Returns {} if address is missing or the account does not exist.
Error responses¶
| Trigger | Response |
|---|---|
Request body exceeds node.maxMessageSize (POST) |
{"Error": "class java.lang.Exception : body size is too big, the limit is <N>"} |
address is not valid base58check (visible=true) |
GET: non-base58 characters → {"Error": "class java.lang.IllegalArgumentException : <details>"}; checksum-only error makes Util.getHexAddress silently return an empty string, the lookup misses and {} is returned. POST (via JsonFormat.merge): non-base58 characters → {"Error": "class org.tron.core.services.http.JsonFormat$ParseException : <pos>: INVALID base58 String, ..."}; checksum-only error → {"Error": "class java.lang.NullPointerException : null"} |
address is not valid hex (visible=false) |
{"Error": "class org.bouncycastle.util.encoders.DecoderException : <message>"} (GET); {"Error": "class org.tron.core.services.http.JsonFormat$ParseException : <message>"} (POST) |
| Request body is not valid JSON / field type mismatch (POST) | {"Error": "class com.alibaba.fastjson.JSONException : <parser info>"} or {"Error": "class org.tron.core.services.http.JsonFormat$ParseException : <decoder info>"} |
| Other exceptions | {"Error": "<exceptionClass> : <message>"} |