fix: avoid warning for dry stoploss orders
This commit is contained in:
@@ -1156,7 +1156,7 @@ class Exchange:
|
|||||||
orderbook: OrderBook | None = None
|
orderbook: OrderBook | None = None
|
||||||
if self.exchange_has("fetchL2OrderBook"):
|
if self.exchange_has("fetchL2OrderBook"):
|
||||||
orderbook = self.fetch_l2_order_book(pair, 20)
|
orderbook = self.fetch_l2_order_book(pair, 20)
|
||||||
if ordertype == "limit" and orderbook:
|
if not stop_loss and ordertype == "limit" and orderbook:
|
||||||
# Allow a 1% price difference
|
# Allow a 1% price difference
|
||||||
allowed_diff = 0.01
|
allowed_diff = 0.01
|
||||||
if self._dry_is_price_crossed(pair, side, rate, orderbook, allowed_diff):
|
if self._dry_is_price_crossed(pair, side, rate, orderbook, allowed_diff):
|
||||||
|
|||||||
Reference in New Issue
Block a user