mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-16 04:41:15 +00:00
Require opt-in for ws enablement to allow slow rollout
This commit is contained in:
@@ -129,6 +129,7 @@ class Exchange:
|
|||||||
"marketOrderRequiresPrice": False,
|
"marketOrderRequiresPrice": False,
|
||||||
"exchange_has_overrides": {}, # Dictionary overriding ccxt's "has".
|
"exchange_has_overrides": {}, # Dictionary overriding ccxt's "has".
|
||||||
# Expected to be in the format {"fetchOHLCV": True} or {"fetchOHLCV": False}
|
# Expected to be in the format {"fetchOHLCV": True} or {"fetchOHLCV": False}
|
||||||
|
"ws.enabled": False, # Set to true for exchanges with tested websocket support
|
||||||
}
|
}
|
||||||
_ft_has: Dict = {}
|
_ft_has: Dict = {}
|
||||||
_ft_has_futures: Dict = {}
|
_ft_has_futures: Dict = {}
|
||||||
@@ -229,7 +230,7 @@ class Exchange:
|
|||||||
)
|
)
|
||||||
self._api_async = self._init_ccxt(exchange_conf, False, ccxt_async_config)
|
self._api_async = self._init_ccxt(exchange_conf, False, ccxt_async_config)
|
||||||
self._ws_async = self._init_ccxt(exchange_conf, False, ccxt_async_config)
|
self._ws_async = self._init_ccxt(exchange_conf, False, ccxt_async_config)
|
||||||
self._has_watch_ohlcv = self.exchange_has("watchOHLCV")
|
self._has_watch_ohlcv = self.exchange_has("watchOHLCV") and self._ft_has["ws.enabled"]
|
||||||
self._exchange_ws: Optional[ExchangeWS] = None
|
self._exchange_ws: Optional[ExchangeWS] = None
|
||||||
if exchange_conf.get("enable_ws", True) and self._has_watch_ohlcv:
|
if exchange_conf.get("enable_ws", True) and self._has_watch_ohlcv:
|
||||||
self._exchange_ws = ExchangeWS(self._config, self._ws_async)
|
self._exchange_ws = ExchangeWS(self._config, self._ws_async)
|
||||||
|
|||||||
Reference in New Issue
Block a user