fearAndGreedHistorical
Access historical Crypto Fear and Greed Index data to analyze market sentiment trends over time. Specify start and limit parameters to retrieve precise historical values for informed decision-making.
Instructions
Returns historical CMC Crypto Fear and Greed Index values.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| start | No |
Implementation Reference
- index.js:544-556 (registration)Registration of the 'fearAndGreedHistorical' tool, including description, input schema using Zod, and inline asynchronous handler function that makes an API request to CoinMarketCap's fear-and-greed historical endpoint.server.tool("fearAndGreedHistorical", "Returns historical CMC Crypto Fear and Greed Index values.", { start: z.number().min(1).optional(), limit: z.number().min(1).max(500).optional() }, async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v3/fear-and-greed/historical', params) return formatResponse(data) }) } )
- index.js:550-555 (handler)The handler function for 'fearAndGreedHistorical' tool. It wraps the API call to '/v3/fear-and-greed/historical' using shared utilities handleEndpoint, makeApiRequest, and formatResponse.async (params) => { return handleEndpoint(async () => { const data = await makeApiRequest(apiKey, '/v3/fear-and-greed/historical', params) return formatResponse(data) }) }
- index.js:546-549 (schema)Input schema for 'fearAndGreedHistorical' tool using Zod validation: optional 'start' (min 1) and 'limit' (min 1, max 500).{ start: z.number().min(1).optional(), limit: z.number().min(1).max(500).optional() },