balance: filter currencies with 0.0 balances
This commit is contained in:
parent
ea1b1e11ea
commit
26468bef83
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user