# Crypto Fear & Greed Index Tracker (Historical + Trend) (`gochujang/fear-greed-tracker`) Actor

Tracks the Alternative.me Crypto Fear & Greed Index: historical time-series, regime detection (extreme fear/greed), 7d/30d rolling averages, streak counting, BTC price correlation, and Telegram alerts on extreme readings. No API key required.

- **URL**: https://apify.com/gochujang/fear-greed-tracker.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Business, News, Marketing
- **Stats:** 10 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### Crypto Fear & Greed Index API with Historical Data and Trend Analysis

**Track the Alternative.me Crypto Fear & Greed Index** — get today's sentiment score, full history since 2018 (3,100+ days), regime detection, streak counting, rolling averages, and optional Telegram alerts — all in under 5 seconds with **no API key required**.

Run with one click on Apify's fully managed cloud. No servers, no rate limits, no credential management.

***

### What Does This Actor Do?

The **Crypto Fear & Greed Index Tracker** fetches live and historical sentiment data from the Alternative.me public API and enriches it with regime analysis, trend direction, and optional BTC price correlation via CoinGecko. It returns a **clean, structured dataset** ready for trading bots, dashboards, quant backtests, and portfolio alert systems.

Each run delivers a time-series of daily index readings (value 0–100, classification, regime label, BTC price) **plus a SUMMARY record** in the Apify key-value store with current streak, 7-day and 30-day rolling averages, trend direction, and a full regime breakdown — no postprocessing required.

***

### Why Use This Actor?

- **Contrarian trading signal**: Extreme Fear readings (< 25) have historically coincided with Bitcoin market bottoms; Extreme Greed (> 75) often precedes sharp corrections.
- **Quantitative backtesting**: Access the complete Fear & Greed history from February 2018 — over 3,100 daily data points — for strategy development and validation.
- **Regime-aware bots**: Feed the current regime label (`extreme_fear`, `fear`, `neutral`, `greed`, `extreme_greed`) directly into trading algorithms to dynamically adjust position sizing.
- **Real-time Telegram alerts**: Set a custom threshold and receive an instant push notification when sentiment crosses it (e.g., "alert me when F\&G drops below 20").
- **Portfolio dashboards**: Schedule daily runs on Apify to populate a live crypto sentiment dashboard without managing infrastructure.
- **Mean-reversion timing**: Streak length reveals how long the market has been in an extreme — extended streaks are statistically more likely to revert.

***

### How to Use This Actor

1. Open the actor on Apify and click **Try for free**.
2. Set `daysBack` to the number of historical days you want (default: 30; use `0` for the full history since 2018).
3. Toggle `includeBtcCorrelation` to also fetch BTC/USD daily prices alongside the index.
4. *(Optional)* Set `alertThreshold`, `telegramBotToken`, and `telegramChatId` to receive Telegram alerts when the index crosses a threshold.
5. Click **Start** — results appear in the dataset within seconds.
6. Integrate via the Apify API, webhooks, or schedule automated daily runs.

***

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `daysBack` | Integer | 30 | Days of history to fetch. Set to `0` for the full history since Feb 2018 (~3,100+ days). |
| `historyDays` | Integer | — | Attach a compact history array (up to 365 days) to the current-day row. Useful for single-row API consumers. |
| `includeBtcCorrelation` | Boolean | true | Fetch BTC/USD daily price from CoinGecko and correlate with the F\&G index across all rows. |
| `includeBtcPrice` | Boolean | false | Append the current BTC/USD spot price to the latest row only. |
| `includeComponents` | Boolean | false | Request sub-component fields (volatility, momentum, social, dominance, trends). Note: the Alternative.me public API does not expose individual components. |
| `alertThreshold` | Object | `{}` | Trigger Telegram alert on threshold cross. Example: `{"below": 20}` or `{"above": 80}`. |
| `telegramBotToken` | String | — | Telegram bot token (required for alerts). |
| `telegramChatId` | String | — | Telegram chat ID for alert delivery. |

***

### Output

Results are written to the Apify dataset (one row per day) and a SUMMARY record is written to the key-value store.

**Dataset row example:**

```json
[
  {
    "date": "2025-09-10",
    "timestamp": "2025-09-10T00:00:00+00:00",
    "value": 22,
    "regime": "extreme_fear",
    "classification": "Extreme Fear",
    "btc_price_usd": 54320.50
  },
  {
    "date": "2025-09-09",
    "timestamp": "2025-09-09T00:00:00+00:00",
    "value": 25,
    "regime": "fear",
    "classification": "Fear",
    "btc_price_usd": 55100.00
  }
]
```

**SUMMARY record (key-value store):**

```json
{
  "current_value": 22,
  "current_regime": "extreme_fear",
  "streak_days": 4,
  "trend_7d": "deteriorating",
  "avg_7d": 28.4,
  "avg_30d": 41.2,
  "regime_breakdown": {
    "extreme_fear": 6,
    "fear": 12,
    "neutral": 8,
    "greed": 3,
    "extreme_greed": 1
  }
}
```

***

### Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `date` | String | ISO 8601 date (`YYYY-MM-DD`) |
| `timestamp` | String | ISO 8601 datetime with UTC offset |
| `value` | Integer | Fear & Greed score, 0 (maximum fear) to 100 (maximum greed) |
| `regime` | String | Machine-readable label: `extreme_fear`, `fear`, `neutral`, `greed`, `extreme_greed` |
| `classification` | String | Human-readable label matching the Alternative.me display |
| `btc_price_usd` | Float | BTC/USD daily price (when `includeBtcCorrelation` is enabled) |
| `streak_days` | Integer | *(SUMMARY)* Consecutive days in the current regime |
| `trend_7d` | String | *(SUMMARY)* Sentiment trend vs. 7 days ago: `improving`, `deteriorating`, or `stable` |
| `avg_7d` | Float | *(SUMMARY)* Rolling 7-day average index value |
| `avg_30d` | Float | *(SUMMARY)* Rolling 30-day average index value |
| `regime_breakdown` | Object | *(SUMMARY)* Day-count per regime over the lookback window |

***

### Cost Estimation

**Pay-Per-Event pricing: $0.0005 per day of data returned.**

| Request | Days returned | Estimated cost |
|---------|--------------|----------------|
| Default (30 days) | 30 | ~$0.015 |
| 90-day lookback | 90 | ~$0.045 |
| 1-year lookback | 365 | ~$0.18 |
| Full history (2018–present) | ~3,100 | ~$1.55 |

Apify free-tier credits cover many runs. Typical run time is under 5 seconds.

***

### FAQ

**Does this actor require an API key?**
No. Data is sourced from the [Alternative.me Fear & Greed API](https://alternative.me/crypto/fear-and-greed-index/) and CoinGecko, both of which are free public endpoints with no authentication required.

**How far back does the historical data go?**
Alternative.me provides daily Fear & Greed Index data starting from February 2018. Set `daysBack: 0` to retrieve the complete history (3,100+ days as of 2025).

**Can I schedule daily automated runs?**
Yes. Use Apify's built-in scheduler to run this actor once per day and always have fresh sentiment data. You can also trigger runs via the Apify API or webhooks and push results directly to your database.

***

> **Disclaimer:** The Fear & Greed Index is a sentiment indicator, not financial advice. Past correlations between extreme readings and price reversals do not guarantee future results. Always conduct your own research before making investment decisions.

***

### Related actors

- [Fear & Greed Backtester](https://apify.com/gochujang/fear-greed-backtester) — Backtest strategy rules against the historical fear/greed data this actor provides
- [Crypto Market Fear Composite](https://apify.com/gochujang/crypto-market-fear-composite) — Multi-signal fear composite to validate extremes detected by this actor
- [Crypto News Aggregator](https://apify.com/gochujang/crypto-news-aggregator) — News sentiment to contextualize fear/greed index readings

### Feedback

If this actor powers your sentiment research, a review helps others find it: [Leave a review on Apify Store](https://apify.com/gochujang/fear-greed-tracker#reviews)

# Actor input Schema

## `daysBack` (type: `integer`):

Number of historical days to fetch. Use 0 for full history (Alternative.me provides data since Feb 2018, ~3100+ days). Takes precedence over lookbackDays.

## `lookbackDays` (type: `integer`):

Alias for daysBack. Use daysBack instead. Range 1-3650.

## `historyDays` (type: `integer`):

Attach a compact history array to the current-day row. 0 = current value only (history: \[]); 1-365 = include that many past days as \[{date, value, classification}]. When set, overrides daysBack/lookbackDays for the fetch window.

## `includeBtcCorrelation` (type: `boolean`):

Fetch BTC/USD daily price from CoinGecko market\_chart to correlate with F\&G index across all returned rows.

## `includeBtcPrice` (type: `boolean`):

Append current BTC/USD price (btc\_price\_usd) to the latest row, fetched from CoinGecko simple price endpoint. No API key required.

## `includeComponents` (type: `boolean`):

Attempt to include Fear & Greed sub-components (volatility, market\_momentum, social\_media, btc\_dominance, google\_trends). Note: the alternative.me public API does not expose individual components — the components field will contain an explanatory note when enabled.

## `alertThreshold` (type: `object`):

Trigger Telegram alert when F\&G crosses threshold. E.g. {"below": 20} for extreme fear, {"above": 80} for extreme greed.

## `telegramBotToken` (type: `string`):

Bot token for Telegram alerts (requires alertThreshold).

## `telegramChatId` (type: `string`):

Chat ID for Telegram alerts.

## Actor input object example

```json
{
  "daysBack": 30,
  "lookbackDays": 30,
  "includeBtcCorrelation": true,
  "includeBtcPrice": false,
  "includeComponents": false,
  "alertThreshold": {}
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/fear-greed-tracker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/fear-greed-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call gochujang/fear-greed-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/fear-greed-tracker"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KCFjzVS0ldLck5FDF/builds/0gUNdiDotLTygr9Sh/openapi.json
