position size fixed

This commit is contained in:
misagh
2018-11-28 15:36:32 +01:00
parent 159ac6e657
commit e9305b6592
3 changed files with 33 additions and 4 deletions

View File

@@ -40,6 +40,28 @@ class Wallets(object):
else:
return 0
def get_used(self, currency) -> float:
if self.exchange._conf['dry_run']:
return 999.9
balance = self.wallets.get(currency)
if balance and balance.used:
return balance.used
else:
return 0
def get_total(self, currency) -> float:
if self.exchange._conf['dry_run']:
return 999.9
balance = self.wallets.get(currency)
if balance and balance.total:
return balance.total
else:
return 0
def update(self) -> None:
balances = self.exchange.get_balances()