# Crypto Fear & Greed Index API
> The crypto market's mood in one number. Get the Fear & Greed Index — the widely-watched 0 to 100 sentiment indicator (0 = Extreme Fear, 100 = Extreme Greed) computed from volatility, momentum, volume, social media and trends — as a clean API. Fetch the current value with its classification and time until the next update, pull the full historical daily series (last N days or the entire history), and get computed statistics over a window (average and its classification, plus the min and max days with their dates). Every call is live (no cache). 4 endpoints. Built for crypto dashboards, trading bots, market-sentiment widgets, backtesting and research. No upstream key, no cache.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/fng-api/..."
```

## Pricing
- **Free** (Free) — 1,880 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 41,000 calls/Mo, 8 req/s
- **Pro** ($24/Mo) — 218,000 calls/Mo, 20 req/s
- **Mega** ($58/Mo) — 1,070,000 calls/Mo, 50 req/s

## Endpoints

### Index

#### `GET /v1/current` — Latest Fear & Greed value

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fng-api/v1/current"
```

**Response:**
```json
{
    "data": {
        "date": "2026-06-02",
        "value": 23,
        "timestamp": 1780358400,
        "classification": "Extreme Fear",
        "time_until_update_seconds": 25675
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:05.757Z",
        "request_id": "f0aa505f-d7d0-4ec4-8866-c38f2d8188c3"
    },
    "status": "ok",
    "message": "Latest Fear & Greed value",
    "success": true
}
```

#### `GET /v1/history` — Historical daily series

**Parameters:**
- `limit` (query, optional, string) — Days (or "all" for full history)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fng-api/v1/history"
```

**Response:**
```json
{
    "data": {
        "data": [
            {
                "date": "2026-06-02",
                "value": 23,
                "timestamp": 1780358400,
                "classification": "Extreme Fear"
            },
            {
                "date": "2026-06-01",
                "value": 29,
                "timestamp": 1780272000,
                "classification": "Fear"
            },
            {
                "date": "2026-05-31",
                "value": 28,
                "timestamp": 1780185600,
                "classification": "Fear"
            },
            {
                "date": "2026-05-30",
                "value": 23,
                "timestamp": 1780099200,
                "classification": "Extreme Fear"
            },
            {
                "date": "2026-05-29",
                "value": 23,
                "timestamp": 1780012800,
                "classification": "Extreme Fear"
            },
            {
                "date": "2026-05-28",
                "value": 22,
                "timestamp": 1779926400,
                "classification": "Extreme Fear"
            },
            {
                "date": "2026-05-27",
                "value": 25,
                "timestamp": 1779840000,
                "classification": "Extreme Fear"
            },
            {
                "date": "2026-05-26",
                "value": 34,
                "timestamp": 1779753600,
                "classification": "Fear"
            },
  
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/stats` — Computed statistics over a window

**Parameters:**
- `days` (query, optional, string) — Window size (default 30)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fng-api/v1/stats"
```

**Response:**
```json
{
    "data": {
        "max": {
            "date": "2026-05-05",
            "value": 50
        },
        "min": {
            "date": "2026-05-28",
            "value": 22
        },
        "days": 30,
        "average": 33.57,
        "current": {
            "date": "2026-06-02",
            "value": 23,
            "timestamp": 1780358400,
            "classification": "Extreme Fear"
        },
        "average_classification": "Fear"
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:06.158Z",
        "request_id": "7c7afd53-05ef-41f7-9222-034dbcfbeecd"
    },
    "status": "ok",
    "message": "Computed statistics",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fng-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream; this gateway requires x-api-key",
        "name": "Crypto Fear & Greed Index API",
        "note": "The 0–100 crypto market sentiment index (0 = Extreme Fear, 100 = Extreme Greed), updated daily. /v1/current for the latest value, /v1/history?limit=30 (or limit=all) for the series, /v1/stats?days=30 for average/min/max. Live, no cache.",
        "source": "alternative.me Fear & Greed Index — public, no key",
        "endpoints": 4
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:06.248Z",
        "request_id": "32e7267c-f324-44a0-be71-140123f09ed1"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/fng-api
OpenAPI spec: https://www.oanor.com/api/fng-api/openapi.json
