# Crypto Fear & Greed Index + Market Sentiment (`yadroo/crypto-sentiment`) Actor

Crypto market sentiment for agents and alerts: Fear & Greed Index with full history since 2018 (daily/weekly/monthly, moving averages, streaks, percentile), global market cap, BTC/ETH/stablecoin dominance, DeFi stats, trending coins and per-coin sentiment votes from CoinGecko. One call, no API key.

- **URL**: https://apify.com/yadroo/crypto-sentiment.md
- **Developed by:** [Samat Makatov](https://apify.com/yadroo) (community)
- **Categories:** AI, Developer tools, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Crypto Fear & Greed Index + Market Sentiment

The daily Crypto Fear & Greed Index (alternative.me) with its **full history since February 2018**, enriched with moving averages, streaks and percentiles, plus live market context from CoinGecko: total market cap, 24 h volume, BTC / ETH / stablecoin dominance, DeFi stats, trending coins and per-coin community sentiment votes. One call, clean JSON, built for trading bots, dashboards, alerting and backtests. No API key, no browser, no proxy.

### Use cases

- **Risk-on / risk-off switch** — `mode: "summary"` every morning; act on `classification`, `change7d`, `percentile365d`.
- **Alerting** — fire when `value <= 20` (Extreme Fear) or the `streakDays` in Greed exceeds 30.
- **Backtesting** — `mode: "history"`, `from: "2018-02-01"`, `aggregate: "weekly"` → 400+ weekly rows in one run.
- **Dashboards / newsletters** — default `daily` rows with market cap, dominance and trending coins attached.
- **Coin-level sentiment** — `mode: "coins"` for BTC/ETH/SOL: bullish-vote %, watchlist users, whether it is trending, price change.
- **Macro context for LLM agents** — one compact row (`summary`) that a model can reason over before trading or writing.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `mode` | `daily` | `summary` | `history` | `coins` | `daily` | See modes below. |
| `days` | integer 1–5000 | `30` | Latest N days (daily/history). ~3100 days exist. |
| `from`, `to` | `YYYY-MM-DD` | — | Explicit UTC window; overrides `days`. |
| `aggregate` | `daily` | `weekly` | `monthly` | `daily` | history mode only. |
| `includeGlobal` | boolean | `true` | Market cap, volume, dominance, active coins (daily/summary). |
| `includeTrending` | boolean | `true` | Top-15 trending coins (daily/summary); `isTrending` flag in coins mode. |
| `includeDefi` | boolean | `false` | DeFi market cap / dominance / volume (daily/summary). |
| `coinIds` | string\[] | `[]` | CoinGecko ids for coins mode (`bitcoin`, `ethereum`, `solana`…), max 30. |
| `vsCurrency` | enum | `usd` | Any CoinGecko vs\_currency (usd, eur, gbp, jpy, btc, eth, … 62 values in the schema). |
| `coingeckoApiKey` | string (secret) | — | Optional Demo/Pro key for faster CoinGecko calls. Never required. |
| `fields` | string\[] | `[]` | Output only these fields. |

`days` and `includeTrending` keep their original meaning; the default output shape is unchanged (`date`, `fearGreed`, `classification`, market context on the first row) with new fields added.

#### Modes

| Mode | Rows | What you get |
|---|---|---|
| `daily` | one per day, newest first | `fearGreed`, `classification`, `change1d`, `change7d`, `ma7`, `ma30`; first row also carries global market stats, DeFi stats and trending coins. |
| `summary` | 1 | Current value + `prevDay`, `change1d/7d/30d`, `avg7d/30d/90d/365d`, `min30d`/`max30d` with dates, `min365d`/`max365d`, `percentile365d`, `streakDays`, `daysSinceExtremeFear/Greed`, `zoneChanges30d`, plus global / DeFi / trending. |
| `history` | one per period | `period`, `from`, `to`, `days`, `avg`, `min`, `max`, `open`, `close`, `classification` for any date range, daily/weekly/monthly. |
| `coins` | one per coin | `sentimentUpPct`, `sentimentDownPct`, `watchlistUsers`, `rank`, `price`, `change24h/7d/30d`, `marketCap`, `volume24h`, `athChangePct`, `categories`, `twitter`, `subreddit`, `isTrending`, plus market-wide `marketFearGreed`. |

### Reference

**Fear & Greed classification buckets** (alternative.me): 0–24 Extreme Fear · 25–44 Fear · 45–55 Neutral · 56–75 Greed · 76–100 Extreme Greed. The index blends volatility, market momentum/volume, social media, dominance and trends; it is published once per day (UTC) and history starts 2018-02-01.

**Dominance keys** in `dominance`: CoinGecko's top-10 by market cap at run time (typically `btc`, `eth`, `usdt`, `bnb`, `xrp`, `usdc`, `sol`, `trx`, `steth`, …). `stablecoinDominance` = USDT + USDC share.

**CoinGecko ids** are slugs (`bitcoin`, `ethereum`, `solana`, `aerodrome-finance`), not tickers. Look them up with the [coingecko-markets](https://apify.com/yadroo/coingecko-markets) actor (`mode: "search"`).

### Examples

**Morning risk gauge for an agent**

```json
{ "mode": "summary", "includeDefi": true }
```

**Extreme-fear alert (schedule hourly, alert if `fearGreed` ≤ 20)**

```json
{ "mode": "daily", "days": 1, "includeTrending": false, "fields": ["date", "fearGreed", "classification", "change1d", "btcDominance", "marketCapChange24h"] }
```

**Weekly series since inception for a backtest**

```json
{ "mode": "history", "from": "2018-02-01", "aggregate": "weekly" }
```

**Last 90 days with moving averages, no market context**

```json
{ "mode": "daily", "days": 90, "includeGlobal": false, "includeTrending": false }
```

**Community sentiment for a watchlist (EUR prices)**

```json
{ "mode": "coins", "coinIds": ["bitcoin", "ethereum", "solana", "hyperliquid", "aerodrome-finance"], "vsCurrency": "eur" }
```

### Output

`daily` (first row, trimmed):

```json
{
  "date": "2026-09-12",
  "fearGreed": 63,
  "classification": "Greed",
  "change1d": 7,
  "change7d": -10,
  "ma7": 66.7,
  "ma30": 61.7,
  "totalMarketCap": 2658510771350.39,
  "totalVolume24h": 46411316708.27,
  "marketCapChange24h": -2.4,
  "btcDominance": 58.22,
  "ethDominance": 11.56,
  "stablecoinDominance": 9.68,
  "dominance": { "btc": 58.22, "eth": 11.56, "usdt": 6.89, "bnb": 3.63, "xrp": 3.23, "usdc": 2.79, "sol": 2.24 },
  "activeCoins": 21145,
  "markets": 1496,
  "globalUpdatedAt": "2026-09-12T23:47:45.000Z",
  "trending": [ { "id": "illuvium", "symbol": "ILV", "name": "Illuvium", "rank": 659, "score": 1, "price": 3.73, "change24h": 20.7, "marketCap": "$30,949,347", "volume24h": "$15,729,154" } ],
  "source": "alternative.me",
  "sourceUrl": "https://alternative.me/crypto/fear-and-greed-index/",
  "fetchedAt": "2026-09-12T23:49:39.081Z"
}
```

`summary` (trimmed): `value 63`, `prevDay 56`, `change30d 34`, `avg90d 36.5`, `avg365d 28.6`, `min30d 29 (2026-08-14)`, `max30d 74 (2026-08-25)`, `percentile365d 92.3`, `streakDays 24 (Greed)`, `daysSinceExtremeFear 37`, `daysSinceExtremeGreed 427`, `zoneChanges30d 1`, `historyDays 3142` + the same market context fields.

Dataset views in the Console: **Fear & Greed** (`daily`), **Summary** (`summary`), **History** (`history`: `period`, `from`, `to`, `days`, `avg`, `min`, `max`, `open`, `close`) and **Coins** (`coins`). Pick the view that matches the mode; the others show mostly empty columns.

| Field | Meaning |
|---|---|
| `fearGreed` / `value` | Index 0–100 (`fearGreed` in daily rows for backward compatibility, `value` in summary). |
| `classification` | Bucket name (see Reference). |
| `change1d`, `change7d`, `change30d` | Point difference vs 1/7/30 days earlier. |
| `ma7`, `ma30`, `avgNd` | Simple moving averages (need enough history; `null` otherwise). |
| `percentile365d` | Share of the last 365 days with a lower value (92 = higher than 92 % of the year). |
| `streakDays` | Consecutive days in the current classification. |
| `daysSinceExtremeFear/Greed` | Days since the last day in that bucket (`null` if never in loaded history). |
| `zoneChanges30d` | Number of classification changes in the last 30 days (choppiness). |
| Market context | `totalMarketCap`, `totalVolume24h`, `marketCapChange24h` (%), `btcDominance`, `ethDominance`, `stablecoinDominance`, `dominance`, `activeCoins`, `markets`, `globalUpdatedAt`; with `includeDefi`: `defiMarketCap`, `defiDominance`, `defiVolume24h`, `defiToEthRatio`, `defiTopCoin`; `trending[]`. If CoinGecko is unavailable the row still ships with `globalError` / `trendingError` set. |
| coins mode | `sentimentUpPct`, `sentimentDownPct` (CoinGecko community votes today), `watchlistUsers`, `isTrending`, price fields in `currency`. |

Key-value store `SUMMARY` always contains the latest stats block, whatever the mode.

### Use it from code / agents

```bash
curl -X POST "https://api.apify.com/v2/acts/yadroo~crypto-sentiment/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' -d '{"mode":"summary"}'
```

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('yadroo/crypto-sentiment').call({ mode: 'history', from: '2024-01-01', aggregate: 'weekly' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

```python
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("yadroo/crypto-sentiment").call(run_input={"mode": "coins", "coinIds": ["bitcoin", "ethereum"]})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

MCP: connect `https://mcp.apify.com` and call the `yadroo/crypto-sentiment` tool with the same JSON.

### Pricing

Pay per event: **$0.001 per run start + $0.0005 per row**. Default run (30 daily rows) ≈ $0.016; `summary` ≈ $0.0015; full weekly history since 2018 (~450 rows) ≈ $0.23; 3,100 daily rows ≈ $1.55. Coins mode: one row per coin.

### Limits & FAQ

- **Freshness** — Fear & Greed updates once a day (~00:00 UTC); global/trending are live at run time.
- **CoinGecko rate limit** — the public API allows ~30 requests/min per IP. The actor spaces calls 2.5 s apart and retries on 429 (honouring `Retry-After`, up to 60 s), so a `coins` run with 30 ids can take 2–3 minutes; a `coingeckoApiKey` speeds it up. If CoinGecko stays unavailable the F\&G rows are still returned with an error note instead of failing.
- **Unknown coin ids** are skipped with a warning; ids are slugs, not tickers.
- **Currency** — `vsCurrency` must be a CoinGecko-supported code (validated up front); alternative.me data is currency-independent.
- **Roadmap** — additional sentiment sources (funding rates, social volume), per-day dominance history.

***

Made by **Yadroo** — more data actors for agents: [crypto-news](https://apify.com/yadroo/crypto-news) · [coingecko-markets](https://apify.com/yadroo/coingecko-markets) · [defillama-protocols](https://apify.com/yadroo/defillama-protocols) · [polymarket-markets](https://apify.com/yadroo/polymarket-markets) · [bitcoin-mempool](https://apify.com/yadroo/bitcoin-mempool)

# Actor input Schema

## `mode` (type: `string`):

daily = backward-compatible default: one row per day (newest first), the first row also carries global market cap, dominance and trending coins. summary = a single decision-ready row for alerts/dashboards. history = long-range Fear & Greed series for backtests. coins = community sentiment for specific coins.

## `days` (type: `integer`):

How many latest days to return in daily/history modes (index exists since 2018-02-01, ~3100 days). Ignored when from/to is set.

## `from` (type: `string`):

Start date (UTC) for daily/history modes; overrides days.

## `to` (type: `string`):

End date (UTC, inclusive). Empty = today.

## `aggregate` (type: `string`):

history mode only: bucket the series and return avg/min/max/open/close per period.

## `includeGlobal` (type: `boolean`):

daily/summary: total market cap, 24h volume, BTC/ETH/stablecoin dominance, active coins & markets (CoinGecko /global).

## `includeTrending` (type: `boolean`):

daily/summary: CoinGecko top-15 trending searches with rank, price and 24h change. coins mode: sets isTrending per coin.

## `includeDefi` (type: `boolean`):

daily/summary: DeFi market cap, DeFi dominance, DeFi/ETH ratio, 24h DeFi volume (CoinGecko).

## `coinIds` (type: `array`):

coins mode: CoinGecko ids (slugs like bitcoin, ethereum, solana, aerodrome-finance — not tickers). Max 30 per run (free-tier rate limit).

## `vsCurrency` (type: `string`):

Currency for market cap, volume and coin prices. Must be one of CoinGecko's supported vs\_currencies.

## `coingeckoApiKey` (type: `string`):

Optional Demo (CG-...) or Pro key. Without a key the actor paces CoinGecko calls at ~1 per 2.5 s and retries on 429; with a key it runs faster. Never required.

## `fields` (type: `array`):

Return only these fields. See README Output tables for names.

## Actor input object example

```json
{
  "mode": "daily",
  "days": 30,
  "aggregate": "daily",
  "includeGlobal": true,
  "includeTrending": true,
  "includeDefi": false,
  "coinIds": [
    "bitcoin",
    "ethereum",
    "solana"
  ],
  "vsCurrency": "usd",
  "fields": []
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "coinIds": [
        "bitcoin",
        "ethereum",
        "solana"
    ],
    "fields": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("yadroo/crypto-sentiment").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 = {
    "coinIds": [
        "bitcoin",
        "ethereum",
        "solana",
    ],
    "fields": [],
}

# Run the Actor and wait for it to finish
run = client.actor("yadroo/crypto-sentiment").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 '{
  "coinIds": [
    "bitcoin",
    "ethereum",
    "solana"
  ],
  "fields": []
}' |
apify call yadroo/crypto-sentiment --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yadroo/crypto-sentiment"
        }
    }
}
```

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/wjPU4LemkAIqdGtwa/builds/GoUgcwnWA48CsOHLq/openapi.json
