Fear & Greed
AIAsk about markets, a ticker or the economy on LunaTerminal.My watchlistKeep your saved stocks and portfolios in one place.

API documentation

A REST API over the data behind Fear & Greed. Every endpoint returns JSON, is authenticated with a bearer token and is rate limited per plan.

Quickstart

  1. Create a key from your dashboard. It is shown once, so copy it straight into an environment variable.
  2. Send it as a bearer token on every request.
  3. Read the JSON response.

Request

curl https://feargreedflow.com/api/v1/fear-greed \
  -H "Authorization: Bearer $FEARANDGREED_API_KEY"

Response

{
  "as_of": "2026-08-29",
  "current": 54,
  "zone": "Neutral",
  "previous_close": 51,
  "indicators": { "market_momentum": 52.4, "...": null },
  "plan": "free"
}

Python

import os, requests

r = requests.get(
    "https://feargreedflow.com/api/v1/fear-greed",
    headers={"Authorization": f"Bearer {os.environ['FEARANDGREED_API_KEY']}"},
    timeout=10,
)
r.raise_for_status()
print(r.json()["current"])

JavaScript

const res = await fetch("https://feargreedflow.com/api/v1/fear-greed", {
  headers: { Authorization: `Bearer ${process.env.FEARANDGREED_API_KEY}` },
});
if (!res.ok) throw new Error(await res.text());
const { current, zone } = await res.json();

Authentication

Pass your key in the Authorization header using the Bearer scheme. Keys begin with sk_live_.

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx

There is no query-string parameter for the key, deliberately: URLs are written to server logs, browser history and Referer headers, and a key that reaches any of those is compromised.

Never expose a key in a browser. Anything shipped to the client is readable by every visitor. Call the API from your server and pass the result down.

Rate limits

Limits are applied per key, over a 24-hour window on every plan. Every response carries the current state:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 97
PlanRequest limitHistorical lookback
Free100 / day3 years
Pro5,000 / dayFull history

Exceeding the limit returns 429 with a Retry-After header in seconds. Back off for that long rather than retrying immediately.

Errors

Errors return the appropriate status with a JSON body of the form { "error": "..." }.

StatusMeaningCause
200OKThe request succeeded.
401UnauthorizedThe key is missing, malformed, unknown or revoked.
403ForbiddenThe key is valid but the endpoint requires a higher plan.
429Too Many RequestsPlan rate limit exhausted. See the Retry-After header.
503Service UnavailableAn upstream data source is temporarily unreachable.

Endpoints

Endpoints marked live are available now. The rest are documented ahead of release and are not yet callable.

The Fear and Greed Index also has free CSV and JSON downloads with no API key required.

EndpointDescriptionPlanStatus
/v1/fear-greedCurrent reading, zone, previous close and indicators.FreeLive
/v1/fear-greed?history=trueAdds the daily series. Free keys get 3 years of history. Pro keys get the full series.FreeLive
/v1/pricesOHLC price candles for a ticker.FreePlanned
/v1/stock-profileCompany profile, sector, market cap and fundamentals.FreePlanned
/v1/earnings-calendarUpcoming and historical earnings dates.FreePlanned
/v1/screenerScreen the market by fundamentals and performance.ProPlanned
/v1/stock-mapMarket treemap data by sector and performance.ProPlanned
/v1/chart-metricsCompare fundamental metrics across the market.ProPlanned
/v1/13f13F filings by institution and quarter.ProPlanned
/v1/etf-holdingsConstituent holdings and weights for covered ETFs.ProPlanned
/v1/spy-gexDealer gamma exposure by strike and expiration.ProPlanned
/v1/implied-moveOptions-implied move into the next earnings date.ProPlanned

MCP server

Open the MCP setup guide for client configurations, example questions, the tool reference and troubleshooting.

Connect an AI agent to the site through the read-only Model Context Protocol server. It uses Streamable HTTP at https://feargreedflow.com/mcpand requires a Pro API key. The same key works for REST requests.

In your agent's MCP settings, add the server URL and set the Authorization header to Bearer YOUR_API_KEY. Keep the key in your agent's secret storage, not in a shared config file.

The server provides these tools:

  • get_site_guide explains the site, methodology and data sources.
  • find_site_pages locates pages relevant to a question.
  • get_fear_greed_index returns the latest dated reading and indicators.
  • get_fear_greed_history returns up to 365 recent daily readings.
  • get_stock_quotes returns prices and daily changes for up to ten tickers.

Ask your agent, for example, “What is the latest Fear and Greed reading, and how has it changed over the past week?” Tool results include source links and dates so the agent can cite the site accurately.

Key security

  • Store keys in environment variables, never in source control. If a key reaches a public repository, revoke it immediately.
  • Use one key per application. A leak then costs you one revocation rather than every integration you run.
  • Rotate on staff changes and whenever a key may have been exposed. Create the replacement, deploy it, then revoke the old one for zero downtime.
  • We cannot recover a key. Only a hash is stored, so support cannot read one back to you. Rotation is always the answer.

Manage all of this from your API keys dashboard.