File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1717 download_archive_trades ,
1818)
1919from freqtrade .exchange .common import retrier
20- from freqtrade .exchange .exchange_types import FtHas , Tickers
20+ from freqtrade .exchange .exchange_types import CcxtOrder , FtHas , Tickers
2121from freqtrade .exchange .exchange_utils_timeframe import timeframe_to_msecs
2222from freqtrade .misc import deep_merge_dicts , json_load
2323from freqtrade .util import FtTTLCache
@@ -145,6 +145,20 @@ def additional_exchange_init(self) -> None:
145145 except ccxt .BaseError as e :
146146 raise OperationalException (e ) from e
147147
148+ def fetch_stoploss_order (
149+ self , order_id : str , pair : str , params : dict | None = None
150+ ) -> CcxtOrder :
151+ if self .trading_mode == TradingMode .FUTURES :
152+ params = params or {}
153+ params .update ({"stop" : True })
154+ return self .fetch_order (order_id , pair , params )
155+
156+ def cancel_stoploss_order (self , order_id : str , pair : str , params : dict | None = None ) -> dict :
157+ if self .trading_mode == TradingMode .FUTURES :
158+ params = params or {}
159+ params .update ({"stop" : True })
160+ return self .cancel_order (order_id = order_id , pair = pair , params = params )
161+
148162 def get_historic_ohlcv (
149163 self ,
150164 pair : str ,
You can’t perform that action at this time.
0 commit comments