Intermediate 3-4 hours · 3 APIs
Build a Crypto Price Tracker
Track cryptocurrency prices in real-time with related news. Get a comprehensive view of the crypto market.
APIs Used
Data Flow
User Action
API Call
Transform
Output
How It Works
1
Fetch current prices for selected cryptocurrencies from Coinbase
2
Get 7-day historical data from CryptoCompare for trend analysis
3
Fetch the latest crypto news from GNews for context
4
Display a dashboard with prices, trends, and relevant news
Code Outline
Pseudocode / JavaScript
// 1. Get current BTC price from Coinbase
const priceRes = await fetch('https://api.coinbase.com/v2/prices/BTC-USD/spot');
const { data: { amount: currentPrice } } = await priceRes.json();
// 2. Get 7-day history from CryptoCompare
const histRes = await fetch(
'https://min-api.cryptocompare.com/data/v2/histoday?fsym=BTC&tsym=USD&limit=7&api_key=YOUR_API_KEY'
);
const { Data: { Data: history } } = await histRes.json();
const weekAgoPrice = history[0].close;
const change = ((currentPrice - weekAgoPrice) / weekAgoPrice * 100).toFixed(2);
// 3. Get crypto news
const newsRes = await fetch(
'https://gnews.io/api/v4/search?q=bitcoin+cryptocurrency&token=YOUR_API_KEY&max=5'
);
const { articles } = await newsRes.json();
// 4. Display dashboard
console.log(`BTC: $${currentPrice} (${change}% 7d)`);
articles.forEach(a => console.log(`- ${a.title}`)); Recipe Details
Difficulty Intermediate
Time 3-4 hours
APIs Used 3
Related Recipes
Related Tutorials
Note: These recipes are AI-generated suggestions based on API capabilities. Actual implementation may vary. Always refer to official API documentation for the latest specifications.