X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=helper.py;h=3e39785d4bb1a75d5bde324403161ddc3dcc053a;hb=97922ff1826cc6b9c0329cc30e8d4621bb2644ee;hp=8ef2d642203252c8d14ab9328ad1fbcb7e59a4d8;hpb=9f54fd9acf98692ff7601fd3236c46745eb26e15;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git 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")