A powerful Telegram bot for Solana blockchain interactions, offering wallet management, token swaps, and crypto trading capabilities.
Solana Wallet Bot is your all-in-one Telegram trading companion for the Solana ecosystem. Similar to popular bots like BONKBot, TrojanOnSolana, and BananaGun, but built with superior architecture and security in mind. This feature-rich bot enables users to create and manage Solana wallets, check balances, perform token swaps via Jupiter's powerful DEX aggregator, and execute trades—all directly from Telegram chats. Whether you're a casual trader or a DeFi power user, this bot provides a comprehensive solution for managing your Solana assets without ever leaving Telegram.
🚀 Beta - Core functionality is complete and working, but some features may be refined based on user feedback.
- Wallet Management: Create and manage Solana wallets
- Balance Checking: View SOL and SPL token balances with USD equivalents
- Token Transfers: Send SOL and SPL tokens to any Solana address
- Token Swaps: Swap between tokens using Jupiter DEX aggregator
- Price Checking: Get real-time token prices
- Limit Orders: Create buy/sell limit orders that execute automatically when price conditions are met
- Token Watchlist: Track prices of your favorite tokens
- Trade Management: Buy and sell tokens with a simple interface
/start- Start working with the bot/create_wallet- Create a new Solana wallet/menu- Main menu (UI)/help- Show help message with command list
The project follows Clean Architecture principles with the VIPER pattern:
- View: Telegram message interfaces
- Interactor: Business logic implementation
- Presenter: Transforms data between View and Interactor
- Entity: Domain models
- Router: Handles command routing and workflow
User (Telegram) → Router → Presenter → Interactor → Services (Solana/Jupiter)
↑ ↓ ↓
View ← Presenter Database
The bot uses a dependency injection container to manage service instances and their dependencies, making the code modular and testable.
- Private Keys: Private keys are stored plain (non encrypted) in the database
- No External API Keys: The bot doesn't require users to provide external API keys
- Confirmations: All financial transactions require explicit user confirmation
- Sandboxed Operations: Each user's operations are isolated
- Transparent Transactions: Transaction signatures are provided for all blockchain operations
- Language: Rust
- Telegram API: Teloxide
- Blockchain: Solana (solana-sdk, solana-client)
- Database: PostgreSQL with SQLx
- DEX Integration: Jupiter Swap API
- Background Services: Tokio for asynchronous processing
- Rust 1.80+
- PostgreSQL
- Docker (optional, for containerized deployment)
Create a .env file with:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
DATABASE_URL=postgres://username:password@localhost/dbname
SOLANA_RPC_URL=your_solana_rpc_url
- Clone the repository:
git clone https://github.com/alexk-dev/solana-trade-bot.git
cd solana-trade-bot- Set up the database:
sqlx database create
sqlx migrate run- Build and run:
cargo build --release
./target/release/solana-trade-botdocker build -t solana-trade-bot .
docker run -d --env-file .env --name solana-trade-bot solana-trade-botFor developers who want to contribute:
- Set up a development environment:
cargo install sqlx-cli
cargo install cargo-watch- Create a test database:
sqlx database create --database-url postgres://username:password@localhost/solana_bot_test
sqlx migrate run --database-url postgres://username:password@localhost/solana_bot_test- Run tests:
cargo test- Run with hot reloading during development:
cargo watch -x run- RPC Rate Limits: If you encounter errors related to Solana RPC calls, you might be hitting rate limits. Consider using a paid RPC provider.
- Database Connection: Ensure your PostgreSQL service is running and the DATABASE_URL is correctly formatted.
- Token Not Found: When using custom tokens, make sure you're using the mint address and not the token account address.
- Insufficient Funds: For trades and swaps, ensure you have enough SOL to cover both the transaction and network fees.
Check the application logs for detailed error messages:
RUST_LOG=info ./target/release/solana-trade-botFor more verbose logging:
RUST_LOG=debug ./target/release/solana-trade-botDistributed under the business friendly MIT license.
This bot is provided as-is without any guarantees. Users are responsible for managing their own keys and funds. Always verify transactions before confirming them. The bot is not responsible for any financial losses resulting from market volatility, user error, or software bugs.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Add tests for new features
- Update documentation for any changes
- Ensure all tests pass before submitting a PR
Built with ❤️ for the Solana ecosystem.