chore: rename flag to better match what it does

This commit is contained in:
Matthias
2025-12-16 20:44:06 +01:00
parent c8d74baaa1
commit c63fba2e57
6 changed files with 8 additions and 8 deletions

View File

@@ -51,7 +51,7 @@ class Binance(Exchange):
"funding_fee_candle_limit": 1000,
"stoploss_order_types": {"limit": "stop", "market": "stop_market"},
"stoploss_blocks_assets": False, # Stoploss orders do not block assets
"stoploss_fetch_requires_stop_param": True,
"stoploss_query_requires_stop_flag": True,
"stoploss_algo_order_info_id": "actualOrderId",
"tickers_have_price": False,
"floor_leverage": True,

View File

@@ -31,7 +31,7 @@ class Bitget(Exchange):
"stop_price_prop": "stopPrice",
"stoploss_blocks_assets": False, # Stoploss orders do not block assets
"stoploss_order_types": {"limit": "limit", "market": "market"},
"stoploss_fetch_requires_stop_param": True,
"stoploss_query_requires_stop_flag": True,
"ohlcv_candle_limit": 200, # 200 for historical candles, 1000 for recent ones.
"order_time_in_force": ["GTC", "FOK", "IOC", "PO"],
}

View File

@@ -132,7 +132,7 @@ class Exchange:
"stop_price_prop": "stopLossPrice", # Used for stoploss_on_exchange response parsing
"stoploss_order_types": {},
"stoploss_blocks_assets": True, # By default stoploss orders block assets
"stoploss_fetch_requires_stop_param": False, # Require "stop": True" to fetch stop orders
"stoploss_query_requires_stop_flag": False, # Require "stop": True" to fetch stop orders
"order_time_in_force": ["GTC"],
"ohlcv_params": {},
"ohlcv_has_history": True, # Some exchanges (Kraken) don't provide history via ohlcv
@@ -1688,7 +1688,7 @@ class Exchange:
def fetch_stoploss_order(
self, order_id: str, pair: str, params: dict | None = None
) -> CcxtOrder:
if self.get_option("stoploss_fetch_requires_stop_param"):
if self.get_option("stoploss_query_requires_stop_flag"):
params = params or {}
params["stop"] = True
order = self.fetch_order(order_id, pair, params)
@@ -1760,7 +1760,7 @@ class Exchange:
raise OperationalException(e) from e
def cancel_stoploss_order(self, order_id: str, pair: str, params: dict | None = None) -> dict:
if self.get_option("stoploss_fetch_requires_stop_param"):
if self.get_option("stoploss_query_requires_stop_flag"):
params = params or {}
params["stop"] = True
return self.cancel_order(order_id, pair, params)

View File

@@ -19,7 +19,7 @@ class FtHas(TypedDict, total=False):
stop_price_type_value_mapping: dict
stoploss_order_types: dict[str, str]
stoploss_blocks_assets: bool
stoploss_fetch_requires_stop_param: bool
stoploss_query_requires_stop_flag: bool
stoploss_algo_order_info_id: str
# ohlcv
ohlcv_params: dict

View File

@@ -30,7 +30,7 @@ class Gate(Exchange):
"stoploss_order_types": {"limit": "limit"},
"stop_price_param": "stopPrice",
"stop_price_prop": "stopPrice",
"stoploss_fetch_requires_stop_param": True,
"stoploss_query_requires_stop_flag": True,
"stoploss_algo_order_info_id": "fired_order_id",
"l2_limit_upper": 1000,
"marketOrderRequiresPrice": True,

View File

@@ -31,7 +31,7 @@ class Okx(Exchange):
"ohlcv_candle_limit": 100, # Warning, special case with data prior to X months
"stoploss_order_types": {"limit": "limit"},
"stoploss_on_exchange": True,
"stoploss_fetch_requires_stop_param": True,
"stoploss_query_requires_stop_flag": True,
"trades_has_history": False, # Endpoint doesn't have a "since" parameter
"ws_enabled": True,
}