The official iota-cli app on the IOTA repo has a balance command which is supposed to calculate the balance for the logged in seed.
Sometimes, the command takes ages. I wondered and looked into the code. It seems, as if the balances command first calls getNewAddress. Why is that?
Here is the code: https://github.com/iotaledger/cli-app/blob/9266d7af4de57be0f70ce5b8778981301d5c0657/lib/commands/balance.js#L26