diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-27 11:19:55 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-27 11:19:55 +0200 |
commit | 8e648fd5b8d10c8f68b30ee0c30f02d5b60a1b77 (patch) | |
tree | d63560104b41c11c12591ceaf3fa7000fc99856c /store.py | |
parent | 8f98e46aa52f4e229ae4f44cd9cc49f9fad9c866 (diff) | |
download | Trader-8e648fd5b8d10c8f68b30ee0c30f02d5b60a1b77.tar.gz Trader-8e648fd5b8d10c8f68b30ee0c30f02d5b60a1b77.tar.zst Trader-8e648fd5b8d10c8f68b30ee0c30f02d5b60a1b77.zip |
Use market options for fetch balances
Diffstat (limited to 'store.py')
-rw-r--r-- | store.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -304,7 +304,7 @@ class BalanceStore: | |||
304 | compute_value, type) | 304 | compute_value, type) |
305 | return amounts | 305 | return amounts |
306 | 306 | ||
307 | def fetch_balances(self, tag=None, add_portfolio=False, | 307 | def fetch_balances(self, tag=None, add_portfolio=False, liquidity="medium", |
308 | checkpoint=None, log_tickers=False, add_usdt=False, | 308 | checkpoint=None, log_tickers=False, add_usdt=False, |
309 | ticker_currency="BTC", ticker_compute_value="average", ticker_type="total"): | 309 | ticker_currency="BTC", ticker_compute_value="average", ticker_type="total"): |
310 | all_balances = self.market.ccxt.fetch_all_balances() | 310 | all_balances = self.market.ccxt.fetch_all_balances() |
@@ -313,7 +313,7 @@ class BalanceStore: | |||
313 | currency in self.all: | 313 | currency in self.all: |
314 | self.all[currency] = portfolio.Balance(currency, balance) | 314 | self.all[currency] = portfolio.Balance(currency, balance) |
315 | if add_portfolio: | 315 | if add_portfolio: |
316 | for currency in Portfolio.repartition(from_cache=True): | 316 | for currency in Portfolio.repartition(from_cache=True, liquidity=liquidity): |
317 | self.all.setdefault(currency, portfolio.Balance(currency, {})) | 317 | self.all.setdefault(currency, portfolio.Balance(currency, {})) |
318 | if add_usdt: | 318 | if add_usdt: |
319 | self.all.setdefault("USDT", portfolio.Balance("USDT", {})) | 319 | self.all.setdefault("USDT", portfolio.Balance("USDT", {})) |