Menu

A 20-line Node script that prints the Fear & Greed Index next to Bitcoin's price
📰

A 20-line Node script that prints the Fear & Greed Index next to Bitcoin's price

DEV Community: javascript·Swapcore.Exchange·about 2 hours ago
#nuzDkOR5
#devtojavascript#devto#dev#fear#bitcoin
Long article (573 words) — no AI summary yet.
Reading 0:00
15s threshold

9

That's what the Crypto Fear & Greed Index from alternative.me read on Saturday, December 5, 2026, the morning after it read 6. Bitcoin was at 43,871 dollars at 01:05 UTC, down 17.1% in 24 hours according to CoinMarketCap, after trading above 59,000 on Wednesday.

On days like this I want two numbers side by side without opening five tabs. Both are available from free, keyless public APIs, so here is a small script that prints them.

The script

Node 18+ (for the built-in fetch ), no dependencies.

// crash-check.mjs const fng = await ( await fetch ( 'https://api.alternative.me/fng/?limit=2' ) ) . json ( ) ; const [ today , yesterday ] = fng . data ;

const cg = await ( await fetch ( 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd&include_24hr_change=true' ) ) . json ( ) ; const { usd , usd_24h_change } = cg . bitcoin ;

console . log ( `Fear & Greed: ${today.value} (${today.value_classification}), yesterday ${yesterday.value}` ) ; console .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.