A comprehensive dual-platform AI-powered cryptocurrency trading assistant available as both a Telegram bot and modern web application.
- Natural Language Interface: Ask questions like "What's the outlook for BTC this week?"
- Market Sentiment Analysis: Real-time insights from news and social media
- Technical Analysis: AI-powered interpretation of charts and indicators
- Risk Assessment: Smart position sizing and risk management advice
- 24/7 Availability: Always-on AI assistant via Telegram and web
- Portfolio Tracking: Monitor holdings across multiple wallets
- Performance Analytics: Detailed profit/loss tracking and insights
- Diversification Analysis: AI-powered portfolio optimization recommendations
- Real-time Alerts: Get notified of significant market movements
- AI-Generated Signals: Buy/sell/hold recommendations with confidence scores
- Technical Indicators: MACD, RSI, Bollinger Bands, and more
- Multi-timeframe Analysis: 1h, 4h, 1d signal generation
- Historical Performance: Track signal accuracy over time
- Telegram Bot: Full-featured bot with inline keyboards and Mini App
- Web Application: Modern, responsive interface with advanced features
- Seamless Sync: Account synchronization between platforms
- FastAPI - High-performance async Python web framework
- PostgreSQL - Robust relational database with async support
- SQLAlchemy - Modern ORM with async capabilities
- LangChain - LLM integration and AI workflow orchestration
- OpenAI API - GPT models for natural language processing
- CCXT - Cryptocurrency exchange trading library
- Celery + Redis - Background task processing and caching
- Alembic - Database migration management
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- TailwindCSS - Utility-first CSS framework
- Shadcn/ui - Beautiful, accessible UI components
- Next Themes - Dark/light mode support
- Zustand - Lightweight state management
- React Hook Form - Form handling and validation
- Recharts - Data visualization and charts
- WalletConnect - Multi-wallet crypto integration
- python-telegram-bot - Modern async Telegram bot framework
- Telegram Mini Apps - Embedded web interface in Telegram
- Inline Keyboards - Rich interactive bot interface
- TON Payments - Telegram-native crypto payments
- Docker - Containerized deployment
- Docker Compose - Multi-service orchestration
- Nginx - Reverse proxy and load balancing
- PostgreSQL - Primary database
- Redis - Caching and message broker
ai-trading-assistant/
βββ backend/ # FastAPI backend service
β βββ api/ # API routes and endpoints
β βββ core/ # Core business logic
β βββ models/ # Database models
β βββ main.py # Application entry point
βββ frontend/ # Next.js web application
β βββ app/ # Next.js App Router
β βββ components/ # React components
β βββ lib/ # Utility functions
β βββ types/ # TypeScript types
βββ telegram-bot/ # Telegram bot service
β βββ bot.py # Main bot logic
β βββ config.py # Bot configuration
βββ deploy/ # Deployment configurations
βββ docker-compose.yml # Development orchestration
- Python 3.11+
- Node.js 18+
- PostgreSQL 13+
- Redis 6+
- Docker & Docker Compose (optional)
git clone https://github.com/yourusername/ai-trading-assistant.git
cd ai-trading-assistantcd backend
cp config.example .env
# Edit .env with your API keys and database settings
pip install -r requirements.txtcd frontend
cp env.example .env.local
# Edit .env.local with your API URLs
npm installcd telegram-bot
# Create .env file with TELEGRAM_BOT_TOKEN
pip install -r requirements.txt# Start PostgreSQL and Redis
docker-compose up postgres redis -d
# Run database migrations
cd backend
alembic upgrade head# Terminal 1: Backend
cd backend
uvicorn main:app --reload --port 8000
# Terminal 2: Frontend
cd frontend
npm run dev
# Terminal 3: Telegram Bot
cd telegram-bot
python bot.py# Start all services
docker-compose up -d
# View logs
docker-compose logs -f- Web App: http://localhost:3000
- API Docs: http://localhost:8000/docs
- Telegram Bot: @your_bot_username
DATABASE_URL=postgresql+asyncpg://user:password@localhost/ai_trading
SECRET_KEY=your-super-secret-jwt-key
OPENAI_API_KEY=your-openai-api-key
BINANCE_API_KEY=your-binance-api-key (optional)
BINANCE_SECRET_KEY=your-binance-secret-key (optional)NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_WS_URL=ws://localhost:8000TELEGRAM_BOT_TOKEN=your-telegram-bot-token
API_BASE_URL=http://localhost:8000
WEB_APP_URL=http://localhost:3000- 10 AI queries per day
- Basic market data access
- Signal viewing (limited)
- Portfolio tracking
- Community support
- 100 AI queries per day
- Advanced market analysis
- Signal generation
- Portfolio insights
- Market alerts
- Priority support
- 1000 AI queries per day
- Priority AI responses
- Custom trading strategies
- Advanced portfolio analytics
- 24/7 priority support
- Early access to new features
- Web App: Multi-crypto payments (USDT, ETH, BTC, TON)
- Telegram: TON-based payments via Telegram Stars
- Traditional: Credit card payments (via Stripe)
- Sentiment Analysis: News and social media sentiment tracking
- Technical Analysis: 20+ technical indicators
- Pattern Recognition: Chart pattern identification
- Volume Analysis: Trading volume insights
- Market Correlation: Cross-asset correlation analysis
- Multi-timeframe: 1m, 5m, 15m, 1h, 4h, 1d signals
- Confidence Scoring: AI confidence levels (0-100%)
- Entry/Exit Points: Precise entry, target, and stop-loss levels
- Risk/Reward Ratios: Calculated risk-to-reward metrics
- Historical Performance: Backtested signal accuracy
- Multi-wallet Support: Track multiple wallet addresses
- Asset Allocation: Diversification recommendations
- Rebalancing Alerts: Portfolio optimization suggestions
- Performance Metrics: ROI, Sharpe ratio, max drawdown
- Tax Reporting: Capital gains/losses tracking
# Copy production environment files
cp backend/config.example backend/.env.production
cp frontend/env.example frontend/.env.production
# Edit with production values# Build and deploy
chmod +x deploy/deploy.sh
./deploy/deploy.sh production# Configure nginx with SSL certificates
# Update DNS records to point to your server- Railway: Easy Python deployment
- Fly.io: Global edge deployment
- Google Cloud Run: Serverless container deployment
- AWS ECS: Enterprise container orchestration
- Vercel: Optimized Next.js deployment (recommended)
- Netlify: Static site deployment
- AWS Amplify: Full-stack deployment
- Supabase: Managed PostgreSQL with real-time features
- PlanetScale: Serverless MySQL with branching
- AWS RDS: Managed relational database service
POST /api/auth/telegram- Telegram authenticationPOST /api/auth/wallet- Crypto wallet authenticationGET /api/auth/me- Get current user info
POST /api/ai/chat- Chat with AI assistantGET /api/ai/market-overview- Market overview dataGET /api/ai/price/{symbol}- Get current price
GET /api/signals/- List trading signalsPOST /api/signals/generate- Generate new signalGET /api/signals/stats/performance- Signal performance stats
GET /api/portfolio/- Get portfolio dataPOST /api/portfolio/holdings- Add/update holdingsGET /api/portfolio/analysis- Portfolio analysis
GET /api/subscription/plans- Available plansPOST /api/subscription/subscribe- Create subscriptionGET /api/subscription/current- Current subscription
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm run test
# End-to-end tests
npm run test:e2e- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: docs.aitradingassistant.com
- Discord Community: discord.gg/aitrading
- Email Support: support@aitradingassistant.com
- Bug Reports: GitHub Issues
- β AI chat interface
- β Basic trading signals
- β Portfolio tracking
- β Telegram bot integration
- β Subscription system
- Advanced chart analysis
- Custom strategy builder
- Social trading features
- Mobile app (React Native)
- Advanced risk management tools
- White-label solutions
- Institutional features
- Advanced analytics dashboard
- API for third-party integrations
- Multi-language support
Disclaimer: This software is for educational and informational purposes only. Always do your own research and never invest more than you can afford to lose. Cryptocurrency trading carries significant risks.