From 3192af8df8df069e9a0e582ee2a1b4ebf867757a Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 31 Dec 2022 09:07:07 +0100 Subject: [PATCH] Limit bybit futures markets to USDT --- freqtrade/exchange/bybit.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/freqtrade/exchange/bybit.py b/freqtrade/exchange/bybit.py index dd3d74e84..8a949fbbb 100644 --- a/freqtrade/exchange/bybit.py +++ b/freqtrade/exchange/bybit.py @@ -1,6 +1,6 @@ """ Bybit exchange subclass """ import logging -from typing import Dict, List, Optional, Tuple +from typing import Any, Dict, List, Optional, Tuple from freqtrade.enums import MarginMode, TradingMode from freqtrade.exchange import Exchange @@ -51,6 +51,13 @@ class Bybit(Exchange): config.update(super()._ccxt_config) return config + def market_is_future(self, market: Dict[str, Any]) -> bool: + main = super().market_is_future(market) + # For ByBit, we'll only support USDT markets for now. + return ( + main and market['settle'] == 'USDT' + ) + async def _fetch_funding_rate_history( self, pair: str,