Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pyth_observer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ async def get_coingecko_prices(self):
updates: Dict[str, int] = {} # Unix timestamps

for symbol in data:
if "usd" not in data[symbol] or "last_updated_at" not in data[symbol]:
logger.warning(
f"CoinGecko data for {symbol} doesn't include `usd` and/or `last_updated_at`. CoinGecko returned: {data[symbol]}."
)
continue

prices[symbol] = data[symbol]["usd"]
updates[symbol] = data[symbol]["last_updated_at"]

Expand Down