Query TRX balance

HTTP API:

wallet/getaccount
Description: Query an account information

demo: curl -X POST  http://127.0.0.1:8090/wallet/getaccount -d 
'{
    "address": "41E552F6487585C2B58BC2C9BB4492BC1F17132CD0"
}'
Parameter address: Default hexString
Return: Account object

Tronweb Example:

const privateKey = "..."; 
var address = "TM2TmqauSEiRf16CyFgzHV2BVxBejY9iyR";  
//Get account information,Query the trx balance by the balance in the return value.
tradeobj = await tronWeb.trx.getAccount(
      address,
).then(output => {console.log('- Output:', output, '\n');});

Wallet-cli Example:

#Usage : GetBalance Address
GetBalance TM2TmqauSEiRf16CyFgzHV2BVxBejY9iyR