diff --git a/freqtrade/exchange/gateio.py b/freqtrade/exchange/gateio.py index 609cf4901..2c02b83d8 100644 --- a/freqtrade/exchange/gateio.py +++ b/freqtrade/exchange/gateio.py @@ -1,13 +1,16 @@ """ Gate.io exchange subclass """ import logging from datetime import datetime -from typing import Dict, List, Optional, Tuple +from typing import Any, Dict, List, Optional, Tuple +import ccxt from freqtrade.enums import MarginMode, TradingMode from freqtrade.exceptions import OperationalException from freqtrade.exchange import Exchange +CcxtModuleType = Any + logger = logging.getLogger(__name__) @@ -39,6 +42,11 @@ class Gateio(Exchange): (TradingMode.FUTURES, MarginMode.ISOLATED) ] + def _init_ccxt(self, exchange_config: Dict[str, Any], ccxt_module: CcxtModuleType = ccxt, + ccxt_kwargs: Dict = {}) -> ccxt.Exchange: + ccxt_kwargs.update({"timeout": 15000}) + super()._init_ccxt(exchange_config, ccxt_module, ccxt_kwargs) + def validate_ordertypes(self, order_types: Dict) -> None: super().validate_ordertypes(order_types)