DEV Community

Алексей Спинов
Алексей Спинов

Posted on

How to Scrape Cryptocurrency Prices and Market Data (Free APIs)

Crypto data is readily available through free APIs. No scraping needed.

Free Crypto APIs

CoinGecko (Most Popular, Free)

async function getCryptoPrices(coins) {
  const ids = coins.join(",");
  const url = `https://api.coingecko.com/api/v3/simple/price?ids=${ids}&vs_currencies=usd&include_24hr_change=true`;
  const res = await fetch(url);
  return res.json();
}

const prices = await getCryptoPrices(["bitcoin","ethereum","solana"]);
console.log(prices);
// { bitcoin: { usd: 87000, usd_24h_change: 2.5 }, ... }
Enter fullscreen mode Exit fullscreen mode

CoinCap (Free, No Key)

https://api.coincap.io/v2/assets?limit=10
Enter fullscreen mode Exit fullscreen mode

CryptoCompare (Free Tier)

https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH&tsyms=USD
Enter fullscreen mode Exit fullscreen mode

What Data You Get

  • Current price in any fiat currency
  • 24h/7d/30d price change
  • Market cap and volume
  • Historical prices (charts)
  • Exchange rates between coins

Use Cases

  1. Price tracking — build a portfolio tracker
  2. Arbitrage — find price differences between exchanges
  3. Market analysis — volume trends and correlations
  4. Alert systems — notify on price changes
  5. Research — historical data for backtesting

Resources


Need crypto data extracted or tracked? $20. Email: Spinov001@gmail.com | Hire me

Top comments (0)