Platform Our platform is a SaaS platform where many traders will use it for: a. Market study and help in learning trading b. Studying their own past transactions c. Interactive chat to learn more about market analysis or their transactions Zerodha Connections Global a. We have a global Zerodha connection (Admin account) used for: Instruments Market data Historical candles Intraday candles b. Every day, Admin must log in and connect to Zerodha to activate the access token Personal a. Each user can connect their personal Zerodha account b. This account is used only to fetch transactions for analysis c. No trading or market data fetching is done using personal accounts 1. Watchlist (Daily) We have multiple lists of stocks for daily watchlist for intraday: a. Personal Watchlist User-specific stocks added manually Users manage their own watchlist This list flushes daily as bcoz, everyday new interest b. ET lists ET list: taken from ET movers API or crawling From this list, we take: Top 10 gainers Top 10 losers c. Early Breakout / Breakdown This list is finalized before market hours Runs about 1 hour before market opens Uses only historical data Scans all ~3203 stocks from stocks_history Produces a short list of stocks ready for: Early breakout Early breakdown 2. Background Tasks a. Stock History Maintenance (Once in a day around 7 PM) Stocks masters collection - Create / update once in every 6 months We run background tasks to keep stock history up to date: Timeframes stored: 1 Day → max 300 candles or 1 year Initial storage: Fetch history for all stocks Ongoing updates: Fetch only missing or new data today's day by EOD Respect Zerodha API limits Partial updates are allowed b. Early movers (830 Pm Every day - Sunday to Thursday) Scans all ~3203 stocks from stocks_history Computes and finalize top 50 for potential early movers by algorithm This list is finalized before market hours Runs about 1 hour before market opens Uses only historical data This list is ready for the next day trade. c. Intraday Background Jobs We run background jobs for intraday data: Timeframes: 5 min 15 min 30 min Data characteristics: Data is kept for current trading day & Last Trading day Data is flushed at EOD Intraday data is not stored long-term Lists covered: Personal Watchlist ET Early Breakout c. Scheduling Rules Early Breakout: Every 5 min from 9:00–10:00 AM After 10:00 AM → every 15 min (Using the same loop as Intra day - ET) ET list: Every 15 min personal watchlist: Every 15 min Except for list and time, the analysis logic is the same for all 3. Background Analysis Flow (Runs Every 15 Minutes) a. Build Global List Get lists from database Aggregate: Aggregated Personal watchlist (all users) ET list Early Movers list (only for 9 to 10 every 5 minutes) Remove duplicates b. Portfolio Rule No forced shorting Only deduplication Rest of the analysis remains same c. ET List Processing Take top 10 gainers & losers e. Indicator & Strategy Computation Strategy is intraday BUY or SELL No directional bias (LONG + SHORT both allowed) Compute: Indicators (6) Strategies (14) Timeframes used: 5 min 15 min 30 min 1 Day 1 Week 1 Month f. GPT Analysis GPT is called only for the filtered top list GPT is NOT called for the entire universe g. Data Storage Store: Snapshot data Computed indicators & strategies GPT output h. Stream Frontend fetches latest data using APIs 4. Chat Chat is used in Stream, Alerts, and Learning. a. Analysis Chat Chat starts with latest snapshot (intraday) data Computed data passed: Indicators (6) Strategies (14) Goal: Get GPT input to help decide BUY / SELL / HOLD b. Transactions Chat Pass transaction details related to a trade Goal: Analyze whether the trade was right or wrong Additional data may be attached to improve analysis 5. Paper Trades a. Paper trades are automatically created when a potential BUY / SELL signal is ready b. Analysis score must be ≥ 80 (HIGH or VERY_STRONG) c. Virtual capital assigned: ₹10,00,000 d. With every new data update, paper trades are created or updated e. Paper trade settings are controlled from backend f. Paper trades are closed at EOD for daily summary g. Account balance is updated based on profit or loss 6. Learning a. Users can learn from real trade transactions fetched from Zerodha 7. Alerts a. Alerts are produced only for: VERY_STRONG conviction Score ≥ 85 8. GPT Usage a. GPT is used only at specific analysis times b. GPT is used for learning transactions c. No unwanted or unnecessary GPT calls d. GPT is called only in background analysis e. Chat GPT calls are async f. GPT or Zerodha calls must not block any other process