feargreed
Get the Crypto Fear & Greed Index to measure market sentiment and track investor psychology trends over the past 7 days.
Instructions
Crypto Fear & Greed Index — market sentiment indicator. Shows last 7 days.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:149-160 (handler)The getFearGreed function fetches the latest crypto Fear & Greed Index from the API.
async function getFearGreed() { try { const data = await fetch('https://api.alternative.me/fng/?limit=7'); return data.data.map(d => ({ value: parseInt(d.value), label: d.value_classification, date: new Date(d.timestamp * 1000).toISOString().split('T')[0], })); } catch (e) { return { error: 'Fear & Greed API unavailable' }; } } - index.js:310-314 (registration)Definition of the 'feargreed' tool in the MCP server tool list.
{ name: 'feargreed', description: 'Crypto Fear & Greed Index — market sentiment indicator. Shows last 7 days.', inputSchema: { type: 'object', properties: {} } } - index.js:354-355 (handler)The tool call handler for 'feargreed' calls the getFearGreed function.
case 'feargreed': return await getFearGreed();