mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Merge pull request #6630 from SmartManoj/patch-4
checking exchange name with lower
This commit is contained in:
commit
240ca421af
|
@ -102,7 +102,7 @@ def calculate_backoff(retrycount, max_retries):
|
|||
def retrier_async(f):
|
||||
async def wrapper(*args, **kwargs):
|
||||
count = kwargs.pop('count', API_RETRY_COUNT)
|
||||
kucoin = args[0].name == "Kucoin" # Check if the exchange is KuCoin.
|
||||
kucoin = args[0].name == "KuCoin" # Check if the exchange is KuCoin.
|
||||
try:
|
||||
return await f(*args, **kwargs)
|
||||
except TemporaryError as ex:
|
||||
|
|
|
@ -2130,7 +2130,8 @@ async def test__async_kucoin_get_candle_history(default_conf, mocker, caplog):
|
|||
"kucoin GET https://openapi-v2.kucoin.com/api/v1/market/candles?"
|
||||
"symbol=ETH-BTC&type=5min&startAt=1640268735&endAt=1640418735"
|
||||
"429 Too Many Requests" '{"code":"429000","msg":"Too Many Requests"}'))
|
||||
exchange = get_patched_exchange(mocker, default_conf, api_mock, id="kucoin")
|
||||
exchange = get_patched_exchange(mocker, default_conf, api_mock, id="KuCoin")
|
||||
mocker.patch('freqtrade.exchange.Exchange.name', PropertyMock(return_value='KuCoin'))
|
||||
|
||||
msg = "Kucoin 429 error, avoid triggering DDosProtection backoff delay"
|
||||
assert not num_log_has_re(msg, caplog)
|
||||
|
|
Loading…
Reference in New Issue
Block a user