
Fear and Greed Index API: Market Mood for Python, Node and AI Agents
A fear and greed index API with a documented schema. SentiSense Market Mood returns a 0-100 fear-to-greed score for the US stock market, its phase, six signal components, sector scores and trading-day history. One free key, then curl, Python, Node, a CLI, an MCP tool or an agent skill.
SentiSense Market Mood is a fear and greed index API: GET https://app.sentisense.ai/api/v2/market-mood returns a 0-100 fear-to-greed score for the US stock market, its phase, the six signals behind it, per-sector scores and daily history, with a documented schema and a free API key. Market Mood is our own index, built from our own signals. "Fear and greed index" is the category it belongs to.
Every example below ran against the live API on 2026-09-25 with a free key.
Is there a fear and greed index API?
Yes. Market Mood is served two ways with one key:
GET /api/v2/market-mood?days=180: the full view. Composite score, phase, weekly change, the six signals, daily history over the requested window and a score for each of the 11 GICS sectors.GET /api/v1/indexes/market-moodand/api/v1/indexes/market-mood/history?days=180: the same headline number in the shared Indexes API envelope, alongside the Fed Sentiment and AI Sentiment indexes.
Both are available on every tier with identical payloads. Requests need an API key and count against the monthly quota.
What does the fear and greed index API return?
curl -H "X-SentiSense-API-Key: $SENTISENSE_API_KEY" \
"https://app.sentisense.ai/api/v2/market-mood?days=30"
Output on 2026-09-25, trimmed to one history point and two sectors:
{
"market": {
"currentScore": 59.13914353924022,
"phase": "Optimism",
"weeklyChange": 22.4,
"signals": [
{ "key": "social_sentiment", "label": "Social Sentiment", "value": 53.19, "change": 0 },
{ "key": "market_direction", "label": "Market Direction", "value": 64.57, "change": 33.5 },
{ "key": "fear_gauge", "label": "Risk Appetite", "value": 98.59, "change": 2.8 },
{ "key": "social_momentum", "label": "Social Momentum", "value": 48.35, "change": 48.4 },
{ "key": "spy_trend", "label": "S&P 500 Trend", "value": 31.11, "change": 17.8 },
{ "key": "options_flow", "label": "Options Flow", "value": 56.99, "change": 57.0 }
],
"history": [
{ "date": "2026-09-25", "timestamp": 1790308800000, "score": 59.13914353924022,
"socialSentiment": 53.19, "marketDirection": 64.57, "fearGauge": 98.59,
"socialMomentum": 48.35, "spyTrend": 31.11, "optionsFlow": 56.99 }
]
},
"sectors": {
"Information Technology": { "currentScore": 66.5663145832018, "phase": "Optimism", "weeklyChange": 16.6 },
"Real Estate": { "currentScore": 39.4699315952405, "phase": "Anxiety", "weeklyChange": 7.4 }
}
}
How to read it:
currentScoreis 0-100, higher is greedier.phasemaps the score onto seven bands: Extreme Fear (0-15), Fear (16-30), Anxiety (31-45), Neutral (46-55), Optimism (56-70), Greed (71-85), Extreme Greed (86-100).weeklyChangeand each signal'schangeare the move over the last five trading days.signalsshare the composite's 0-100 scale. Match onkey, not array position; only the signals present in the latest reading are listed.fear_gaugeis labeled Risk Appetite because it is an inverse volatility read: high means calm, risk-on.historyhas one point per weekday and no weekend rows (days=30returned 21 points). The last point'sdateis the reading's freshness.sectorsis keyed by GICS sector name, each with its own score, phase and weekly change.
Field-by-field reference: the Market Mood API page.
Stock market fear and greed index in Python
pip install sentisense
export SENTISENSE_API_KEY=ss_live_YOUR_KEY
Today's reading with the signal breakdown:
import os
from sentisense import SentiSenseClient
client = SentiSenseClient(api_key=os.environ["SENTISENSE_API_KEY"])
mood = client.get_market_mood(days=30)
m = mood["market"]
latest = m["history"][-1]
print(f"Market Mood {m['currentScore']:.1f} ({m['phase']}) as of {latest['date']}, "
f"weekly change {m['weeklyChange']:+.1f}")
for s in m["signals"]:
print(f" {s['label']:17} {s['value']:5.1f} (week {s['change']:+.1f})")
print(f"{len(m['history'])} trading days in the window, {m['history'][0]['date']} to {latest['date']}")
Market Mood 59.1 (Optimism) as of 2026-09-25, weekly change +22.4
Social Sentiment 53.2 (week +0.0)
Market Direction 64.6 (week +33.5)
Risk Appetite 98.6 (week +2.8)
Social Momentum 48.4 (week +48.4)
S&P 500 Trend 31.1 (week +17.8)
Options Flow 57.0 (week +57.0)
21 trading days in the window, 2026-08-28 to 2026-09-25
The Indexes route returns the plain date-and-value series. This script lists the days the index crossed into a different band:
BANDS = [(15, "Extreme Fear"), (30, "Fear"), (45, "Anxiety"), (55, "Neutral"),
(70, "Optimism"), (85, "Greed"), (100, "Extreme Greed")]
band = lambda v: next(label for edge, label in BANDS if v <= edge)
hist = client.get_index_history("market-mood", days=180).history
print(f"{len(hist)} trading days, {hist[0].date} to {hist[-1].date}")
changes = [(a, b) for a, b in zip(hist, hist[1:]) if band(a.value) != band(b.value)]
print(f"{len(changes)} band changes; the last five:")
for a, b in changes[-5:]:
print(f" {b.date} {band(a.value)} -> {band(b.value)} ({a.value:.1f} -> {b.value:.1f})")
129 trading days, 2026-03-31 to 2026-09-25
39 band changes; the last five:
2026-09-08 Neutral -> Anxiety (49.3 -> 42.8)
2026-09-16 Anxiety -> Fear (31.8 -> 28.5)
2026-09-17 Fear -> Anxiety (28.5 -> 39.3)
2026-09-21 Anxiety -> Neutral (36.8 -> 49.5)
2026-09-25 Neutral -> Optimism (54.0 -> 59.1)
client.get_index("market-mood") returns the latest reading in the same envelope; its constituents, basketSize, coverage and totalMentions are None, because a composite has no constituents by construction.
Fear and greed index in Node
npm install sentisense
import SentiSense from "sentisense";
const client = new SentiSense({ apiKey: process.env.SENTISENSE_API_KEY });
const { market, sectors } = await client.marketMood.get();
console.log(`Market Mood ${market.currentScore.toFixed(1)} (${market.phase}), weekly ${market.weeklyChange > 0 ? "+" : ""}${market.weeklyChange}`);
const ranked = Object.entries(sectors).sort((a, b) => b[1].currentScore - a[1].currentScore);
for (const [name, s] of ranked.slice(0, 3)) console.log(` ${name}: ${s.currentScore.toFixed(1)} (${s.phase})`);
const { history } = await client.indexes.history("market-mood", 30);
console.log(`${history.length} trading days, last ${history.at(-1).date} = ${history.at(-1).value.toFixed(1)}`);
Market Mood 59.1 (Optimism), weekly +22.4
Information Technology: 66.6 (Optimism)
Health Care: 62.6 (Optimism)
Industrials: 56.9 (Optimism)
21 trading days, last 2026-09-25 = 59.1
Fear and greed index for AI agents
An agent reads the same series three ways, with no script.
MCP connector. Add https://app.sentisense.ai/mcp to Claude, ChatGPT or Grok as a custom connector and sign in; no key to paste. From a terminal:
# Claude Code
claude mcp add sentisense -- npx -y mcp-remote@0.1.38 https://app.sentisense.ai/mcp
# Codex
codex mcp add sentisense --url https://app.sentisense.ai/mcp
codex mcp login sentisense
The get_market_mood tool takes no arguments and returns the score and phase, the weekly change, the six signals with band labels, and the hottest and coolest sectors, with a note that the reading is the latest analytical batch, not a real-time quote. Per-host setup: the MCP connector page.
CLI. Any agent with a shell can run the official CLI with nothing installed:
npx -y sentisense mood # terminal layout: score, signals, a 60-day sparkline, the sector table
npx -y sentisense mood --json # the exact /api/v2/market-mood response
Skills. The SentiSense skills are markdown playbooks a coding agent reads. The sentisense API reference, stock-sentiment, stock-market-dashboard, last-30-days-in-markets and market-heatmap skills all read Market Mood.
# Claude Code
claude plugin marketplace add SentiSenseApp/skills
claude plugin install sentisense@sentisense
# Cursor, Codex, Gemini and other coding agents
npx skills add SentiSenseApp/skills
# OpenClaw
openclaw plugins install clawhub:@sentisenseapp/stock-analysis
The CLI and the skills read the key from SENTISENSE_API_KEY. Without an installer, point the agent at sentisense.ai/skill.md, the whole API reference in one file.
How often does it update, and what does it cost?
Market Mood is recomputed on US trading days, several times a day, with the last pass in the evening Eastern time, so a day's reading settles after the close. It is a nowcast of how the market feels, not a forecast and not a live tick.
A free key covers everything on this page: 1,000 requests a month at up to 30 a minute, with the full payload. PRO removes the monthly cap and raises the rate limit to 300 a minute, which matters once a dashboard polls sectors and history on a schedule. The same index is on the live page at app.sentisense.ai/indexes/market-mood.
Related reading
- Market Mood: A Free Alternative to the Fear & Greed Index: what the six signals measure
- Market Sentiment Index API: the envelope shared by Market Mood, Fed Sentiment and AI Sentiment
- How to Connect Market Data to Your AI Agent: which surface fits which runtime
Ready to run it? Get a free API key → and paste it into the export line above.
SentiSense provides market information and sentiment analysis for informational and educational purposes only. Market Mood is derived from AI-analyzed data and should not be relied upon for investment decisions. It is not investment advice.