diff --git a/common/cg_Crypto.py b/common/cg_Crypto.py index c8ab296..4421b6b 100644 --- a/common/cg_Crypto.py +++ b/common/cg_Crypto.py @@ -38,8 +38,9 @@ class cg_Crypto: # Make sure API returned a proper status code if resp.status_code == 429: + log.warning(f"CoinGecko returned 429 - Too Many Requests for endpoint: {endpoint}. Sleeping and trying again.") time.sleep(10) - log.warning(f"CoinGecko returned 429 - Too Many Requests for endpoint: {endpoint}") + self.get(endpoint=endpoint,params=params,timeout=timeout) try: resp.raise_for_status()