Adding External Data — Crypto Fear & Greed Index
The Open Interest tutorial walked through the mechanics of the External Indicator dialog using a Binance endpoint. This is the same flow but for a different kind of provider — the alternative.me Fear & Greed Index, a widely-cited daily sentiment score for the crypto market.
The point of doing it twice with different providers: the dialog doesn't care whether the data comes from an exchange, a market-data API, or some random JSON endpoint someone runs in a Hetzner box. As long as the response is JSON and the values you want are reachable via JSONPath, you can wire it in.
What the index measures
The Crypto Fear & Greed Index is a single 0–100 number, updated daily, blending five inputs:
- Volatility (25%)
- Market momentum / volume (25%)
- Social media sentiment (15%)
- Survey data (15%) — currently paused
- Bitcoin dominance (10%)
- Google Trends data (10%)
Interpretation:
| Range | Label | Reading |
|---|---|---|
| 0–24 | Extreme Fear | Capitulation, often a buying opportunity |
| 25–49 | Fear | Risk-off mood |
| 50 | Neutral | |
| 51–74 | Greed | Risk-on, getting frothy |
| 75–100 | Extreme Greed | Often precedes corrections |
Strategies use it as a contrarian regime filter — only buy when the market is fearful, only short when it's greedy — or as a sizing input where larger positions go on during extreme readings in the direction you're trading against.
The API
alternative.me's endpoint is unauthenticated and dead simple:
https://api.alternative.me/fng/?limit=N
Sample response:
{
"name": "Fear and Greed Index",
"data": [
{"value": "47", "value_classification": "Neutral", "timestamp": "1777248000"},
{"value": "33", "value_classification": "Fear", "timestamp": "1777161600"}
],
"metadata": {"error": null}
}
Notes:
valueis a string containing a number 0–100. The platform's JSONPath extraction parses it viafloat()so this works fine.timestampis Unix seconds as a string. Set the response timestamp format toUnix (seconds or milliseconds)and the platform handles it.value_classificationis the human-readable label. External Indicators are numeric only, so we usevalue. If you need the label, classify in your strategy's logic (e.g.,if value < 25 then extreme_fear).- The endpoint takes only
limit, notstartTime/endTime. We ignore the date placeholders entirely and let the platform fetch the most recent N values, then align them by timestamp.
Configure the indicator
Click + External Indicator in the right panel. (See the OI tutorial for what the dialog looks like.)
Fill in:
| Field | Value |
|---|---|
| Indicator Name | Crypto Fear & Greed Index |
| Historical Data URL | https://api.alternative.me/fng/?limit={limit} |
| Auth Header / API Key | (blank — public endpoint) |
| Output → name | value |
| Output → value JSONPath | $.data[*].value |
| Output → timestamp JSONPath | $.data[*].timestamp |
| Response Timestamp Format | Unix (seconds or milliseconds) |
| URL Param Date Format | (any — this API doesn't take date params; the placeholders are ignored) |
| Mode | Latest from historical |
| Latest-from-Historical URL | https://api.alternative.me/fng/?limit=1 |
| Refresh Interval (seconds) | 3600 |
Why 3600? The index updates once per day. Polling every hour is generous; you could easily go to 21600 (6 hours) without losing anything practical.
The JSONPath syntax $.data[*].value walks into the data object's array and grabs the value field of each entry — different from the OI example's $[*].sumOpenInterest, which started directly at a root-level array. JSONPath naturally handles both shapes.
Test and save
Click Test Connection — successful output looks like this:

Success! Found 7 data points across 1 output(s) — value: 7 points
Click Save Indicator. You'll now have two External Indicators side by side in the right panel — one from a futures exchange, one from a sentiment aggregator — both behaving identically:

Using it
The indicator is now in the Blockly Indicators category as Crypto Fear & Greed Index Output value. You can compare it against thresholds (< 25 = extreme fear), drop it into compound conditions, or reference it from a Signal definition.
A simple regime use: only enter long positions when Crypto Fear & Greed Index Output value < 30 AND your normal trigger fires. The fear-and-greed score becomes a contrarian gate on the rest of the strategy.
What's different from the OI example?
Almost nothing — and that's the point. Same dialog, same flow, same blocks in your strategy. The differences are:
- Different URL — pointing at alternative.me instead of Binance
- Different JSONPath — the response is
{data: [...]}instead of a root-level array - Different cadence — daily updates instead of 5-minute updates, so a longer refresh interval makes sense
- No date placeholders work — alternative.me only takes
limit, so we let the platform fetch a fixed window of recent points
For any other JSON-returning API the work is the same: figure out the URL pattern, write the JSONPath to extract the value and timestamp, pick a sensible refresh interval. Everything downstream — backtest support, live trading, strategy blocks — comes for free.