Merge pull request #13053 from ABSllk/fix-bitget-stoploss
bitget - update stopLossPrice mapping for futures
This commit is contained in:
@@ -38,6 +38,8 @@ class Bitget(Exchange):
|
|||||||
_ft_has_futures: FtHas = {
|
_ft_has_futures: FtHas = {
|
||||||
"funding_fee_candle_limit": 100,
|
"funding_fee_candle_limit": 100,
|
||||||
"has_delisting": True,
|
"has_delisting": True,
|
||||||
|
"stop_price_param": "stopLossPrice",
|
||||||
|
"stop_price_prop": "stopLossPrice",
|
||||||
"stop_price_type_field": "triggerType",
|
"stop_price_type_field": "triggerType",
|
||||||
"stop_price_type_value_mapping": {
|
"stop_price_type_value_mapping": {
|
||||||
PriceType.LAST: "fill_price",
|
PriceType.LAST: "fill_price",
|
||||||
@@ -99,9 +101,15 @@ class Bitget(Exchange):
|
|||||||
return order
|
return order
|
||||||
|
|
||||||
def _fetch_stop_order_fallback(self, order_id: str, pair: str) -> CcxtOrder:
|
def _fetch_stop_order_fallback(self, order_id: str, pair: str) -> CcxtOrder:
|
||||||
params2 = {
|
# old stoploss orders
|
||||||
"stop": True,
|
paramsold = {"stop": True}
|
||||||
}
|
# new stoploss orders with stopLossPrice (used in futures starting 2026.4)
|
||||||
|
paramsnew = {"planType": "profit_loss"}
|
||||||
|
params_to_try = (
|
||||||
|
(paramsnew, paramsold) if self.trading_mode == TradingMode.FUTURES else (paramsold,)
|
||||||
|
)
|
||||||
|
|
||||||
|
for params2 in params_to_try:
|
||||||
for method in (
|
for method in (
|
||||||
self._api.fetch_open_orders,
|
self._api.fetch_open_orders,
|
||||||
self._api.fetch_canceled_and_closed_orders,
|
self._api.fetch_canceled_and_closed_orders,
|
||||||
|
|||||||
Reference in New Issue
Block a user