From df8525d582c7e86390cb75434df2c6e91009cdd6 Mon Sep 17 00:00:00 2001 From: Gui Heise Date: Wed, 19 Jan 2022 17:03:06 -0500 Subject: [PATCH] Correct instance name --- mev_inspect/prices.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mev_inspect/prices.py b/mev_inspect/prices.py index 8e62169..62b3508 100644 --- a/mev_inspect/prices.py +++ b/mev_inspect/prices.py @@ -7,11 +7,11 @@ from mev_inspect.schemas.prices import COINGECKO_ID_BY_ADDRESS, TOKEN_ADDRESSES, def fetch_prices() -> List[Price]: - cg = CoinGeckoAPI() + coingecko_api = CoinGeckoAPI() prices = [] for token_address in TOKEN_ADDRESSES: - coingecko_price_data = cg.get_coin_market_chart_by_id( + coingecko_price_data = coingecko_api.get_coin_market_chart_by_id( id=COINGECKO_ID_BY_ADDRESS[token_address], vs_currency="usd", days="max", @@ -23,13 +23,13 @@ def fetch_prices() -> List[Price]: def fetch_prices_range(after: datetime, before: datetime) -> List[Price]: - cg = CoinGeckoAPI() + coingecko_api = CoinGeckoAPI() prices = [] after_unix = int(after.timestamp()) before_unix = int(before.timestamp()) for token_address in TOKEN_ADDRESSES: - coingecko_price_data = cg.get_coin_market_chart_range_by_id( + coingecko_price_data = coingecko_api.get_coin_market_chart_range_by_id( COINGECKO_ID_BY_ADDRESS[token_address], "usd", after_unix, before_unix )