- Features ✨
- Setup 🛠️
- Example Usage 📋
- Development 🔧
- Task Workflow 🗂️
- Advanced Features 💡
- Example Report Output 📝
- Next Steps 🚀
- Resources 📖
- 🐦 Tweet Scraping: Fetches and filters tweets mentioning specific token tickers from the AIXBT Twitter account.
- 📊 DexScreener Integration: Retrieves token data, including liquidity, price, and volume, for identified tickers.
- ✉️ Telegram Integration: Formats token analysis reports into MarkdownV2 for Telegram and delivers them to specified chats.
- 🧩 Task Management: Orchestrates tasks with dependencies, ensuring sequential execution for data scraping, processing, and reporting.
- 🌐 Built with TypeScript for type safety and scalability.
- ✅ Validates environment variables using Zod for reliable configuration.
- 🔄 Configured for extensibility to add new capabilities or platforms.
git clone <repository-url>
cd <repository-folder> npm install - Copy
.env.exampleto.env:cp .env.example .env
- Update the
.envfile with your environment variables:OPENSERV_API_KEY=<Your OpenServ Labs API Key> TELEGRAM_BOT_TOKEN=<Your Telegram Bot Token> WORKSPACE_ID=<Your OpenServ Labs Workspace ID>
The agent processes user commands to perform end-to-end token analysis. For instance:
/fetch 1h summary - 🐦 Fetch Tweets: Scrapes tweets mentioning token tickers in the past 1 hour.
- 📊 Process Data: Uses DexScreener to retrieve detailed market data for each token.
- 📝 Format Report: Compiles a MarkdownV2 report, including market stats, social links, and relevant URLs.
- ✉️ Deliver to Telegram: Sends the report to the configured Telegram chat.
The project uses ts-node-dev for hot reloading during development:
npm run dev - Linting:
# Check for linting issues npm run lint # Automatically fix linting issues npm run lint:fix
- Formatting:
# Format the codebase npm run format
- Build the Project:
npm run build
- Run the Built Version:
npm start
The agent operates through a sequential task workflow to ensure efficient and accurate processing:
-
Fetch Tweets 🐦:
- Task Name:
fetchTweets - Description: Retrieves tweets mentioning token tickers.
- Output: A JSON file containing the scraped tweets (
aixbt_tweets_<taskDetails>.json).
- Task Name:
-
Fetch DexScreener Data 📊:
- Task Name:
dexscreener_fetch - Description: Processes tweets and retrieves detailed token data from DexScreener.
- Output: A JSON file with token market data (
aixbt_dexscreener_<taskDetails>.json).
- Task Name:
-
Format Report for Telegram 📝:
- Task Name:
formatMessage - Description: Formats the DexScreener data into a MarkdownV2 report for Telegram.
- Output: A JSON file with the formatted message (
aixbt_telegram_<taskDetails>.json).
- Task Name:
-
Send to Telegram ✉️:
- Task Name:
sendTelegramMessage - Description: Sends the formatted message to a specified Telegram chat.
- Output: Confirmation of the message delivery.
- Task Name:
-
Telegram Integration ✉️:
- Sends real-time reports to Telegram chats using the Telegram Bot API.
- Fully compatible with Telegram MarkdownV2 for styled messages.
-
JSON Processing 📄:
- Handles dynamic JSON structures from APIs like DexScreener.
- Validates and transforms data into user-friendly reports.
-
Custom Task Management 🧩:
- Define dependencies to ensure sequential task execution.
- Easily extendable with new capabilities for additional workflows.
Here’s a sample Telegram MarkdownV2 report for a token:
*cloudyheart (cloudy)* 📊
*Tweet*: "$CLOUDY token dump and rebuy happening now!"
🔍 *Market Data*:
• Chain: solana
• DEX: raydium
• Liquidity: $916,540.43
• Price (USD): $0.017
• 24H Volume: $32,234,441.04
💹 *Social Media Links*:
• Twitter: [Link](https://x.com/cl0udyh3art)
• Telegram: [Link](https://t.me/cl0udyheart)
🌐 *Websites*:
• [https://www.cloudyheart.net/](https://www.cloudyheart.net/)
🔗 *DexScreener Link*: [View on DexScreener](https://dexscreener.com/solana/4soxi47utpbzuusw27i9vq7ogkwrz8xlrj2fruunnsjg)
To expand the functionality of this agent, consider:
- Adding support for additional APIs (e.g., CoinGecko, Twitter Trends).
- Implementing advanced inter-agent communication for collaborative tasks.
- Enabling webhook integrations for real-time data updates.
- OpenServ Labs SDK Documentation: Official SDK documentation.
- Telegram Bot API: Build interactive bots for Telegram.
- DexScreener API: Retrieve real-time token data.
Feel free to contribute or provide feedback by opening issues! 🌟