Lock execute_entry to prevent timing hickups
This commit is contained in:
parent
c593cdc438
commit
1b3e62bcbc
@ -381,6 +381,7 @@ class FreqtradeBot(LoggingMixin):
|
||||
|
||||
trades = Trade.get_open_trades_without_assigned_fees()
|
||||
for trade in trades:
|
||||
with self._exit_lock:
|
||||
if trade.is_open and not trade.fee_updated(trade.entry_side):
|
||||
order = trade.select_order(trade.entry_side, False)
|
||||
open_order = trade.select_order(trade.entry_side, True)
|
||||
|
@ -789,6 +789,7 @@ class RPC:
|
||||
if not order_type:
|
||||
order_type = self._freqtrade.strategy.order_types.get(
|
||||
'force_entry', self._freqtrade.strategy.order_types['entry'])
|
||||
with self._freqtrade._exit_lock:
|
||||
if self._freqtrade.execute_entry(pair, stake_amount, price,
|
||||
ordertype=order_type, trade=trade,
|
||||
is_short=is_short,
|
||||
|
Loading…
Reference in New Issue
Block a user