Skip to content

Commit f08c0c9

Browse files
committed
feat: bybit - set defaultSettle to allow fetchPositions to work in usdc markets
1 parent 3b5b8bd commit f08c0c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

freqtrade/exchange/bybit.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from freqtrade.exchange import Exchange
1010
from freqtrade.exchange.common import retrier
1111
from freqtrade.exchange.exchange_types import CcxtOrder, FtHas
12+
from freqtrade.misc import deep_merge_dicts
1213

1314

1415
logger = logging.getLogger(__name__)
@@ -73,7 +74,9 @@ def _ccxt_config(self) -> dict:
7374
config = {}
7475
if self.trading_mode == TradingMode.SPOT:
7576
config.update({"options": {"defaultType": "spot"}})
76-
config.update(super()._ccxt_config)
77+
elif self.trading_mode == TradingMode.FUTURES:
78+
config.update({"options": {"defaultSettle": self._config["stake_currency"]}})
79+
config = deep_merge_dicts(config, super()._ccxt_config)
7780
return config
7881

7982
@retrier

0 commit comments

Comments
 (0)