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

View File

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