# Keyless Public API

> For the complete CoinMarketCap API documentation index, see [llms.txt](https://pro.coinmarketcap.com/llms.txt). For a single-file dump of all documentation, see [llms-full.txt](https://pro.coinmarketcap.com/llms-full.txt).

**Start using CoinMarketCap data instantly - no API key, no signup, no headers.** Send a request, get JSON back. The Keyless Public API gets authoritative crypto market data into a script, an agent, or a prototype in seconds, with no account, key management, or credit system to deal with.

It serves real-time and historical data - prices, market cap, OHLCV, DEX pairs, token security, and CMC's proprietary indices - over plain HTTP, and it's the same data that powers coinmarketcap.com: aggregated across **947+** exchanges and **51M+** tracked assets with **14 years** of history.

```bash
# Simple Price takes CoinMarketCap IDs (1 = BTC, 1027 = ETH) - look IDs up via /v1/cryptocurrency/map
curl "https://pro-api.coinmarketcap.com/public-api/v1/simple/price?ids=1,1027&convert=USD"
```

No headers, no auth - just send a request.

## Quick start (no key)

Python, standard library only - runs as-is, nothing to fill in:

```python
import urllib.request, urllib.parse, json
base = "https://pro-api.coinmarketcap.com/public-api"
qs = urllib.parse.urlencode({"ids": "1,1027", "convert": "USD"})  # 1 = BTC, 1027 = ETH
url = f"{base}/v1/simple/price?{qs}"
req = urllib.request.Request(url, headers={"Accept": "application/json"})
data = json.load(urllib.request.urlopen(req, timeout=10))
print(data)
```

Node, no dependencies:

```javascript
const base = "https://pro-api.coinmarketcap.com/public-api";
const res = await fetch(`${base}/v1/simple/price?ids=1,1027&convert=USD`); // 1 = BTC, 1027 = ETH
console.log(await res.json());
```

## Base URL

```text
https://pro-api.coinmarketcap.com/public-api
```

Prefix any supported endpoint path with `/public-api` and the request is accepted with no key. **One base URL covers both CEX market data and on-chain DEX data** - same host, same JSON envelope, no second root to route to.

Use the keyless root, not the keyed root:

- ❌ `https://pro-api.coinmarketcap.com/v1/simple/price` (requires an API key)
- ✅ `https://pro-api.coinmarketcap.com/public-api/v1/simple/price` (no key)

Do **not** send an `X-CMC_PRO_API_KEY` header on keyless calls - it isn't needed. Keyless endpoints accept `GET` only and return the exact same JSON envelope, [standards and conventions](https://coinmarketcap.com/api/documentation/guides/standards-and-conventions), and [error format](https://coinmarketcap.com/api/documentation/guides/errors-and-rate-limits) as the keyed Pro API.

## Rate limits

Keyless requests share an IP-based rate pool that keeps the public endpoint fast and stable for everyone.

- If you ever see a `429 Too Many Requests`, **back off and retry with exponential backoff** - a brief wait clears it.
- A free API key (below) gives you your own much higher rate limits, plus the full Pro and DEX catalog.

A minimal backoff that keeps a polling script running smoothly:

```python
import time, urllib.request, json
def get(url, tries=5):
    for i in range(tries):
        try:
            req = urllib.request.Request(url, headers={"Accept": "application/json"})
            return json.load(urllib.request.urlopen(req, timeout=10))
        except urllib.error.HTTPError as e:
            if e.code == 429 and i < tries - 1:
                time.sleep(2 ** i)   # 1s, 2s, 4s, 8s...
                continue
            raise
```

## Want higher limits or more endpoints? Add a key

Keyless calls run the same way at any scale. When you want higher rate limits or the full Pro and DEX catalog, add a free API key - the response shape is identical, so there's nothing to rewrite. Two edits:

1. Remove `/public-api` from the base path.
2. Add your API key as the `X-CMC_PRO_API_KEY` header.

```python
# Keyless:
base    = "https://pro-api.coinmarketcap.com/public-api"
headers = {"Accept": "application/json"}

# With a key - same response shape, higher limits, full endpoint set:
base    = "https://pro-api.coinmarketcap.com"
headers = {"Accept": "application/json", "X-CMC_PRO_API_KEY": "YOUR_KEY"}
```

A [free API key](https://coinmarketcap.com/api/pricing/) (no credit card) raises the rate limits and unlocks the full Pro and DEX catalog - same endpoints, same envelope, nothing to rewrite.

## Common tasks

Each runs keyless with the base URL above.

**Current price of one or more coins** (by CoinMarketCap ID - resolve symbols via [`/v1/cryptocurrency/map`](https://coinmarketcap.com/api/documentation/pro-api-reference/cryptocurrency#cryptocurrency-id-map))

```bash
# 1 = BTC, 1027 = ETH, 5426 = SOL
curl "https://pro-api.coinmarketcap.com/public-api/v1/simple/price?ids=1,1027,5426&convert=USD"
```

**Top 100 cryptocurrencies by market cap**

```bash
curl "https://pro-api.coinmarketcap.com/public-api/v3/cryptocurrency/listings/latest?start=1&limit=100&convert=USD"
```

**Total crypto market cap and global metrics**

```bash
curl "https://pro-api.coinmarketcap.com/public-api/v1/global-metrics/quotes/latest?convert=USD"
```

**Crypto Fear and Greed Index (CMC proprietary)**

```bash
curl "https://pro-api.coinmarketcap.com/public-api/v3/fear-and-greed/latest"
```

**CMC100 index (CMC proprietary)**

```bash
curl "https://pro-api.coinmarketcap.com/public-api/v3/index/cmc100-latest"
```

**DEX pair price by pool**

```bash
curl "https://pro-api.coinmarketcap.com/public-api/v4/dex/pairs/quotes/latest?network_id=1&contract_address=POOL_ADDRESS"
```

**Token detail / market cap / liquidity by contract address**

```bash
curl "https://pro-api.coinmarketcap.com/public-api/v1/dex/token?platform=ethereum&address=TOKEN_ADDRESS"
```

**DEX OHLCV / K-line candles** (see the [K-line candles reference](https://coinmarketcap.com/api/documentation/pro-api-reference/ohlcv#get-k-line-candles) for the full parameter list)

```bash
curl "https://pro-api.coinmarketcap.com/public-api/v1/k-line/candles?platform=ethereum&address=POOL_ADDRESS&interval=1h"
```

## Why this data

Things you can get keyless here that are hard or impossible to get elsewhere without paying:

- **CMC proprietary indices** - Fear and Greed (latest + historical), CMC100 and CMC20 (latest + historical), and the Altcoin Season Index. CoinMarketCap originals, available with no key.
- **First-party canonical reference data** - the authoritative CoinMarketCap ID maps for cryptocurrencies and exchanges, plus full metadata, so IDs resolve against the same source coinmarketcap.com uses.
- **CEX and DEX in one API** - token detail, price, liquidity, pools, holders, security checks, swap history, and K-line candles, alongside CEX market data, under a single base URL and a single envelope. No second host, no separate onchain product to learn.
- **Same shape, no rewrite** - the keyless response has the same structure as the keyed Pro API, so moving to production never breaks your parsing.

## Available endpoints

18 Standard API and 17 DEX endpoints, keyless. The full keyed catalog is larger - a [free key](https://coinmarketcap.com/api/pricing/) unlocks it.

### Standard API

| Endpoint | Description |
| --- | --- |
| [`/v1/simple/price`](https://coinmarketcap.com/api/documentation/pro-api-reference/cryptocurrency#simple-price) | Simple Price |
| [`/v3/cryptocurrency/quotes/latest`](https://coinmarketcap.com/api/documentation/pro-api-reference/cryptocurrency#quotes-latest) | Cryptocurrency Quotes Latest |
| [`/v3/cryptocurrency/listings/latest`](https://coinmarketcap.com/api/documentation/pro-api-reference/cryptocurrency#listings-latest) | Cryptocurrency Listings |
| [`/v2/cryptocurrency/info`](https://coinmarketcap.com/api/documentation/pro-api-reference/cryptocurrency#metadata) | Cryptocurrency Metadata |
| [`/v1/cryptocurrency/map`](https://coinmarketcap.com/api/documentation/pro-api-reference/cryptocurrency#cryptocurrency-id-map) | CoinMarketCap Cryptocurrency ID Map |
| [`/v1/cryptocurrency/categories`](https://coinmarketcap.com/api/documentation/pro-api-reference/cryptocurrency#categories) | Categories |
| [`/v1/cryptocurrency/category`](https://coinmarketcap.com/api/documentation/pro-api-reference/cryptocurrency#category) | Category |
| [`/v1/global-metrics/quotes/latest`](https://coinmarketcap.com/api/documentation/pro-api-reference/global-metrics#quotes-latest-3) | Global Metrics Latest |
| [`/v2/tools/price-conversion`](https://coinmarketcap.com/api/documentation/pro-api-reference/tools#price-conversion-v2) | Price Conversion |
| [`/v1/exchange/map`](https://coinmarketcap.com/api/documentation/pro-api-reference/exchange#exchange-id-map) | CoinMarketCap Exchange ID Map |
| [`/v3/fear-and-greed/latest`](https://coinmarketcap.com/api/documentation/pro-api-reference/global-metrics#cmc-crypto-fear-and-greed-latest) | CMC Crypto Fear and Greed Latest |
| [`/v3/fear-and-greed/historical`](https://coinmarketcap.com/api/documentation/pro-api-reference/global-metrics#cmc-crypto-fear-and-greed-historical) | CMC Crypto Fear and Greed Historical |
| [`/v3/index/cmc100-latest`](https://coinmarketcap.com/api/documentation/pro-api-reference/cmc-index#coinmarketcap-100-index-latest) | CoinMarketCap 100 Index Latest |
| [`/v3/index/cmc100-historical`](https://coinmarketcap.com/api/documentation/pro-api-reference/cmc-index#coinmarketcap-100-index-historical) | CoinMarketCap 100 Index Historical |
| [`/v3/index/cmc20-latest`](https://coinmarketcap.com/api/documentation/pro-api-reference/cmc-index#coinmarketcap-20-index-latest) | CoinMarketCap 20 Index Latest |
| [`/v3/index/cmc20-historical`](https://coinmarketcap.com/api/documentation/pro-api-reference/cmc-index#coinmarketcap-20-index-historical) | CoinMarketCap 20 Index Historical |
| [`/v1/altcoin-season-index/latest`](https://coinmarketcap.com/api/documentation/pro-api-reference/global-metrics#altcoin-season-index-latest) | Altcoin Season Index Latest |
| [`/v1/altcoin-season-index/historical`](https://coinmarketcap.com/api/documentation/pro-api-reference/global-metrics#altcoin-season-index-historical) | Altcoin Season Index Historical |

### DEX API

| Endpoint | Description |
| --- | --- |
| [`/v4/dex/spot-pairs/latest`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#pairs-listings-latest) | Pairs Listings Latest |
| [`/v4/dex/pairs/quotes/latest`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#quotes-latest-4) | DEX Pair Quotes Latest |
| [`/v1/dex/token`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#get-token-detail) | Get token detail |
| [`/v1/dex/token/price`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#get-token-price) | Get token price |
| [`/v1/dex/token-liquidity/query`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#query-token-liquidity) | Query token liquidity |
| [`/v1/dex/token/pools`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#get-token-pools) | Get token pools |
| [`/v1/dex/search`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#search-tokens) | Search tokens |
| [`/v1/dex/security/detail`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#get-security-detail) | Get security detail |
| [`/v1/dex/tokens/transactions`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#get-swap-list) | Get swap list |
| [`/v1/dex/liquidity-change/list`](https://coinmarketcap.com/api/documentation/pro-api-reference/token#get-liquidity-change-list) | Get liquidity change list |
| [`/v1/dex/platform/list`](https://coinmarketcap.com/api/documentation/pro-api-reference/platform#get-platform-list) | Get platform list |
| [`/v1/dex/platform/detail`](https://coinmarketcap.com/api/documentation/pro-api-reference/platform#get-platform-detail) | Get platform detail |
| [`/v1/k-line/candles`](https://coinmarketcap.com/api/documentation/pro-api-reference/ohlcv#get-k-line-candles) | K-line candles |
| [`/v1/k-line/points`](https://coinmarketcap.com/api/documentation/pro-api-reference/ohlcv#get-k-line-points) | K-line points |
| [`/v1/dex/holders/list`](https://coinmarketcap.com/api/documentation/pro-api-reference/holder#get-holders-list) | Get holders list |
| [`/v1/dex/holders/count`](https://coinmarketcap.com/api/documentation/pro-api-reference/holder#get-holder-count) | Get holder count |
| [`/v1/dex/holders/detail`](https://coinmarketcap.com/api/documentation/pro-api-reference/holder#get-holder-detail) | Get holder detail |

## Ready for more?

- **Next: set up a key** - [Get Started with an API Key](https://coinmarketcap.com/api/documentation/guides/quick-start) walks you through getting a [free API key](https://coinmarketcap.com/api/pricing/) (no credit card) and making your first authenticated request - same response shape, much higher rate limits, plus the full Pro and DEX catalog.
- **Full endpoint reference** - [choose an endpoint](https://coinmarketcap.com/api/documentation/pro-api-reference/endpoint-overview).
- **Standards, conventions, and errors** - [read the guides](https://coinmarketcap.com/api/documentation/guides/standards-and-conventions).
