chore: rename flag to better match what it does
This commit is contained in:
@@ -51,7 +51,7 @@ class Binance(Exchange):
|
|||||||
"funding_fee_candle_limit": 1000,
|
"funding_fee_candle_limit": 1000,
|
||||||
"stoploss_order_types": {"limit": "stop", "market": "stop_market"},
|
"stoploss_order_types": {"limit": "stop", "market": "stop_market"},
|
||||||
"stoploss_blocks_assets": False, # Stoploss orders do not block assets
|
"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",
|
"stoploss_algo_order_info_id": "actualOrderId",
|
||||||
"tickers_have_price": False,
|
"tickers_have_price": False,
|
||||||
"floor_leverage": True,
|
"floor_leverage": True,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class Bitget(Exchange):
|
|||||||
"stop_price_prop": "stopPrice",
|
"stop_price_prop": "stopPrice",
|
||||||
"stoploss_blocks_assets": False, # Stoploss orders do not block assets
|
"stoploss_blocks_assets": False, # Stoploss orders do not block assets
|
||||||
"stoploss_order_types": {"limit": "limit", "market": "market"},
|
"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.
|
"ohlcv_candle_limit": 200, # 200 for historical candles, 1000 for recent ones.
|
||||||
"order_time_in_force": ["GTC", "FOK", "IOC", "PO"],
|
"order_time_in_force": ["GTC", "FOK", "IOC", "PO"],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class Exchange:
|
|||||||
"stop_price_prop": "stopLossPrice", # Used for stoploss_on_exchange response parsing
|
"stop_price_prop": "stopLossPrice", # Used for stoploss_on_exchange response parsing
|
||||||
"stoploss_order_types": {},
|
"stoploss_order_types": {},
|
||||||
"stoploss_blocks_assets": True, # By default stoploss orders block assets
|
"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"],
|
"order_time_in_force": ["GTC"],
|
||||||
"ohlcv_params": {},
|
"ohlcv_params": {},
|
||||||
"ohlcv_has_history": True, # Some exchanges (Kraken) don't provide history via ohlcv
|
"ohlcv_has_history": True, # Some exchanges (Kraken) don't provide history via ohlcv
|
||||||
@@ -1688,7 +1688,7 @@ class Exchange:
|
|||||||
def fetch_stoploss_order(
|
def fetch_stoploss_order(
|
||||||
self, order_id: str, pair: str, params: dict | None = None
|
self, order_id: str, pair: str, params: dict | None = None
|
||||||
) -> CcxtOrder:
|
) -> CcxtOrder:
|
||||||
if self.get_option("stoploss_fetch_requires_stop_param"):
|
if self.get_option("stoploss_query_requires_stop_flag"):
|
||||||
params = params or {}
|
params = params or {}
|
||||||
params["stop"] = True
|
params["stop"] = True
|
||||||
order = self.fetch_order(order_id, pair, params)
|
order = self.fetch_order(order_id, pair, params)
|
||||||
@@ -1760,7 +1760,7 @@ class Exchange:
|
|||||||
raise OperationalException(e) from e
|
raise OperationalException(e) from e
|
||||||
|
|
||||||
def cancel_stoploss_order(self, order_id: str, pair: str, params: dict | None = None) -> dict:
|
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 = params or {}
|
||||||
params["stop"] = True
|
params["stop"] = True
|
||||||
return self.cancel_order(order_id, pair, params)
|
return self.cancel_order(order_id, pair, params)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class FtHas(TypedDict, total=False):
|
|||||||
stop_price_type_value_mapping: dict
|
stop_price_type_value_mapping: dict
|
||||||
stoploss_order_types: dict[str, str]
|
stoploss_order_types: dict[str, str]
|
||||||
stoploss_blocks_assets: bool
|
stoploss_blocks_assets: bool
|
||||||
stoploss_fetch_requires_stop_param: bool
|
stoploss_query_requires_stop_flag: bool
|
||||||
stoploss_algo_order_info_id: str
|
stoploss_algo_order_info_id: str
|
||||||
# ohlcv
|
# ohlcv
|
||||||
ohlcv_params: dict
|
ohlcv_params: dict
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class Gate(Exchange):
|
|||||||
"stoploss_order_types": {"limit": "limit"},
|
"stoploss_order_types": {"limit": "limit"},
|
||||||
"stop_price_param": "stopPrice",
|
"stop_price_param": "stopPrice",
|
||||||
"stop_price_prop": "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",
|
"stoploss_algo_order_info_id": "fired_order_id",
|
||||||
"l2_limit_upper": 1000,
|
"l2_limit_upper": 1000,
|
||||||
"marketOrderRequiresPrice": True,
|
"marketOrderRequiresPrice": True,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class Okx(Exchange):
|
|||||||
"ohlcv_candle_limit": 100, # Warning, special case with data prior to X months
|
"ohlcv_candle_limit": 100, # Warning, special case with data prior to X months
|
||||||
"stoploss_order_types": {"limit": "limit"},
|
"stoploss_order_types": {"limit": "limit"},
|
||||||
"stoploss_on_exchange": True,
|
"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
|
"trades_has_history": False, # Endpoint doesn't have a "since" parameter
|
||||||
"ws_enabled": True,
|
"ws_enabled": True,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user