A conversational fintech platform that allows users to interact with the stock market using natural language via Telegram Bot. Findian bridges professional-grade data with a simple, chat-based interface.
-
Core Architecture
- โ Microservices: FastAPI Backend + Telegram Bot Frontend
- โ Database: MySQL (Relational) + Redis (Real-time PubSub)
- โ AI Engine: Chutes AI (Llama 3.3) for Intent Parsing & Smart Clarification
-
Market Data Engine
- โ Robust Feed: Pure Yahoo Finance (yfinance) integration
- โ Hyper-Precision: 1-minute Price + Daily Volume/High/Low accuracy
- โ Resilience: Mock Data simulation during API blackouts
-
Telegram Interface
- โ Conversational UI: Natural language commands ("Price of Reliance", "Alert if TCS > 3000")
- โ Financial Formatting: Consistent โน1,234.50 format
- โ Interactive Menus: Screener, Portfolio, Disclaimer inline buttons
-
Core Features
- โ Smart Alerts: Redis-backed instant monitoring
- โ AI Screener: Custom scans ("RSI < 30") + Pre-built strategies
- โ Basic Portfolio: Add/View holdings with real-time P&L
-
Portfolio Management (Critical)
- โณ Sell Logic & Position Exit
- โณ Tax & Fees Calculation
- โณ Daily Portfolio Reports (5:00 PM cron)
-
Monetization & Security
- โณ User Tiers (Free vs Premium limits)
- โณ Access Control for Pro features
- โณ API Key Encryption
-
Cloud Deployment
- โณ Webhooks for <100ms latency
- โณ Production Server (AWS/DigitalOcean)
- Primary: Yahoo Finance (yfinance) for 100% uptime and 1-minute precision
- Stability: Zero-login architecture with no session management required
- Redis-backed monitoring system
- Real-time price target and technical indicator tracking
- Instant notifications to users
- Continuous Nifty 50 scanning
- Technical signals (RSI, breakouts, volume spikes)
- Custom AI Scans based on natural language
| Component | Technology |
|---|---|
| Frontend | Python-Telegram-Bot |
| Backend | FastAPI |
| AI Engine | Chutes AI (Llama 3.3) |
| Database | MySQL + Redis |
| Data Feeds | Yahoo Finance (yfinance) |
| Container | Docker |
| Memory System | Agent Memory for AI persistence |
-
Clone the repository
git clone http://localhost:8443/sanprat/Findian.git cd Findian -
Set up environment
cp .env.example .env # Edit .env with your API keys -
Run with Docker
docker-compose up -d
-
Start the bot
python bot/main.py
-
Try commands on Telegram
/start- Begin your journey- "Price of Reliance" - Get current price
- "Alert me when TCS crosses 3500" - Set price alert
- "Show me stocks with RSI < 30" - AI screener
Before committing or pushing, run the repo secret scan:
pre-commit run --all-files.env must remain gitignored and never be committed.
Findian includes an innovative Agent Memory System that enables AI agents to:
- Learn from user interactions
- Remember successful strategies
- Share knowledge across sessions
- Maintain project continuity
All AI agents must follow memory guidelines in GEMINI.md
Findian/
โโโ backend/ # FastAPI backend services
โ โโโ app/
โ โ โโโ core/ # Core trading logic
โ โ โ โโโ ai.py # AI and NLP processing
โ โ โ โโโ market_data.py # Data integration
โ โ โ โโโ scanner.py # Auto-screener logic
โ โ โ โโโ scheduler.py # Task scheduler
โ โ โโโ db/ # Database models
โ โ โโโ main.py # FastAPI entry
โโโ bot/ # Telegram bot frontend
โ โโโ main.py # Bot logic
โโโ agent_memory.sh # Memory system
โโโ universal_agent_hooks.py # Multi-agent integration
โโโ docker-compose.yml # Container orchestration
- Portfolio sell functionality
- Tax calculation engine
- Daily portfolio reports
- Premium subscription tiers
- Cloud webhook deployment
- Mobile app companion
User: "What's the price of Infosys?"
Bot: "โน1,456.30 โฒ +12.50 (+0.86%)"
User: "Alert me if Reliance goes above 2500"
Bot: "โ
Alert set: Notify when RELIANCE > โน2,500"
User: "Show me oversold stocks"
Bot: "๐ Found 5 stocks with RSI < 30: [List]"
This project uses AI agent collaboration with memory persistence. All agents follow guidelines in GEMINI.md for consistent development.
Findian: Democratizing algorithmic trading through conversation ๐ฌ๐
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.