CoinGecko API

⭐ Beginner's Pick Cryptocurrency / API Key Beginner HTTPS
30 calls/minute (free tier)

Overview

CoinGecko provides comprehensive cryptocurrency market data covering 10,000+ coins across 700+ exchanges, including prices, market caps, trading volume, and developer or community statistics. The free Demo API tier allows up to 30 calls per minute and is sufficient for most hobby projects without a credit card. Historical price data going back years is available through dedicated endpoints.

💡

Beginner Tip

Get started with the free Demo plan at coingecko.com/api/documentation — your free API key goes in the x-cg-demo-api-key header and unlocks all basic endpoints with higher rate limits than the keyless tier.

Available Data

Bitcoin price
coin price in USD/EUR
market capitalization
24h price change
trading volume
circulating supply

Example Response

JSON Response
{
  "id": "bitcoin",
  "symbol": "btc",
  "current_price": 65432.1,
  "market_cap": 1280000000000,
  "price_change_24h": 1250.5,
  "price_change_percentage_24h": 1.95,
  "total_volume": 28500000000
}

Field Reference

<coin_id>.usd Current price of the coin in USD.
<coin_id>.usd_market_cap Total market capitalization in USD (only if include_market_cap=true is passed).
<coin_id>.usd_24h_vol 24-hour trading volume in USD (only if include_24hr_vol=true is passed).
<coin_id>.usd_24h_change Percentage price change over the last 24 hours (only if include_24hr_change=true is passed).

Implementation Example

// Get Bitcoin price in USD
const url = "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd";

const response = await fetch(url, {
  headers: {
    "x-cg-demo-api-key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();

console.log(`Bitcoin price: $${data.bitcoin.usd}`);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

429 Too Many Requests Exceeded the free tier rate limit of 30 calls per minute
Add a delay between requests or cache responses; for production use, upgrade to a paid plan or use the bulk /coins/markets endpoint.
Coin not found (404 or empty response) Using the wrong coin ID — CoinGecko uses slugs, not ticker symbols
Call /coins/list to get the full ID mapping; use "shiba-inu" not "SHIB".
vs_currencies parameter error Passing an unsupported fiat or currency code
Check /simple/supported_vs_currencies for the exact list; use lowercase codes like usd, eur, jpy.

Matrix Score Breakdown

🌐 Reachability 0/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 0/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Cryptocurrency
Difficulty Beginner
Verified: 2026-04-04

Alternatives to CoinGecko

Technical alternatives for different use cases.

Read-only market data without exchange account needed

Better For

Executing actual trades and managing portfolios

Trade-off

Price tracking without needing an exchange account

Much larger free tier with more coin coverage

Better For

Apilayer ecosystem integration

Trade-off

Comprehensive crypto data without paid plan

Industry standard for crypto market data and rankings

Better For

Market cap rankings and global crypto metrics

Trade-off

Free tier generosity (CoinGecko has better free plan)

Free crypto data with market overview and exchange info

Better For

Free comprehensive crypto market data

Trade-off

DeFi protocol and NFT data coverage

Extensive historical data with social stats and mining info

Better For

Historical price data and social sentiment metrics

Trade-off

Simple current price lookups

Similar APIs

View All →