No API key is required for basic news access via the CryptoCompare public endpoint. The integration uses the free tier without any authentication headers.
Endpoint
GET /data/v2/news/
Fetches the latest cryptocurrency news articles. The integration filters results to Spanish-language (lang=ES) articles to match the app’s target audience.
Source file: src/services/newsApi.js — newsApi()
Query parameters
Language filter for returned news articles. Set to
ES to return Spanish-language articles only. CryptoCompare also supports EN (English) and other ISO 639-1 language codes.Source code
src/services/newsApi.js
cryptoApi.js and historyApi.js, this function explicitly checks response.ok and throws a descriptive error on non-2xx HTTP responses before attempting to parse the body.
Spanish language filter
Thelang=ES query parameter restricts the feed to Spanish-language articles. This is hardcoded in the service and reflects the app’s primary locale. If you need to support English or other languages, update the lang value in the URL or make it a parameter passed into newsApi().
Cache key
| Key | TTL |
|---|---|
getNewsCrypto | 5 minutes |
keepNews() in src/services/cache.js reads getNewsCrypto from localStorage and skips the network request if the entry is less than 5 minutes old.
src/services/cache.js
Response shape
CryptoCompare response type code.
100 indicates a successful response.Human-readable status message from the API (e.g.
"News list successfully returned").Array of news article objects.