API Directory › ₿ Cryptocurrency › CoinMarketCap
API KeyHTTPSCORS

CoinMarketCap API

Market-leading crypto market data — prices, market cap and rankings.

Auth
API Key
HTTPS
Yes
CORS
Yes
Open CoinMarketCap docs ↗

What it does

CoinMarketCap’s Pro API provides listings, quotes, market pairs, OHLCV, global metrics and metadata for cryptocurrencies and exchanges. It is a common choice when you want CMC’s specific rankings and IDs.

Base URL

https://pro-api.coinmarketcap.com/v1

Authentication

Create a free account and send your key as the X-CMC_PRO_API_KEY header. The free Basic plan works only against the production host (there is also a sandbox-api.coinmarketcap.com for testing with a fixed sandbox key).

Code examples

curl
curl -s -H "X-CMC_PRO_API_KEY: $CMC_KEY" \
  "https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BTC,ETH"
Python
import requests

r = requests.get(
    "https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest",
    headers={"X-CMC_PRO_API_KEY": KEY},
    params={"start": 1, "limit": 10, "convert": "USD"}, timeout=10)
for c in r.json()["data"]:
    print(c["symbol"], c["quote"]["USD"]["price"])

Rate limits & quotas

Free Basic plan: about 10,000 call credits/month and roughly 30 requests/minute, with historical and some conversion endpoints locked. One call can cost more than one credit if it returns many items or multiple convert currencies. Usage is in the response status.credit_count and your dashboard.

Key response fields

data[].quote.USD.pricePrice in the convert currency
data[].quote.USD.percent_change_24h24h move
data[].cmc_rankCoinMarketCap ranking
status.credit_countCredits this call consumed
status.error_code / error_messageNon-zero means the call failed

Common errors

401Missing or invalid X-CMC_PRO_API_KEY.
402 / 1006Your plan does not include that endpoint.
429 / 1008Minute rate limit or monthly credit cap reached.
400 / 1002Missing a required parameter such as symbol or id.

When to use it (and alternatives)

Choose CMC when you specifically need its rankings, IDs or brand alignment. For a more generous free tier and richer coin metadata, CoinGecko is usually the better starting point.

FAQ

What is a 'call credit'?

CMC bills in credits, not raw requests. A simple quote is 1 credit; a call returning 200 coins or converting to several fiat currencies costs proportionally more. Watch status.credit_count.

Can I get historical prices on the free plan?

No — OHLCV and historical quote endpoints require a paid plan. Use the latest endpoints and store your own time series, or use another provider.

Should I use symbol or id?

Prefer the numeric CMC id where possible — ticker symbols are not unique across the thousands of listed tokens and can return the wrong asset.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

Crypto PriceCryptoLarz app

Related Cryptocurrency APIs

← Back

More Cryptocurrency APIs · All 196 APIs