diff --git a/app/economy/management/commands/get_prices.py b/app/economy/management/commands/get_prices.py index 86ccfabbb0c..8968b2c19aa 100644 --- a/app/economy/management/commands/get_prices.py +++ b/app/economy/management/commands/get_prices.py @@ -148,6 +148,8 @@ def coingecko(source, tokens): url = f'https://api.coingecko.com/api/v3/simple/price?ids={token_str}&vs_currencies=usd,eth' + print(url) + response = requests.get(url).json() for token in tokens: @@ -358,15 +360,6 @@ def handle(self, *args, **options): except Exception as e: print(e) - if not options['perform_obj_updates']: - return - - try: - print('cryptocompare') - cryptocompare() - except Exception as e: - print(e) - try: source = 'coingecko' coingecko_tokens = approved_tokens.filter(conversion_rate_source=source) @@ -376,6 +369,15 @@ def handle(self, *args, **options): except Exception as e: print(e) + if not options['perform_obj_updates']: + return + + try: + print('cryptocompare') + cryptocompare() + except Exception as e: + print(e) + try: print('refresh') refresh_bounties()