Yes, you can access the CMC Fear and Greed Index data through the CoinMarketCap API for free. Here’s how you can do it:
Example: Fetching the Latest CMC Fear and Greed Index Value
To get the latest Fear and Greed Index value, you can use the following API endpoint:
API Endpoint:
GET https://pro-api.coinmarketcap.com/v3/fear-and-greed/latest
Response Example:
{
“status”: {
“timestamp”: “2024-09-03T12:00:00.000Z”,
“error_code”: 0,
“error_message”: null,
“elapsed”: 10,
“credit_count”: 1
},
“data”: {
“value”: 45,
“value_classification”: “Fear”,
“update_time”: “2024-09-03T12:00:00.000Z”
}
}
Example: Fetching Historical CMC Fear and Greed Index Data
To retrieve historical data, you can use the following API endpoint:
API Endpoint:
GET https://pro-api.coinmarketcap.com/v3/fear-and-greed/historical
Parameters:
start: (optional) Integer specifying the starting point of the data retrieval.
limit: (optional) Integer specifying the number of records to return (default is 50).
Response Example:
{
“status”: {
“timestamp”: “2024-09-03T12:00:00.000Z”,
“error_code”: 0,
“error_message”: null,
“elapsed”: 15,
“credit_count”: 1
},
“data”: [
{
“timestamp”: “2024-09-02T12:00:00.000Z”,
“value”: 50,
“value_classification”: “Neutral”
},
{
“timestamp”: “2024-09-01T12:00:00.000Z”,
“value”: 35,
“value_classification”: “Fear”
}
// More records…
]
}