From 97922ff1826cc6b9c0329cc30e8d4621bb2644ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 12 Feb 2018 14:11:02 +0100 Subject: Add print_balances helper --- helper.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'helper.py') diff --git a/helper.py b/helper.py index 8ef2d64..3e39785 100644 --- a/helper.py +++ b/helper.py @@ -118,6 +118,14 @@ def print_orders(market, base_currency="BTC"): print(balance) TradeStore.print_all_with_order() +def print_balances(market, base_currency="BTC"): + BalanceStore.fetch_balances(market) + for currency, balance in BalanceStore.all.items(): + print(balance) + if base_currency is not None: + print("total:") + print(sum(BalanceStore.in_currency(base_currency, market).values())) + def process_sell_needed__1_sell(market, base_currency="BTC", debug=False): prepare_trades(market, base_currency=base_currency, debug=debug) TradeStore.prepare_orders(compute_value="average", only="dispose") -- cgit v1.2.3