Back to articles
CoinGecko API: Build a Free Crypto Portfolio Tracker in Python (No API Key Required)

CoinGecko API: Build a Free Crypto Portfolio Tracker in Python (No API Key Required)

via Dev.to TutorialAlex Spinov

I watched a friend pay $30/month for CoinMarketCap Pro to track his crypto portfolio. I built the same thing in 30 minutes — for free, with no API key. CoinGecko has the most generous free API in crypto. Here's how to use it. Why CoinGecko API? No API key needed for basic endpoints (just make HTTP requests) 13,000+ cryptocurrencies tracked Exchange data from 800+ exchanges Historical data going back years NFT data included Rate limit : 10-30 requests/minute (free) Step 1: Get Current Prices (No Key Needed!) import requests def get_crypto_prices ( coins , currency = " usd " ): """ Get current prices for multiple cryptocurrencies. """ url = " https://api.coingecko.com/api/v3/simple/price " params = { " ids " : " , " . join ( coins ), " vs_currencies " : currency , " include_24hr_change " : " true " , " include_market_cap " : " true " , } return requests . get ( url , params = params ). json () # Get prices for top cryptos prices = get_crypto_prices ([ " bitcoin " , " ethereum " , " solan

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
2 views

Related Articles