Get account balance
Constructor
Description
new AccountBalanceQueryMethods
Method
Type
Description
//Create the query
AccountBalanceQuery query = new AccountBalanceQuery()
.setAccountId(newAccountId);
//Sign with the client operator account private key and submit to a Hedera network
Hbar accountBalance = query.execute(client);
System.out.println(accountBalance);
//v1.3.2//Create the query
const query = new AccountBalanceQuery()
.setAccountId(newAccountId);
//Sign with the client operator account private key and submit to a Hedera network
Hbar accountBalance = await query.execute(client);
console.log(accountBalance);
//v1.4.4Last updated