update wallets after forcesell

This commit is contained in:
Matthias 2020-01-22 19:54:55 +01:00
parent 2b4d821d30
commit 58ceda4b90

View File

@ -425,6 +425,7 @@ class RPC:
for trade in Trade.get_open_trades(): for trade in Trade.get_open_trades():
_exec_forcesell(trade) _exec_forcesell(trade)
Trade.session.flush() Trade.session.flush()
self._freqtrade.wallets.update()
return {'result': 'Created sell orders for all open trades.'} return {'result': 'Created sell orders for all open trades.'}
# Query for trade # Query for trade
@ -437,6 +438,7 @@ class RPC:
_exec_forcesell(trade) _exec_forcesell(trade)
Trade.session.flush() Trade.session.flush()
self._freqtrade.wallets.update()
return {'result': f'Created sell order for trade {trade_id}.'} return {'result': f'Created sell order for trade {trade_id}.'}
def _rpc_forcebuy(self, pair: str, price: Optional[float]) -> Optional[Trade]: def _rpc_forcebuy(self, pair: str, price: Optional[float]) -> Optional[Trade]: