Messari Influencer Mindshare and Asset Analysis
About
A MCP server powered by Messari Chat Agent API and an LLM based kit for mindshare and set insights over the time and plots to be the next crime-fighting AI toolkit.
Details
- Author
- N-45div
- Downloads
- 338
- Categories
- AI
Jump to
- Fetches daily mindshare data via the Messari API
- Detects anomalies using z-scores (default threshold: 2.0)
- Plots mindshare scores over time with highlighted anomalies
- Provides readable insights on trends, score/rank ranges, and dates
- Calls Mistral API for sentiment analysis on trending topics
- Caches Mistral responses and retries on rate limits
Configure the server by navigating to server.py and ensuring a valid Messari API key is set. The repository includes a Colab notebook (LLM_Mindshare_asset_analysis.ipynb) and a server module. Users run the server to trigger data fetching, anomaly detection, and visualization. Key functions include analyze_mindshare_data (for KOL handles) and analyze_asset_mindshare (for asset slugs).
Messari Influencer Mindshare and Asset Analysis
This repository contains a Python script for analyzing mindshare data of cryptocurrency assets using the Messari API. The script fetches mindshare data, performs anomaly detection, visualizes trends, and provides insights into significant spikes in attention for a given asset. The analysis is tailored for use in Google Colab, with plotting and readable insights displayed directly in the notebook. ---Overview
The Python script provides several functions to facilitate mindshare analysis for both cryptocurrency assets and Key Opinion Leaders (KOLs) on social media platforms like Twitter. Below is a description of each function: ---call_mistral
- Purpose: Interacts with the Mistral API to perform sentiment analysis on text data (e.g., summaries of trending topics).
- Returns: A JSON object with the sentiment (positive, negative, or neutral) and an insight into how the topic may influence crypto market attention.
- Features:
- Includes retry logic for handling rate limits.
- Caches responses to avoid redundant API calls.
- Used In: KOL mindshare analysis to explain anomalies by sentiment-analyzing related trending topics.
---
get_trending_details
- Purpose: Fetches trending topics from the Messari API within a given date range and topic classes (e.g., "Macro Commentary, Project Announcements, Legal and Regulatory").
- Returns: A dictionary of trending topics for the specified criteria.
- Used For: Providing context for mindshare anomalies in the KOL analysis by correlating spikes with relevant market news and events.
---
analyze_mindshare_data
- Purpose: Retrieves mindshare data for a specific Twitter handle (e.g., @AltcoinGordon) from the Messari API.
- Processes:
- Detects anomalies in mindshare scores using z-scores (default threshold: 2.0).
- Plots mindshare scores over time with anomalies highlighted in red.
- Provides insights on:
- Trends (upward/downward/stable)
- Score and rank ranges
- List of anomalies
- Uses call_mistral + get_trending_details to add sentiment + market explanation to detected anomalies.
- Display: Results are shown directly in Google Colab.
- Best For: KOL mindshare tracking and insight generation.
---
analyze_asset_mindshare
- Purpose: Retrieves mindshare data for a specific cryptocurrency asset (e.g., official-trump for $TRUMP, mantra-dao for $OM).
- Processes:
- Detects anomalies in asset mindshare scores using z-scores (default threshold: 2.0).
- Plots scores over time with anomalies highlighted in orange.
- Provides concise insights about:
- Mindshare trends
- Score and rank ranges
- Anomaly dates and scores
- Display: Designed to work directly in Google Colab for interactive visual exploration.
- Best For: Analyzing market attention shifts for individual crypto assets.
---
🚀 Running the MCP Server
The MCP Server provides a backend for broader mindshare comparison functionality. - Navigate to the server code:server.py
- Ensure the Messari API key is configured correctly.
---
API List
The following APIs are used in this project: - Copilot Agent API - Current Topics API - X-Users Mindshare Over Time API - Mindshare of Asset Over Time API - Asset Details API ---🔑 Key Features
- Mindshare Data Fetching: Uses the Messari API to retrieve daily mindshare data for assets. - Anomaly Detection: Identifies significant spikes in mindshare scores using a z-score threshold (default: 2.0). - Visualization: Plots mindshare scores over time with anomalies highlighted in Google Colab. - Insights: Provides readable insights about trends, score ranges, rank ranges, and anomalies. - Extensible: Designed to work alongside KOL mindshare analysis (e.g., for Twitter handles) with potential for combined analysis. ---📂 Code Links in the repository
- Colab Notebook: LLM_Mindshare_asset_analysis.ipynb - MCP Server Code: server.py ---📄 License
This project is licensed under the MIT License. See the LICENSE file for details. ---Acknowledgments
- Messari: For providing the API. - Google Colab: For enabling interactive visualization. - Mistral AI: For optional sentiment integration.Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
