Links

Checking Account Balances

View Account Balance of the Default Account

If you have a default key configured for sagacli (see Configuring a Default Key in sagacli), you can check its balance by typing:
sagacli account balance
This will print the balance of the account associated to the default key.
Example:
$ sagacli account balance
Amount Denom
------ -----
999999970000 tsaga

View Account Balance of any Account

To check the balance of any account on the network, just type
sagacli account balance --address <address of the account>
For example, to check the balance of an account associated with an example key called fundkey, execute the following command:
sagacli account balance --address saga14hyhswxf0shnpzup406yvjejmfsrjnvzq897re
This will print the balance (in tsaga) associated with this account. In this case, it prints:
$ sagacli account balance --address saga14hyhswxf0shnpzup406yvjejmfsrjnvzq897re
Amount Denom
------ -----
0 tsaga
You can retrieve the account number associated to a key by executing sagacli keys show -a <keyname>
Example:
$ sagacli keys show -a fundkey
saga14hyhswxf0shnpzup406yvjejmfsrjnvzq897re
It is also possible to combine the two commands i.e. getting the balance and getting the account number, so you do not need to execute two commands, one to get the account number from the key, and another to get the balance associated to that account.
Execute:
sagacli account balance --address $(sagacli keys show -a <keyname>)
Example:
$ sagacli account balance --address `sagacli keys show -a fundkey`
Amount Denom
------ -----
0 tsaga