mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
wallet sync added
This commit is contained in:
parent
606e41d574
commit
7cb8b28f58
|
@ -19,6 +19,7 @@ class Wallets(object):
|
|||
def __init__(self, exchange: Exchange) -> None:
|
||||
self.exchange = exchange
|
||||
self.wallets: Dict[str, self.wallet] = {}
|
||||
self._update_wallets()
|
||||
|
||||
def _update_wallets(self) -> None:
|
||||
balances = self.exchange.get_balances()
|
||||
|
@ -27,10 +28,11 @@ class Wallets(object):
|
|||
info = {
|
||||
'exchange': self.exchange.id,
|
||||
'currency': currency,
|
||||
'free': balances[currency['free']],
|
||||
'used': balances[currency['used']],
|
||||
'total': balances[currency['total']]
|
||||
'free': balances[currency]['free'],
|
||||
'used': balances[currency]['used'],
|
||||
'total': balances[currency]['total']
|
||||
}
|
||||
|
||||
self.wallets[currency] = self.wallet(**info)
|
||||
|
||||
logger.info('Wallets synced ...')
|
||||
|
|
Loading…
Reference in New Issue
Block a user