mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
rollback on process_open_trade_positions. Adjust position only if there is no open order, change will be made on other PR
This commit is contained in:
parent
714822c93c
commit
79ce1ddaef
|
@ -713,13 +713,14 @@ class FreqtradeBot(LoggingMixin):
|
||||||
"""
|
"""
|
||||||
# Walk through each pair and check if it needs changes
|
# Walk through each pair and check if it needs changes
|
||||||
for trade in Trade.get_open_trades():
|
for trade in Trade.get_open_trades():
|
||||||
# Do a wallets update (will be ratelimited to once per hour)
|
if not trade.has_open_orders:
|
||||||
self.wallets.update(False)
|
# Do a wallets update (will be ratelimited to once per hour)
|
||||||
try:
|
self.wallets.update(False)
|
||||||
self.check_and_call_adjust_trade_position(trade)
|
try:
|
||||||
except DependencyException as exception:
|
self.check_and_call_adjust_trade_position(trade)
|
||||||
logger.warning(
|
except DependencyException as exception:
|
||||||
f"Unable to adjust position of trade for {trade.pair}: {exception}")
|
logger.warning(
|
||||||
|
f"Unable to adjust position of trade for {trade.pair}: {exception}")
|
||||||
|
|
||||||
def check_and_call_adjust_trade_position(self, trade: Trade):
|
def check_and_call_adjust_trade_position(self, trade: Trade):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user