From bd4c75fc18af6df7ce38b290b40a4ebfad1d9734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Mon, 4 Apr 2022 21:09:59 +0530 Subject: [PATCH] Gateio increased request timeout https://github.com/freqtrade/freqtrade/runs/5818814987?check_suite_focus=true --- freqtrade/exchange/gateio.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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)