mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Require opt-in for ws enablement to allow slow rollout
This commit is contained in:
parent
e31d8313f2
commit
137ddb2ec3
|
@ -129,6 +129,7 @@ class Exchange:
|
|||
"marketOrderRequiresPrice": False,
|
||||
"exchange_has_overrides": {}, # Dictionary overriding ccxt's "has".
|
||||
# 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_futures: Dict = {}
|
||||
|
@ -229,7 +230,7 @@ class Exchange:
|
|||
)
|
||||
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._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
|
||||
if exchange_conf.get("enable_ws", True) and self._has_watch_ohlcv:
|
||||
self._exchange_ws = ExchangeWS(self._config, self._ws_async)
|
||||
|
|
Loading…
Reference in New Issue
Block a user