What changed, and why it matters
This commit simply removes the CoinDesk exchange-rate provider from Electrum because CoinDesk's old API no longer works and its new API requires a paid authorization token. It is a routine cleanup, not a security fix.
No security action needed. Treat as normal maintenance; users will fall back to other configured exchange-rate providers.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes the CoinDesk exchange-rate class and its supported-currency list. CoinDesk’s API is reported as non-functional and now requires an authorization token, so the provider is being dropped. No code is added or modified beyond removal of this dead provider.
Changed components
electrum/exchange_rate.pyelectrum/currencies.jsonInspect captured patch +0 / −197
diff --git a/electrum/currencies.json b/electrum/currencies.json
index b68a54c..e3348e0 100644
--- a/electrum/currencies.json
+++ b/electrum/currencies.json
@@ -231,174 +231,6 @@
"CoinCap": [
"USD"
],
- "CoinDesk": [
- "AED",
- "AFN",
- "ALL",
- "AMD",
- "ANG",
- "AOA",
- "ARS",
- "AUD",
- "AWG",
- "AZN",
- "BAM",
- "BBD",
- "BDT",
- "BGN",
- "BHD",
- "BIF",
- "BMD",
- "BND",
- "BOB",
- "BRL",
- "BSD",
- "BTC",
- "BTN",
- "BWP",
- "BYR",
- "BZD",
- "CAD",
- "CDF",
- "CHF",
- "CLF",
- "CLP",
- "CNY",
- "COP",
- "CRC",
- "CUC",
- "CUP",
- "CVE",
- "CZK",
- "DJF",
- "DKK",
- "DOP",
- "DZD",
- "EGP",
- "ERN",
- "ETB",
- "EUR",
- "FJD",
- "FKP",
- "GBP",
- "GEL",
- "GGP",
- "GHS",
- "GIP",
- "GMD",
- "GNF",
- "GTQ",
- "GYD",
- "HKD",
- "HNL",
- "HRK",
- "HTG",
- "HUF",
- "IDR",
- "ILS",
- "IMP",
- "INR",
- "IQD",
- "IRR",
- "ISK",
- "JEP",
- "JMD",
- "JOD",
- "JPY",
- "KES",
- "KGS",
- "KHR",
- "KMF",
- "KPW",
- "KRW",
- "KWD",
- "KYD",
- "KZT",
- "LAK",
- "LBP",
- "LKR",
- "LRD",
- "LSL",
- "LYD",
- "MAD",
- "MDL",
- "MGA",
- "MKD",
- "MMK",
- "MNT",
- "MOP",
- "MRU",
- "MUR",
- "MVR",
- "MWK",
- "MXN",
- "MYR",
- "MZN",
- "NAD",
- "NGN",
- "NIO",
- "NOK",
- "NPR",
- "NZD",
- "OMR",
- "PAB",
- "PEN",
- "PGK",
- "PHP",
- "PKR",
- "PLN",
- "PYG",
- "QAR",
- "RON",
- "RSD",
- "RUB",
- "RWF",
- "SAR",
- "SBD",
- "SCR",
- "SDG",
- "SEK",
- "SGD",
- "SHP",
- "SLL",
- "SOS",
- "SRD",
- "STD",
- "STN",
- "SVC",
- "SYP",
- "SZL",
- "THB",
- "TJS",
- "TMT",
- "TND",
- "TOP",
- "TRY",
- "TTD",
- "TWD",
- "TZS",
- "UAH",
- "UGX",
- "USD",
- "UYU",
- "UZS",
- "VES",
- "VND",
- "VUV",
- "WST",
- "XAF",
- "XAG",
- "XAU",
- "XBT",
- "XCD",
- "XDR",
- "XOF",
- "XPF",
- "YER",
- "ZAR",
- "ZMW",
- "ZWL"
- ],
"CoinGecko": [
"AED",
"ARS",
diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py
index 6c75837..ed9d2b1 100644
--- a/electrum/exchange_rate.py
+++ b/electrum/exchange_rate.py
@@ -413,35 +413,6 @@ class CoinCap(ExchangeBase):
for h in history['data']])
-class CoinDesk(ExchangeBase):
-
- async def get_currencies(self):
- dicts = await self.get_json('api.coindesk.com',
- '/v1/bpi/supported-currencies.json')
- return [d['currency'] for d in dicts]
-
- async def get_rates(self, ccy):
- json = await self.get_json('api.coindesk.com',
- '/v1/bpi/currentprice/%s.json' % ccy)
- result = {ccy: to_decimal(json['bpi'][ccy]['rate_float'])}
- return result
-
- def history_starts(self):
- return {'USD': '2012-11-30', 'EUR': '2013-09-01'}
-
- def history_ccys(self):
- return self.history_starts().keys()
-
- async def request_history(self, ccy):
- start = self.history_starts()[ccy]
- end = datetime.today().strftime('%Y-%m-%d')
- # Note ?currency and ?index don't work as documented. Sigh.
- query = ('/v1/bpi/historical/close.json?start=%s&end=%s'
- % (start, end))
- json = await self.get_json('api.coindesk.com', query)
- return json['bpi']
-
-
class CoinGecko(ExchangeBase):
async def get_rates(self, ccy):
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.