def get_cached_spot_quote(self, ccy: str) -> Decimal:
        """Returns the cached exchange rate as a Decimal"""
        if ccy == 'BTC':
            return Decimal(1)
        rate = self._quotes.get(ccy)
        if rate is None:
            return Decimal('NaN')
        if self._quotes_timestamp + SPOT_RATE_EXPIRY < time.time():
            # Our rate is stale. Probably better to return no rate than an incorrect one.
            return Decimal('NaN')
        return Decimal(rate)
Returns the cached exchange rate as a Decimal
electrum/exchange_rate.py