Skip to content

Commit fade66a

Browse files
committed
fix: ensure we always have a price when checking stops
1 parent f63484d commit fade66a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

freqtrade/exchange/exchange.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
deep_merge_dicts,
105105
file_dump_json,
106106
file_load_json,
107+
safe_value_fallback,
107108
safe_value_fallback2,
108109
)
109110
from freqtrade.util import FtTTLCache, PeriodicCache, dt_from_ts, dt_now
@@ -1292,7 +1293,7 @@ def check_dry_limit_order_filled(
12921293
pair = order["symbol"]
12931294
if not orderbook and self.exchange_has("fetchL2OrderBook"):
12941295
orderbook = self.fetch_l2_order_book(pair, 20)
1295-
price = order[self._ft_has["stop_price_prop"]]
1296+
price = safe_value_fallback(order, self._ft_has["stop_price_prop"], "price")
12961297
crossed = self._dry_is_price_crossed(
12971298
pair, order["side"], price, orderbook, is_stop=True
12981299
)

0 commit comments

Comments
 (0)