CoinGecko API
Free cryptocurrency price API covering 10,000+ coins. Live prices, market cap and volume in any currency, no API key on the public tier. Tested curl example.
Endpoint tested and returned HTTP 200 on 2026-08-19
What is the CoinGecko API?
The CoinGecko API is a free cryptocurrency data API providing live prices, market capitalisation, trading volume and historical charts for more than 10,000 coins. The public tier requires no API key but is limited to roughly 5-15 calls per minute.
CoinGecko is the most widely used free crypto data API, and unlike most competitors its public endpoints genuinely work without registration. The `/simple/price` endpoint shown here is the one most projects need: pass coin ids and target currencies, get back a compact price map.
The critical detail is that coins are addressed by CoinGecko *id*, not ticker symbol — `bitcoin`, not `BTC`. Symbols are ambiguous across chains and CoinGecko refuses to guess, so fetch the ids from `/coins/list` once and cache them rather than hardcoding assumptions.
Quick facts
- Base URL
https://api.coingecko.com/api/v3- Authentication
- Public tier needs no key. A free Demo plan key raises limits and is recommended for anything beyond hobby use.
- Rate limit
- Roughly 5-15 calls per minute on the keyless public tier, varied dynamically by load.
- Pricing
- Free public tier; Demo and paid Pro plans offer higher, guaranteed limits.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the CoinGecko API
Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.
1. Live Bitcoin and Ethereum prices in USD
GET https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd
curl 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd'const res = await fetch("https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd", timeout=20)
res.raise_for_status()
print(res.json()){
"bitcoin": {
"usd": 64753
},
"ethereum": {
"usd": 1932.29
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | string | Required | Comma-separated CoinGecko coin ids — not ticker symbols. bitcoin,ethereum |
vs_currencies | string | Required | Comma-separated target currencies. usd,eur |
include_market_cap | boolean | Optional | Add market capitalisation to the response. true |
include_24hr_change | boolean | Optional | Add 24-hour percentage price change. true |
precision | string | Optional | Decimal places for prices, or `full`. 2 |
Response fields
<coin_id>object- One key per requested coin, each holding a map of currency to price.
<coin_id>.<currency>float- Current price in that currency.
<coin_id>.<currency>_market_capfloat- Market cap, present only when explicitly requested.
<coin_id>.<currency>_24h_changefloat- 24-hour percentage change, when requested.
What you can build with the CoinGecko API
- Show live crypto prices on a portfolio dashboard or website ticker
- Convert crypto amounts to fiat for invoicing or checkout display
- Track market cap and 24-hour movement for a watchlist
- Chart historical price data via the /coins/{id}/market_chart endpoint
Common errors and how to fix them
429
Public rate limit exceeded — easy to hit with more than a few calls a minute.
Fix: Batch every coin into one `ids` list rather than looping, and cache for 30-60 seconds.
Empty object {}
An unknown coin id was requested; no error is raised.
Fix: Use CoinGecko ids like `bitcoin`, not symbols like `BTC`. Verify against /coins/list.
CoinGecko API — frequently asked questions
Is the CoinGecko API free?
Yes. The public tier requires no API key and covers price, market and historical endpoints, limited to roughly 5-15 calls per minute. A free Demo key gives higher, more predictable limits.
Why does CoinGecko return an empty object for my coin?
You almost certainly passed a ticker symbol instead of a CoinGecko id. Use `bitcoin` rather than `BTC` — unknown ids are silently omitted rather than raising an error.
How do I avoid hitting the CoinGecko rate limit?
Request all coins in a single call using a comma-separated `ids` list instead of one request per coin, and cache responses for at least 30 seconds. Crypto prices update continuously but few UIs need sub-minute freshness.
Can I use the CoinGecko API commercially?
The free tier is intended for non-commercial and low-volume use. Commercial products should use a paid Pro plan, which also provides a guaranteed rate limit and SLA.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Percentage Calculator
Calculate what X% of a number is, what percent one number is of another, and percentage increase or decrease between two values — instantly and free.
CoinGecko is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.