CoinGecko changed the rules for using their API:
{"error":{"status":{"timestamp":"2024-03-30T07:22:29.427+00:00","error_code":10012,"error_message":"Your request exceeds the allowed time range. Public API users are limited to querying historical data within the past 365 days. Upgrade to a paid plan to enjoy full historical data access: https://www.coingecko.com/en/api/pricing. "}}}
We can no longer fetch the entire price history for a fiat currency. So limit the call to the maximum allowed 365 days, and don't overwrite the existing cached data, update it.
Consequences:
- For existing users who run Electrum ABC at least once a year, the previous behavior is preserved, they will keep seeing a complete fiat history for previously cached fiat currencies
- User running Electrum ABC less often than once a year will now have gaps in the historical prices
- New users or existing users selecting a new fiat currency will initially no longer see historical prices older than 365 days prior to activating the feature or selecting the currency.