From 3a15ffc79ea84e5ec6200545bcbf11fc6c1c6564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 8 May 2018 20:33:47 +0200 Subject: Add USDT rate to balances --- store.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'store.py') diff --git a/store.py b/store.py index 2a71bed..32c4121 100644 --- a/store.py +++ b/store.py @@ -305,7 +305,7 @@ class BalanceStore: return amounts def fetch_balances(self, tag=None, add_portfolio=False, - checkpoint=None, log_tickers=False, + checkpoint=None, log_tickers=False, add_usdt=False, ticker_currency="BTC", ticker_compute_value="average", ticker_type="total"): all_balances = self.market.ccxt.fetch_all_balances() for currency, balance in all_balances.items(): @@ -315,6 +315,8 @@ class BalanceStore: if add_portfolio: for currency in Portfolio.repartition(from_cache=True): self.all.setdefault(currency, portfolio.Balance(currency, {})) + if add_usdt: + self.all.setdefault("USDT", portfolio.Balance("USDT", {})) if log_tickers: tickers = self.in_currency(ticker_currency, compute_value=ticker_compute_value, type=ticker_type) self.market.report.log_balances(tag=tag, checkpoint=checkpoint, -- cgit v1.2.3