A powerful Telegram bot that provides Solana blockchain data analysis through the Vybe API.
Alayeseke Bot offers a comprehensive set of commands to analyze Solana blockchain data:
/pnl- Check wallet profit and loss/report- Get detailed wallet report/nfts- View NFT portfolio/token_history- View token balance history
/top_holders- View top holders of a token/price- Check token price with OHLC data/transfers- View recent token transfers/trades- View recent token trades
/program- Get program details/program_activity- Check program activity/market- Check market OHLC data/pair- Check trading pair data
/holder_portfolio- Examine a specific holder's portfolio/help- Show this help message
The Alayeseke bot is a Telegram bot that shows Solana blockchain data. It uses the Vybe API to get this data and show it to users.
Users talk to the bot by sending commands with a slash ("/"). Here are the main things the bot can do:
- /start: Welcomes users and tells them about the bot
- /help: Shows all commands the bot can do
- /top_holders: Shows who owns the most of a token
- /program: Shows info about Solana programs (apps)
- /market: Shows price charts for trading pairs on markets
- /pair: Shows trading info across different exchanges
When a user sends a command, the bot:
- Checks what the user asked for
- Sends a request to the Vybe API
- Gets data back from the API
- Formats the data to look nice
- Sends the formatted info back to the user
The bot handles errors if the API doesn't work or if users type commands wrong. It also formats big numbers to be easy to read, like showing "$5.2M" instead of "$5,200,000".
This makes it easy for users to get Solana blockchain data right in Telegram without going to other websites.
The bot is built using TypeScript and leverages the Vybe API to fetch Solana blockchain data. It uses the GrammY framework for Telegram bot functionality.
sequenceDiagram
participant User as Telegram User
participant Bot as Alayeseke Bot
participant VybeAPI as Vybe API
participant Solana as Solana Blockchain
User->>Bot: Send command (e.g., /pnl address)
Bot->>Bot: Parse command & parameters
Bot->>User: Acknowledge request
alt Portfolio Commands
Bot->>VybeAPI: Request wallet data
VybeAPI->>Solana: Query blockchain data
Solana->>VybeAPI: Return blockchain data
VybeAPI->>Bot: Return formatted data
Bot->>Bot: Process and format response
else Token Commands
Bot->>VybeAPI: Request token data
VybeAPI->>Solana: Query token data
Solana->>VybeAPI: Return token data
VybeAPI->>Bot: Return formatted data
Bot->>Bot: Process and format response
else Program Commands
Bot->>VybeAPI: Request program data
VybeAPI->>Solana: Query program data
Solana->>VybeAPI: Return program data
VybeAPI->>Bot: Return formatted data
Bot->>Bot: Process and format response
else Market Commands
Bot->>VybeAPI: Request market data
VybeAPI->>Solana: Query market data
Solana->>VybeAPI: Return market data
VybeAPI->>Bot: Return formatted data
Bot->>Bot: Process and format response
end
Bot->>User: Send formatted response
The bot is implemented with the following components:
-
Command Handlers: Each command has a dedicated handler function that processes user input and calls the appropriate API methods.
-
API Integration: The bot uses a typed wrapper around the Vybe API to handle API requests with proper error handling and retries.
-
Response Formatting: Responses are formatted in Markdown for better readability with emojis and structured data.
-
Error Handling: Comprehensive error handling ensures the bot remains responsive even when API calls fail.
-
Retry Mechanism: A retry mechanism is implemented to handle temporary API failures.
- Clone the repository
- Install dependencies:
npm install - Create a
.envfile with the following variables:TELEGRAM_TOKEN=your_telegram_token VYBE_API_KEY=your_vybe_api_key - Start the bot:
npm start
The project is written in TypeScript and uses the following technologies:
- GrammY - Telegram Bot Framework
- Vybe API - Solana Data API
- TypeScript - Programming Language
- dotenv - Environment Variable Management
This project is licensed under the MIT License - see the LICENSE file for details.