mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-26 08:50:47 +00:00
chore: improve log on adjust_entry_price cancels
This commit is contained in:
@@ -1695,7 +1695,7 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
)
|
)
|
||||||
if not res:
|
if not res:
|
||||||
self.replace_order_failed(
|
self.replace_order_failed(
|
||||||
trade, f"Could not cancel order for {trade}, therefore not replacing."
|
trade, f"Could not fully cancel order for {trade}, therefore not replacing."
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
if adjusted_entry_price:
|
if adjusted_entry_price:
|
||||||
|
|||||||
@@ -2053,7 +2053,7 @@ def test_adjust_entry_replace_fail(
|
|||||||
assert len(trades) == 0
|
assert len(trades) == 0
|
||||||
assert len(Order.session.scalars(select(Order)).all()) == 0
|
assert len(Order.session.scalars(select(Order)).all()) == 0
|
||||||
assert fetch_order_mock.call_count == 4
|
assert fetch_order_mock.call_count == 4
|
||||||
assert log_has_re(r"Could not cancel order.*, therefore not replacing\.", caplog)
|
assert log_has_re(r"Could not fully cancel order.*, therefore not replacing\.", caplog)
|
||||||
|
|
||||||
# Entry adjustment is called
|
# Entry adjustment is called
|
||||||
assert freqtrade.strategy.adjust_entry_price.call_count == 1
|
assert freqtrade.strategy.adjust_entry_price.call_count == 1
|
||||||
|
|||||||
Reference in New Issue
Block a user