Short answer: The CoinGecko API works three ways: keyless, with a free Demo key, or with a paid key. As read on 26 November 2026, keyless and Demo calls go to https://api.coingecko.com/api/v3 (Demo sends header x-cg-demo-api-key and gets 100 calls a minute and 10,000 credits a month), while paid keys use pro-api.coingecko.com with x-cg-pro-api-key. Keyless limits are per IP address, shared with everyone on that address and published as about 5 calls a minute; in a test that day the sixth keyless call within a minute returned HTTP 429 with Retry-After: 60.
Everything below comes from docs.coingecko.com, the CoinGecko API pricing page and the CoinGecko API Terms, all opened on 26 November 2026, plus calls made that day to the keyless endpoint from one IP address. Plans and limits change, so treat each number as dated. For price sources in general, see the crypto price API guide; this page covers CoinGecko only and says nothing about any coin.
CoinGecko API key: keyless, Demo or Pro
CoinGecko offers three ways in, and the key type decides the root URL; mixing them is the most common setup error.
| Access | Root URL | How the key is sent | Published limit |
|---|---|---|---|
| Keyless public API | https://api.coingecko.com/api/v3/ | No key | IP-based, shared by all users on the same IP; about 5 calls a minute, varying with server load |
| Demo (free account) | https://api.coingecko.com/api/v3/ | Header x-cg-demo-api-key or query x_cg_demo_api_key | 100 calls a minute; 10,000 credits a month |
| Paid (Basic to Enterprise) | https://pro-api.coingecko.com/api/v3/ | Header x-cg-pro-api-key or query x_cg_pro_api_key | Per plan, see the pricing table below |
The error list makes the pairing explicit: error 10010 means a Pro key was sent to the wrong root (it must be pro-api.coingecko.com), and 10011 means a Demo key was sent somewhere other than api.coingecko.com. Error 10002 is a missing key and 10005 an endpoint your plan does not include. The Demo authentication page recommends the header over the query string, because a key in a URL ends up in logs and browser history, and it says to keep the key on a backend and proxy browser requests. Onchain (GeckoTerminal) endpoints use the same key and root with /onchain in the path; keyless onchain calls go to a different host, https://api.geckoterminal.com/api/v2. The Keyless Public API page says keyless use is for testing, not production.
Keys are created in the Developer Dashboard. General key handling is covered in the exchange API key guide.
CoinGecko API rate limit and what a 429 looks like
Demo is limited to 100 calls a minute, paid plans to their plan limit, and keyless access to about 5 calls a minute per IP, which matched the test below.
- Everything counts toward the minute. The errors page states that all requests, including 4xx and 5xx responses, count toward the per-minute limit. A retry loop that hammers a failing endpoint burns the budget it is waiting for.
- Only successes cost credits. The Demo authentication page says each HTTP 200 deducts one credit from the monthly quota, so the minute limit and the monthly credit count are two separate meters.
- Shared IPs suffer. The docs warn that Google Sheets users share IPs and hit rate limits for that reason; serverless functions and office networks do too.
On 26 November 2026 at 20:39 UTC, two keyless calls (the script below) were followed by a loop of /ping requests from the same IP. The fourth request of the loop, the sixth keyless call in about a minute, returned HTTP 429 after 1.2 seconds of looping, with this body and header:
{"status":{"error_code":429,"error_message":"You've exceeded the Rate Limit. Please visit
https://www.coingecko.com/en/api/pricing to subscribe to our API plans for higher rate limits."}}
Retry-After: 60Successful keyless responses carried no rate-limit headers, so a client learns of the limit only at the 429. The Retry-After header is the one number to trust. For a client-side limiter that keeps under a known budget, see the token bucket rate limiter in Python.
CoinGecko API free plan and pricing, 26 November 2026
The Demo plan is free with attribution required; paid plans start at USD 29 a month billed yearly, according to the pricing page on 26 November 2026.
| Plan | Price per month, billed yearly | Credits a month | Calls a minute | Daily history | Endpoints |
|---|---|---|---|---|---|
| Demo | USD 0 | 10,000 | 100 | 1 year | 60+ |
| Basic | USD 29 (USD 348 a year) | 100,000 | 300 | 2 years | 60+ |
| Analyst | USD 103.20 | 500,000 | 500 | from 2013 | 90+ |
| Lite | USD 399.20 | 2,000,000 | 500 | from 2013 | 90+ |
| Pro | USD 799.20 | 5,000,000 | 1,000 | from 2013 | 90+ |
| Enterprise | Custom | Custom | Custom | from 2013 | 100+ |
The same table lists data freshness "from 60 sec" for Demo and "from 10 sec" for Basic, no WebSocket or webhook access on Demo, and an overage charge of USD 0.0005 a call on Basic to Pro. Monthly billing costs more than the figures above; the page shows both. The pricing page was internally inconsistent on one point: the Basic card says "For personal use cases" while the comparison table lists Basic's licence as Commercial and the pricing FAQ includes Basic in its commercial-use answer. If the licence matters to your product, ask CoinGecko in writing rather than relying on either line.
Hypothetical example. A dashboard refreshes 50 coins every 60 seconds with one /simple/price call carrying all 50 IDs. That is 1 call a minute, 1,440 a day and about 43,200 in a 30-day month: inside Demo's 100-a-minute limit but over its 10,000 monthly credits by a factor of 4.3, and inside Basic's 100,000. Polling faster than once a minute would not help on Demo anyway, because /simple/price is cached for 60 seconds there.
Main CoinGecko API endpoints and their quirks
Each of the five endpoints most projects need has a caching or granularity rule worth knowing first.
| Endpoint | Use | Rule in the docs |
|---|---|---|
/simple/price | Latest price for one or many coin IDs | Cached every 60 seconds on Demo and keyless, every 20 seconds on paid plans |
/coins/markets | Price, market cap and volume for a page of coins | Paginated; one call returns many coins |
/coins/{id}/market_chart | Price, market cap and volume series | Automatic granularity: 5-minute for 1 day, hourly for 2 to 90 days, daily (00:00 UTC) above 90 days; interval=hourly covers the past 100 days; 5-minute interval is Enterprise only |
/coins/{id}/ohlc | Open, high, low, close candles | Candle size is set by days: 30 minutes for 1 to 2 days, 4 hours for 3 to 30, 4 days for 31 and above; the timestamp is the candle close |
/onchain/networks/{network}/new_pools | DEX pools created on one network | Pools from the past 48 hours, 20 per page; beyond page 10 requires Analyst or above |
Two rules catch people building history. First, the Demo API restricts historical data to the past 365 days; the full range starts at the Analyst plan. Second, the chart and OHLC pages say values may be revised for up to 2 days after the date as later data settles, so a backfill should re-read the last two days rather than treat them as final. The OHLC endpoint has no volume column; volume comes from market_chart. For exchange-native candles, see the historical data download guide. Map symbols to IDs with /coins/list first, because a symbol can belong to several coins.
CoinGecko API Python example, tested 26 November 2026
The script below uses only the standard library, runs keyless or with a Demo key from the environment, and waits out a 429 using Retry-After.
import os, time, json, urllib.request, urllib.error
from datetime import datetime, timezone
BASE = "https://api.coingecko.com/api/v3" # keyless and Demo share this root
KEY = os.environ.get("CG_DEMO_API_KEY") # optional; never hard-code a key
def get(path, params=None, retries=4):
q = "&".join(f"{k}={v}" for k, v in (params or {}).items())
req = urllib.request.Request(f"{BASE}{path}?{q}",
headers={"User-Agent": "Mozilla/5.0", "accept": "application/json"})
if KEY:
req.add_header("x-cg-demo-api-key", KEY)
for attempt in range(retries):
try:
with urllib.request.urlopen(req, timeout=20) as r:
return json.load(r)
except urllib.error.HTTPError as e:
if e.code == 429 and attempt < retries - 1:
wait = int(e.headers.get("Retry-After") or 2 ** (attempt + 2))
print(f"429, waiting {wait}s")
time.sleep(wait)
continue
raise
print("run at", datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC"), "key:", bool(KEY))
p = get("/simple/price", {"ids": "bitcoin,ethereum", "vs_currencies": "usd",
"include_last_updated_at": "true"})
for coin, v in p.items():
print(coin, v["usd"], datetime.fromtimestamp(v["last_updated_at"], timezone.utc).strftime("%H:%M:%S"))
ohlc = get("/coins/bitcoin/ohlc", {"vs_currency": "usd", "days": "1"})
step = (ohlc[1][0] - ohlc[0][0]) // 60000
print("ohlc candles:", len(ohlc), "step minutes:", step, "last:", ohlc[-1])Real output, keyless, from one IP address:
run at 2026-11-26 20:39 UTC key: False
bitcoin 60683 20:38:26
ethereum 1702.11 20:38:26
ohlc candles: 48 step minutes: 30 last: [1795725000000, 60662.0, 60694.0, 60618.0, 60643.0]The 48 candles 30 minutes apart match the documented granularity for days=1. The last_updated_at field showed the price was about a minute old when fetched, consistent with the 60-second cache. To run with a key, set CG_DEMO_API_KEY in your shell; the code sends it as a header and never prints it. A Pro key would also need BASE changed to the pro-api root and the header name changed to x-cg-pro-api-key. The Demo-key path was not run for this guide; the keyless path was.
CoinGecko API terms: attribution, caching and redistribution
The CoinGecko API Terms (latest version 5 September 2025, read 26 November 2026) require visible attribution, discourage long-term storage and prohibit reselling access.
- Attribution. Clause 4.3 asks for "Powered by CoinGecko" displayed prominently, no smaller than font size 10; Demo and keyless use also require attribution. The pricing FAQ words it differently for paid plans ("Data provided by Coingecko" with a link to coingecko.com/en/api), so confirm the wording with CoinGecko.
- No resale of access. Clause 4.1.6 lets you charge for a product that uses the data but says you may not sell, rent, lease, sub-license, re-distribute or syndicate access to the API. The pricing page lists a commercial redistribution licence only under Enterprise.
- Caching. Clause 6.1 says CoinGecko does not encourage caching or storage, and where you cache, you should refresh at least every 24 hours. On termination, stored data must be deleted (clause 10.4.3).
- Limits can change. Clause 4.2 says rate and monthly limits may be varied at any time without notice, and clause 10.3 allows suspension without notice.
None of this is legal advice; read the terms against your own product. The status of the service is published at status.coingecko.com, and the errors page points there for 503 responses. If a project needs a governed pipeline with caching, attribution and audit built in, that is the kind of work described on Fincode's market data pipelines page.
When the CoinGecko API is the wrong tool
CoinGecko aggregates across markets, so it suits display, research and portfolio valuation better than anything that needs a single venue's exact prices.
- Sub-minute freshness for free. Demo and keyless prices are cached for 60 seconds.
- Brand-new tokens. A token can trade on a DEX before it gets a coin ID; see the DEX Screener API guide.
For a side-by-side view with CoinMarketCap and others, see CoinGecko vs CoinMarketCap API.
Frequently asked questions
Is the CoinGecko API free?
Yes, in two ways as of 27 November 2026: a keyless public API limited to about 5 calls a minute per IP, and a free Demo key with 100 calls a minute and 10,000 monthly credits. Both require attribution, and Demo covers a subset of endpoints.
What is the CoinGecko API key header?
Demo keys go in the x-cg-demo-api-key header on api.coingecko.com, and paid keys in x-cg-pro-api-key on pro-api.coingecko.com. Sending a key to the wrong root returns error 10010 or 10011.
Why do I get 429 from CoinGecko with very few calls?
Keyless limits are about 5 calls a minute per IP and shared with everyone on that address, such as a cloud provider or office network. In a test on 26 November 2026 the sixth keyless call in a minute returned 429 with Retry-After: 60; a Demo key gives you your own budget.
How far back does CoinGecko history go on the free plan?
The Demo API restricts historical data to the past 365 days. The pricing page lists daily history from 2013 on Analyst and above.
Do failed requests count against the CoinGecko rate limit?
Yes. The documentation says all requests, including 4xx and 5xx errors, count toward the per-minute limit, while only successful responses deduct monthly credits.
Sources
- CoinGecko API docs: Errors and Rate Limits, read 26 November 2026 (opens in a new tab)
- CoinGecko API docs: Authentication (Demo API) (opens in a new tab)
- CoinGecko API docs: Authentication (Pro API) (opens in a new tab)
- CoinGecko API docs: Keyless Public API, read 27 November 2026 (opens in a new tab)
- CoinGecko API docs: Demo and keyless endpoint overview (opens in a new tab)
- CoinGecko API docs: Coin Price by IDs (simple/price) (opens in a new tab)
- CoinGecko API docs: Coin Historical Chart Data by ID (opens in a new tab)
- CoinGecko API docs: Coin OHLC Chart by ID (opens in a new tab)
- CoinGecko API docs: New Pools by Network (opens in a new tab)
- CoinGecko API pricing, read 26 November 2026 (opens in a new tab)
- CoinGecko API Terms, latest version 5 September 2025 (opens in a new tab)
- CoinGecko API status page (opens in a new tab)
This guide is general information about software and markets, not investment, legal or tax advice. Automated trading can lose money, past or backtested performance does not guarantee future results, and the rules that apply depend on your jurisdiction and your exchange's terms. Sources, checks and corrections: see the editorial policy.