Where do I get a fear and greed index historical data download?

If you have searched for a fear and greed index historical data download, you have probably found the same thing everyone does: a chart you can look at but not query, a CSV that stops in 2023, or a scraper someone wrote for a notebook that no longer runs. The index itself, published daily by alternative.me since February 2018, is one of the most-cited crypto sentiment series, and one of the most awkward to get as a clean table.

The CryptoDataAPI serves the full daily series from 2018-02-01 to today as one JSON array from a single route:

curl "https://cryptodataapi.com/api/v1/market-intelligence/fear-greed-history" \
  -H "X-API-Key: cdk_live_your_key"

That is about 3,200 rows, oldest first, each with a date, the 0-100 value and its classification band. There is one optional parameter, days (1 to 5000), which keeps only the most recent N rows. Omit it for the whole history. Any API key can call it; a free key is enough for the entire download.

This post is about getting and using that full series. For what the index measures and how a contrarian rule is built around it, see the earlier post on the multi-source Fear & Greed endpoint.

What the response looks like

The envelope is deliberately small: a history array and a count.

{
  "history": [
    {"date": "2018-02-01", "value": 30, "classification": "Fear"},
    {"date": "2018-02-02", "value": 15, "classification": "Extreme Fear"},
    {"date": "2018-02-03", "value": 40, "classification": "Fear"},
    ...
    {"date": "2026-11-14", "value": 54, "classification": "Neutral"}
  ],
  "count": 3209
}

The rows above are an illustration of the shape; pull the route for the real values. Three facts about the data:

One caveat worth knowing before you compare it with the live number. The current reading on /sentiment/fear-greed averages alternative.me with CoinMarketCap's index, so today's live value can differ from the last row here by a few points. The history is alternative.me alone, which is what you want for a consistent backtest series.

Loading the full series into pandas

import httpx
import pandas as pd

r = httpx.get(
    "https://cryptodataapi.com/api/v1/market-intelligence/fear-greed-history",
    headers={"X-API-Key": "cdk_live_your_key"},
    timeout=30,
)
r.raise_for_status()
fg = pd.DataFrame(r.json()["history"])
fg["date"] = pd.to_datetime(fg["date"], utc=True)
fg = fg.set_index("date").sort_index()

print(fg.index.min(), fg.index.max(), len(fg))
print(fg["classification"].value_counts())

# a 7-day smoothed reading and the band it falls in
fg["value_7d"] = fg["value"].rolling(7).mean()
fg.to_parquet("fear_greed_daily.parquet")

Save it locally once. The series only grows by one row a day, so a daily days=7 call to top up the file is all the maintenance it needs:

curl "https://cryptodataapi.com/api/v1/market-intelligence/fear-greed-history?days=7" \
  -H "X-API-Key: cdk_live_your_key"

That keeps the request well inside a free key's daily quota and avoids re-downloading eight years every morning.

A contrarian backtest sketch (illustrative, not a result)

The classic use of the index is contrarian: buy when the crowd is in Extreme Fear, reduce when it is in Extreme Greed. Here is the skeleton of that test, joined to daily BTC closes from the same API. This is a template for your own evaluation, not a published result. No performance figures are given here because the right ones depend on your fee model, slippage and holding rule.

import httpx
import pandas as pd

H = {"X-API-Key": "cdk_live_your_key"}
BASE = "https://cryptodataapi.com/api/v1"

fg = pd.DataFrame(httpx.get(f"{BASE}/market-intelligence/fear-greed-history",
                            headers=H, timeout=30).json()["history"])
fg["date"] = pd.to_datetime(fg["date"], utc=True)
fg = fg.set_index("date")["value"]

# daily BTC closes for the same window (Binance 1d klines via /market-data/klines)
kl = httpx.get(f"{BASE}/market-data/klines",
               params={"symbol": "BTCUSDT", "interval": "1d", "limit": 1000},
               headers=H, timeout=60).json()
px = pd.Series({pd.to_datetime(k["open_time"], unit="ms", utc=True): float(k["close"])
                for k in kl["klines"]}).sort_index()

df = pd.concat({"fg": fg, "close": px}, axis=1).dropna()
df["ret_next"] = df["close"].pct_change().shift(-1)   # next-day return, no lookahead

# the rule: long the day after an Extreme Fear print, flat otherwise
df["pos"] = (df["fg"] <= 25).astype(int)
df["strat"] = df["pos"] * df["ret_next"]

# inspect by band before trusting any curve
print(df.groupby(pd.cut(df["fg"], [0, 25, 40, 60, 75, 100]))["ret_next"].describe())

Check the klines field names against the docs for the kline route you use; the join key is the UTC day. Two things to do before believing the output:

Three features you can only build from the full series

A recent window answers "what is sentiment now". The full array answers questions about duration and rarity, which is where the index earns its place in a model. Three features that need all 3,200 rows:

fg["is_xfear"] = fg["value"] <= 25
fg["days_since_xfear"] = (~fg["is_xfear"]).groupby(fg["is_xfear"].cumsum()).cumcount()
fg["pctile_all_time"] = fg["value"].expanding().rank(pct=True)
run_id = (fg["classification"] != fg["classification"].shift()).cumsum()
fg["band_dwell_days"] = fg.groupby(run_id).cumcount() + 1

Each line uses only past rows for the row it fills, so the features are point-in-time safe when joined to prices on the same UTC day.

Full history vs the live reading: which route for which job

/market-intelligence/fear-greed-history/sentiment/fear-greed
What it isDaily series from 2018-02-01, oldest firstToday's reading, averaged across sources
Sourcealternative.mealternative.me and CoinMarketCap, averaged
Fieldshistory[{date, value, classification}], countvalue, classification, sources, individual_values, timestamp
Parametersdays (1-5000, optional)format=markdown for plain text
Use forBacktests, regime studies, chartsA live gate in a bot or an agent prompt
GotchaToday's row can differ from the live value by a few pointsNot a history; poll it, do not reconstruct from it

If you were calling the history route between 2026-07-22 and 2026-10-17 and got a single row, that was the gap left by the CoinGlass cutover; the API changelog entry for 2026-10-17 records when the full series returned. The changelog is the place to confirm shape changes like that.

When to use this (and when not to)

Use the full history when you need a sentiment regressor across cycles: the 2018 bear, the 2020 crash, the 2021 double top, 2022's drawdown and the 2024 ETF run are all in the one array. It is also the right input for a "days since last Extreme Fear" feature, which needs the whole series rather than a recent window.

Do not use it as a price-timing tool on its own. The index is a composite of volatility, momentum, social and dominance inputs, so part of it is a lagged function of price. Conditioning on it and then measuring price is partly measuring price on price. Pair it with something orthogonal, such as funding or the stablecoin dry-powder read, before drawing a conclusion.

Know what null is not here. Every row in this series has an integer value; a missing day would be absent, not zero. Treat a gap in dates as a gap, and do not forward-fill across it without saying so in your results.

For an agent, the same route is one tool call away through the MCP server: claude mcp add --transport http cryptodataapi https://cryptodataapi.com/mcp. The docs cover both routes, and a free key covers the download.

Frequently asked questions

How do I download the full crypto Fear & Greed index history?

One authenticated GET to https://cryptodataapi.com/api/v1/market-intelligence/fear-greed-history returns alternative.me's daily index from 2018-02-01 to today, about 3,200 rows oldest first, each with date, value and classification. A free API key is enough.

What does the days parameter do?

days keeps only the most recent N rows (1 to 5000). Omit it to get the whole series; use days=7 for a cheap daily top-up of a locally saved file.

Why does the last row differ from /sentiment/fear-greed?

The live /sentiment/fear-greed route averages alternative.me with CoinMarketCap's index, so today's value there can differ from the history's last row by a few points. The history is alternative.me alone.

What are the classification bands?

0-25 Extreme Fear, 26-40 Fear, 41-60 Neutral, 61-75 Greed, 76-100 Extreme Greed, the same bands the live route uses.