A powerful Telegram bot that helps users find the best yield opportunities in DeFi, analyze market sentiment, and make data-driven trading decisions. Built for the Sentient AI Agent Builders Program.
- Top Yields: Discover the highest APY opportunities across DeFi protocols
- Protocol-Specific Yields: Find yields on specific protocols like Aave, Compound, etc.
- Chain-Specific Yields: Find yields on specific blockchains like Ethereum, Solana, etc.
- Yield Comparison: Compare yields between different protocols
- Personalized Recommendations: Get yield recommendations based on preferences
- Token Price Tracking: Get current prices and 24h changes
- Market Sentiment Analysis: Analyze overall market sentiment
- Token-Specific Sentiment: Get sentiment analysis for specific tokens
- Trading Signals: Receive technical and fundamental trading signals
- Yield Entry Recommendations: Get timing recommendations for entering yield positions
- Yield Opportunity Analysis: Get AI analysis of yield opportunities
- Trading Insights: Receive AI-generated trading insights
- Yield Comparison Explanations: Understand differences between yield options
- Market Sentiment Summaries: Get AI summaries of market sentiment
- Yield Entry Explanations: Understand the reasoning behind yield entry recommendations
| Command | Description | Example |
|---|---|---|
/start |
Start the bot and get welcome message | /start |
/help |
Show available commands and their descriptions | /help |
/top_yields |
Get top yield opportunities | /top_yields 10 |
/yield_by_protocol |
Get yields for a specific protocol | /yield_by_protocol aave |
/yield_by_chain |
Get yields for a specific blockchain | /yield_by_chain ethereum |
/compare_yields |
Compare yields between protocols | /compare_yields aave,compound |
/recommend_yields |
Get personalized yield recommendations | /recommend_yields stable |
/token_price |
Get current price of a token | /token_price bitcoin |
/market_sentiment |
Get overall market sentiment | /market_sentiment |
/token_sentiment |
Get sentiment analysis for a token | /token_sentiment ethereum |
/trading_signals |
Get trading signals for a token | /trading_signals bitcoin |
/yield_entry |
Check if it's a good time to enter a yield position | /yield_entry ethereum |
- Python 3.9 or higher
- Telegram Bot Token (from @BotFather)
- Fireworks AI API Key (for AI-powered insights)
- DeFiLlama API access (free)
- CoinGecko API access (free)
-
Clone the repository:
git clone https://github.com/yourusername/dex-defi-bot.git cd dex-defi-bot -
Create a
.envfile in the root directory with your API keys:TELEGRAM_BOT_TOKEN=your_telegram_bot_token FIREWORKS_API_KEY=your_fireworks_api_key BOT_NAME=Dex Defi Bot -
Run the setup script:
chmod +x run.sh ./run.sh
DeFi-Yield-Finder/
├── src/
│ ├── bot/
│ │ └── bot.py # Telegram bot implementation
│ ├── config/
│ │ └── config.py # Configuration settings
│ ├── services/
│ │ ├── ai_service.py # AI-powered analysis services
│ │ ├── yield_service.py # DeFi yield data services
│ │ └── trading_service.py # Trading and sentiment services
│ ├── utils/
│ │ ├── helpers.py # Helper functions
│ │ └── logger.py # Logging configuration
│ └── main.py # Main entry point
├── data/ # Data storage directory
├── logs/ # Log files directory
├── .env # Environment variables
├── .env.example # Example environment file
├── requirements.txt # Python dependencies
├── run.sh # Setup and run script
└── README.md # Project documentation
- DeFiLlama API: Used to fetch yield data across DeFi protocols
- CoinGecko API: Used for token prices and market data
- Fireworks AI API: Used for AI-powered analysis and insights
- Python: Core programming language
- python-telegram-bot: Framework for Telegram bot development
- aiohttp: Asynchronous HTTP client for API requests
- Fireworks AI: AI model for generating insights and analysis
- asyncio: For asynchronous programming
- DeFiLlama: For yield data across DeFi protocols
- CoinGecko: For token prices, market caps, and trading volumes
- TradingView: For technical indicators and trading signals
- All API keys are stored locally in the
.envfile and never shared - No user data is collected or stored
- All API requests are made directly from the bot to the respective APIs
This project is licensed under the MIT License - see the LICENSE file for details.
- Sentient AI for the Agent Builders Program
- DeFiLlama for providing comprehensive DeFi data
- CoinGecko for token and market data
- Fireworks AI for AI capabilities
For questions or feedback, please open an issue on this repository or contact the maintainer.