CoinGecko
CoinGecko
REST and WebSocket API covering crypto assets, DEX data, and 12+ years of historical market data.
Required Attribution:
Required on the free Demo plan: show "Powered by CoinGecko" attribution (CoinGecko API Terms, 5 Sept 2025).
Coverage
49M+ tokens across 360+ networks and 2,000+ exchanges (CEX and DEX); prices, market cap, volume, OHLCV, exchange, derivatives and onchain DEX data. Up to 13+ years of history on paid plans (daily from 2013). Free Demo plan: 1 year of daily and hourly history; Basic (paid): 2 years.
Verdict
Backtesting crypto strategies with historical daily and hourly prices and OHLC (1 year on the free Demo plan). Note: the Demo plan requires attribution and has no commercial license; CoinGecko lists a commercial license only on paid plans. Top and historical token-holder data starts at the paid Analyst plan.
Get the free weekly email
Free weekly email of newly verified free data. Unsubscribe by emailing us.
By entering your email and clicking Subscribe, you agree to receive the Signal Lab weekly email from Quantum Data Technologies Ltd., 3200-650 West Georgia Street, Vancouver, BC V6B 4P7, Canada (signal-lab@qdt.ai). You can unsubscribe at any time: reply "unsubscribe" to any email or write to signal-lab@qdt.ai. See our Privacy Policy.
Use in your agent
Load a CoinGecko price snapshot into pandas and Parquet. Checked against the provider's documentation on Oct 29, 2026.
Access
- Use a free Demo API key for the published Demo allowance. Put it in COINGECKO_API_KEY.
- A shared keyless public endpoint also exists, but it does not carry the Demo allowance.
- The Demo plan has no commercial license and requires attribution.
Request
curl -H 'x-cg-demo-api-key: '$COINGECKO_API_KEY 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd&include_last_updated_at=true'Format
JSON object keyed by coin id; each value contains the requested quote currency and optional last_updated_at Unix timestamp.
Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
"""CoinGecko Demo simple-price snapshot -> pandas -> Parquet. Attribution is required."""
import os
import requests
import pandas as pd
headers = {"x-cg-demo-api-key": os.environ["COINGECKO_API_KEY"]}
params = {"ids": "bitcoin,ethereum", "vs_currencies": "usd", "include_last_updated_at": "true"}
r = requests.get("https://api.coingecko.com/api/v3/simple/price", headers=headers, params=params, timeout=30)
r.raise_for_status()
df = pd.DataFrame.from_dict(r.json(), orient="index").rename_axis("coin_id").reset_index()
df["last_updated_at"] = pd.to_datetime(df["last_updated_at"], unit="s", utc=True)
df.to_parquet("coingecko_price_snapshot.parquet", index=False)
print(len(df), "coins; updated", df["last_updated_at"].max())Needs a personal API key; not run.
Limits
- Demo: 100 calls per minute and 10,000 calls per month.
- Rate limits and monthly call limits depend on the plan.
Quirks
- Use the Demo header x-cg-demo-api-key; paid Pro keys use a different root URL and header.
- Refresh stored or cached API data at least every 24 hours.
- Coin ids such as bitcoin are not ticker symbols.
Terms and attribution
- The Demo plan does not include a commercial license.
- Display Powered by CoinGecko attribution.
- CoinGecko discourages storage; if data is stored, refresh it at least every 24 hours and protect it.
Sources
- https://www.coingecko.com/en/api/pricing: “a stable rate limit of 100 calls/min and a monthly cap of 10,000 calls”
- https://www.coingecko.com/en/api_terms: “Powered by CoinGecko”
- https://www.coingecko.com/en/api_terms: “We do not encourage caching or storage of Data.”
Information and education only. Not financial, investment, legal or tax advice. Listings can be inaccurate, incomplete or out of date and are provided "as is". Free tiers, limits and licenses belong to each provider and can change, so check the provider's own terms before you rely on them. Terms & Disclaimer