balance: filter currencies with 0.0 balances

This commit is contained in:
gcarq 2017-10-31 00:29:22 +01:00
parent ea1b1e11ea
commit 26468bef83
1 changed files with 3 additions and 3 deletions

View File

@ -205,14 +205,14 @@ def _profit(bot: Bot, update: Update) -> None:
@authorized_only @authorized_only
def _balance(bot: Bot, update: Update) -> None: def _balance(bot: Bot, update: Update) -> None:
""" """
Hander for /balance Handler for /balance
Returns current account balance per crypto Returns current account balance per crypto
""" """
output = "" output = ""
balances = exchange.get_balances() balances = exchange.get_balances()
for currency in balances: for currency in balances:
if not currency['Balance'] and not currency['Available'] and not currency['Pending']:
continue
output += """*Currency*: {Currency} output += """*Currency*: {Currency}
*Available*: {Available} *Available*: {Available}
*Balance*: {Balance} *Balance*: {Balance}