CoinGecko
CoinGecko API — Crypto prices, market caps and volumes for 15,000 coins — the free tier needs no key for basic calls
When you want crypto prices aggregated across exchanges — a daily series for one coin, the whole market's capitalisation, dominance — rather than one exchange's order book.
Reach for it when…
When you want crypto prices aggregated across exchanges — a daily series for one coin, the whole market's capitalisation, dominance — rather than one exchange's order book.
Not for: Intraday or tick data (an exchange API such as Binance), anything unattended at scale on the public tier, prices you will republish without a plan.
Units, revisions, traps
Units. Prices in the vs_currency you ask for (usd, krw…); timestamps in Unix milliseconds; market_chart returns [timestamp, value] pairs.
Revisions. Aggregated prices can differ slightly from any single exchange and are occasionally backfilled.
- Coin ids are CoinGecko's own (bitcoin, ethereum), not tickers.
- Daily granularity is automatic for ranges over 90 days; shorter ranges return hourly.
- The public tier rate-limits per IP and returns 429 without warning.
Classic mistake: Comparing CoinGecko's aggregated price to Binance's last trade and calling the difference an arbitrage.
Three recipes
- Recipe 1 · Bitcoin, daily, last 365 days
- Recipe 2 · The whole market: cap and dominance
- Recipe 3 · Several coins in one call
Each recipe: Python · Excel · Sheets, with how to read the result. Python recipes run under pandas; recipe 1 is re-run by the weekly check where the source allows it.
How to use it in your own work
Copy the snippet, change the series id, read the result the way the footer says. Replace YOUR_…_KEY with your own key where one is needed.
Recipe 1Bitcoin, daily, last 365 days
import requests, pandas as pd
u = "https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=365&interval=daily"
j = requests.get(u, timeout=30).json()
df = pd.DataFrame(j["prices"], columns=["ts", "price"])
df["date"] = pd.to_datetime(df.ts, unit="ms")
print(df.set_index("date")["price"].tail())- Data → From Web → the same URL; expand 'prices' into a table and convert ts with =ts/86400000+DATE(1970,1,1).
- No native JSON import — use the Python recipe.
Recipe 2The whole market: cap and dominance
import requests
j = requests.get("https://api.coingecko.com/api/v3/global", timeout=30).json()["data"]
print("total cap USD (bn):", round(j["total_market_cap"]["usd"] / 1e9))
print("BTC dominance %:", round(j["market_cap_percentage"]["btc"], 1))- From Web with the same URL.
- Use the Python recipe.
Recipe 3Several coins in one call
import requests, pandas as pd
u = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=bitcoin,ethereum,solana&order=market_cap_desc"
df = pd.DataFrame(requests.get(u, timeout=30).json())
print(df[["id", "current_price", "market_cap", "price_change_percentage_24h"]])- From Web with the same URL.
- Use the Python recipe.
Series → question map
The ids we use from CoinGecko API, each with the question it answers. The catalog's compare view reads the concept tags behind these rows.
| Series | Answers | Region | Concept |
|---|---|---|---|
| coins/bitcoin/market_chart | Bitcoin daily price and cap | global | crypto_spot |
| global | How big is the crypto market? | global | crypto_cap |
| coins/markets | A table of coins by market cap | global | crypto_spot |
Compare with
Same question, different source: Binance public API, Twelve Data, Stooq. The compare view lines up coverage, frequency, history and access side by side and lists what the combination makes possible.
Open compare: CoinGecko API · Binance public API · Twelve Data →
Questions readers ask
Do I need a CoinGecko key?
Not for the public endpoints at low volume; a free demo key raises the limit and is required for some newer endpoints.
How far back does history go?
Bitcoin from 2013; other coins from their listing on CoinGecko.
Can I show CoinGecko prices on a website?
With attribution for personal projects; commercial display needs a paid plan under their terms.
Educational only — we explain, we never advise · snippet licence: public domain · corrections to [email protected], fixed within a day and logged in the changelog.