Skip to content

Commit 1235b4a

Browse files
authored
Merge pull request #10572 from f321x/fix_coingecko
exchange rate: fix coingecko api
2 parents 3304d76 + 9827734 commit 1235b4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

electrum/exchange_rate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ class CoinGecko(ExchangeBase):
447447
async def get_rates(self, ccy):
448448
json = await self.get_json('api.coingecko.com', '/api/v3/exchange_rates')
449449
return dict([(ccy.upper(), to_decimal(d['value']))
450-
for ccy, d in json['rates'].items()])
450+
for ccy, d in json['rates'].items() if d.get('value') is not None])
451451

452452
def history_ccys(self):
453453
# CoinGecko seems to have historical data for all ccys it supports

0 commit comments

Comments
 (0)