Skip to main content
Version: IOTA

Check a Balance

Faucet Service

You can use the faucet service to send test tokens to any Chrysalis devnet address.

Client.getBalance(seed: String)

Combines Client.getAddresses() and Client.getAddressBalance() api calls. It returns a combined balance for the provided seed.

Client.getAddressBalance(address: String)

Expects a single address in Bech32 format and returns dict with a balance for the address.

Client.getAddressBalances(addresses: String[])

A convenient function that expects list of addresses in Bech32 format and returns list of dict with balances for all given addresses.

Client.getAddress().balance(address: String)

You can use the GetAdressBuilder on a Client instance and query for and addresses' balances by chaining a call to the balance(address: String) function.

Client.getAddress().outputs(address: String, options: OutputOptions)

You can use the GetAdressBuilder on a Client instance and query for and addresses' balances by chaining a call to the outputs(address: String) function.

bindings/java/examples/java-app/src/main/java/org/iota/client/example/ExampleApp.java
loading...

Example output:

Account balance: 1096055332i

The balance of "atoi1qzt0nhsf38nh6rs4p6zs5knqp6psgha9wsv74uajqgjmwc75ugupx3y7x0r" is 451055332i

The outputs of address "atoi1qzt0nhsf38nh6rs4p6zs5knqp6psgha9wsv74uajqgjmwc75ugupx3y7x0r" are: [
UtxoInput(741673db85f78ebd95d04b572d1bf32e9207bbd265d90dbbe499a6d32f2b25470000),
UtxoInput(ed33089c623c67eb06dbc1c10b0c1c0424b0ace04a2e44070702668b3de440c80000),
UtxoInput(0af84c860dc461730064e7c4c88152ed8bea1ae72b1d6f5e4ab0c3e51ed185b70100),
...]
  • dustAllowed indicates whether the given address is allowed to accept a dust. You can learn more about dust protection in the Chrysalis documentation.