🚀 Inspiration

India is in the middle of a retail options-trading boom — millions of new traders, most of them young and self-taught. But SEBI's own data shows that over 90% of individual F&O traders lose money.

They don't lose because they're not smart. They lose because they trade blind: no position sizing, emotional entries and exits, and no real-time edge against institutions who have far better tools. We wanted to put an institutional-grade, AI-powered copilot in the pocket of the everyday trader — one that brings discipline, not hype.

💡 What it does

AstraNova is an AI copilot for India's intraday options traders. It:

  • Streams live market data — NIFTY, Bank Nifty, Sensex, India VIX, PCR, OI buildup — from a real Angel One feed.
  • Generates AI-scored trade signals automatically during market hours, on indices and F&O stocks, each with an entry range, stop-loss, and two targets.
  • Sizes every signal to your capital — it tells you exactly how many lots you can afford and your max risk in rupees.
  • Lets you paper trade risk-free, then place a real, PIN-protected order in your own Angel One account.
  • Answers any trading question in plain English via Ask Astra, and teaches the fundamentals via Learn with Astra — both powered by Google Gemini.
  • Sends push alerts the instant a signal fires, and supports UPI/card subscriptions via Razorpay.

🤖 How we used Google Gemini

Gemini is the intelligence layer that makes AstraNova a mentor, not just a data feed:

  1. Ask Astra — a Gemini-powered conversational assistant that answers any trading question ("What is PCR?", "How do I size a position?", "Explain this signal") in plain, beginner-friendly English, grounded on the user's live market context — with a built-in "this is education, not advice" guardrail.
  2. Signal explanations — when a signal fires, Gemini explains why in human terms: the OI buildup, PCR, and price-action confluence behind it.
  3. Learn with Astra — Gemini generates bite-sized lessons on options concepts, delivered with voice narration for accessibility.

Gemini turns raw numbers into understanding — which is exactly what a first-time trader needs to survive.

🛠️ How we built it

Frontend: React 18 + TypeScript + Vite + Tailwind CSS, deployed on Firebase Hosting. Interactive candlestick charts (lightweight-charts), Web Push notifications (VAPID), and a mobile-first PWA-style UI.

Backend: Python + FastAPI + SQLAlchemy on Google Cloud Run, with Cloud SQL (PostgreSQL), Secret Manager, Artifact Registry, and Cloud Build for CI/CD.

Market engine: A dedicated Compute Engine worker runs 24/7 on a static IP, ingesting Angel One's WebSocket feed and running a multi-factor confluence model that scores every setup across price action, open interest, PCR, and implied volatility — surfacing only high-conviction signals.

AI: Google Gemini (via the google-genai SDK) powers Ask Astra, signal explanations, and Learn.

Execution & data: Angel One SmartAPI for live data and real order placement; Yahoo Finance for historical candles; Razorpay for payments; email-OTP auth with signed JWT sessions.

🧗 Challenges we ran into

  • Real broker execution is hard. Angel enforces an IP allow-list on live orders — so we re-architected order placement to route through our whitelisted static-IP worker, while the API handles auth and validation.
  • Live data reliability — daily broker-session expiry, rate limits, and feed staleness. We built auto-reconnect, a self-healing daily worker restart, and moved candle data to a rate-limit-free source.
  • Grounding Gemini responsibly — keeping answers accurate, on-topic, and clearly framed as education, never financial advice.
  • Doing it live, for real — not a mockup. Getting real orders to actually execute on a real exchange account meant solving infra, sessions, IP whitelisting, and idempotency end to end.

🏆 Accomplishments we're proud of

  • It actually trades. We placed real, AI-suggested orders that executed on a live Angel One account — net in profit.
  • Signals on indices and F&O stocks, sized to real capital, live during market hours.
  • A genuinely helpful Gemini mentor that makes options approachable for beginners.
  • Fully deployed, production-grade infrastructure — auth, payments, push, execution — not a demo.

📚 What we learned

  • How to ground an LLM (Gemini) on real, live financial data while keeping it safe and compliant.
  • The real-world plumbing of broker APIs — IP whitelists, session tokens, order lifecycles.
  • That the hardest part of fintech isn't the model — it's making everything real, reliable, and trustworthy.

🔮 What's next

  • Automatic exit management for live trades (auto square-off at target/stop).
  • Broker-session auto-refresh and multi-broker support (Zerodha, Upstox).
  • Deeper Gemini personalization — a copilot that learns each trader's style and coaches them over time.
  • Native iOS & Android apps.

Built With

Share this project:

Updates