Add Trade.commit method for easy use

This commit is contained in:
Matthias
2021-04-15 07:57:52 +02:00
parent 6fb32c3594
commit a01d05997e
4 changed files with 15 additions and 10 deletions

View File

@@ -569,7 +569,7 @@ class RPC:
# Execute sell for all open orders
for trade in Trade.get_open_trades():
_exec_forcesell(trade)
Trade.query.session.commit()
Trade.commit()
self._freqtrade.wallets.update()
return {'result': 'Created sell orders for all open trades.'}
@@ -582,7 +582,7 @@ class RPC:
raise RPCException('invalid argument')
_exec_forcesell(trade)
Trade.query.session.commit()
Trade.commit()
self._freqtrade.wallets.update()
return {'result': f'Created sell order for trade {trade_id}.'}