Don't use separate position field in /currency endpoint

This commit is contained in:
Matthias
2022-02-19 16:28:51 +01:00
parent 4b27bd9838
commit a2b17882e6
4 changed files with 30 additions and 20 deletions

View File

@@ -118,8 +118,10 @@ class Wallets:
for currency in deepcopy(self._wallets):
if currency not in balances:
del self._wallets[currency]
# TODO-lev: Implement dry-run/backtest counterpart
positions = self._exchange.get_positions()
self._positions = []
for position in positions:
symbol = position['symbol']
if position['side'] is None or position['collateral'] == 0.0: