This api uses Solscan to analyze specific tokens on the Solana blockchain. The agent takes a token's address as input and provide detailed insights about the top N wallets holding that token (where N is a variable I can configure).
The analysis includes the following for each wallet:
- How long the wallet has been active.
- Patterns of token holding (long-term holder vs. frequent flipper).
- How much of the specified token the wallet holds.
- How active the wallet is in transactions involving this token.
- Other tokens held by the wallet.
- Python 3.8+
- Solscan account pro subscription (for API access)
-
Fork and Clone the Repository
git clone <your-forked-repo-url> cd <repository-folder>
-
Create a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows, use venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Set Up Environment Variables Create a
keys.envfile in the root directory with the following format:# SOLSCAN API credentials SOLSCAN_API_KEY=<YOUR_SOLSCAN_API_KEY> # OPENAI API credentials OPENAI_API_KEY=<YOUR_OPENAI_API_KEY> # Top N wallets holding that token # Default: 10 # N should be 10, 20, 30 or 40 TOP_N=10
-
Run the application
python index.py
index.py: Main script that handles solscan API requests and data analysis.keys.env: Contains sensitive credentials and configurations.requirements.txt: Python dependencies for the project.
-
Fork the Repository: Click the fork button at the top of this page.
-
Clone Your Fork: Clone your forked repository to your local machine.
git clone <your-forked-repo-url>
-
Create a New Branch: Create a feature branch for your changes.
git checkout -b feature/your-feature-name
-
Make Changes and Commit:
git add . git commit -m "Add your message"
-
Push to Your Fork:
git push origin feature/your-feature-name
-
Submit a Pull Request: Open a pull request to merge your changes into the main repository.