A 20-line Node script that prints the Fear & Greed Index next to Bitcoin's price
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…
On Saturday, December 5, 2026, the Crypto Fear & Greed Index measured at 9, classified as "Extreme Fear," according to alternative.me. Bitcoin's price stood at $43,871, marking a 17.1% decrease over the previous 24 hours. CoinMarketCap recorded this decline after the cryptocurrency briefly surpassed $59,000 on Wednesday.
A simple Node.js script, compatible with Node.js version 18 or higher, was utilized to display these two key metrics side by side without the need for any additional dependencies or multiple tabs. The script fetched the data from two free, public APIs: alternative.me for the Fear & Greed Index and CoinGecko for Bitcoin's price and 24-hour change.
The script first fetched the Fear & Greed Index data, extracting the current (today) and previous (yesterday) values along with their respective classifications. Meanwhile, it retrieved Bitcoin's spot price and its 24-hour change from the CoinGecko API. The results were then printed to the console, displaying both metrics in a concise format.
In case the index value is 10 or below, indicating a precarious fear level, the script logs a message reminding the reader of this situation. The script was executed on December 5, 2026, at approximately 01:06 UTC, resulting in the following output:
Fear & Greed: 9 (Extreme Fear)
BTC: $43,885 USD, -17.21% in 24h
Reading is 10 or below: the bottom of the extreme-fear band.
The script retrieves the Fear & Greed Index as a string ranging from 0 to 100, accompanied by a descriptive label, such as "Extreme Fear." By specifying "limit=2" in the API request, the script obtains data for both the current and previous days, with the most recent data appearing first.
The Fear & Greed Index is a composite sentiment measure, reflecting market psychology without providing insights into the underlying reasons for market movements. In the case of this week's decline, factors contributing to the downturn include U.S. spot Bitcoin ETFs incurring a net loss of $715.6 million on December 3, reported by Farside data, following a record $6.2 billion in net outflows the previous month.
Glassnode also noted about $4 billion in realized losses on December 3, surpassing the $3.2 billion peak seen in June 2022.
Additionally, a December 2 advisory from the NSA and other U.S. agencies called for a swift transition to post-quantum cryptography, further impacting market sentiment. CoinShares' James Butterfill assured that there is no conclusive evidence of an attack that could compromise Bitcoin's security. Liquidations over the same 24-hour period, as reported by CoinGlass and cited by Bitcoin.com, amounted to approximately $2.81 billion, predominantly from long positions.
To enhance the functionality of the script, two simple additions can be made for those who choose to maintain it. The script can be modified to append each execution to a JSON lines file, creating a dated log that can be referenced later for comparison. Alternatively, additional cryptocurrencies can be included in the CoinGecko API call by adding their IDs, enabling a loop to process multiple cryptocurrencies simultaneously.
It is essential to note that this script only reads publicly available data and does not execute any trading decisions.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to