From 65daff5eff7f356b1e46608df25584d13c49876f Mon Sep 17 00:00:00 2001 From: Morty Space Date: Mon, 18 May 2020 00:27:37 +0300 Subject: [PATCH] Fixed retry when we have too many requests --- src/cryptocom/exchange/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cryptocom/exchange/api.py b/src/cryptocom/exchange/api.py index 0f94c04..442341e 100644 --- a/src/cryptocom/exchange/api.py +++ b/src/cryptocom/exchange/api.py @@ -113,6 +113,9 @@ class ApiProvider: await asyncio.sleep(1) continue except ContentTypeError: + if resp.status == 429: + await asyncio.sleep(1) + continue text = await resp.text() raise ApiError( f"Can't decode json, content: {text}. "