# Metis

Case study by Devansh Tiwari (https://www.devanshtiwari.com) · https://www.devanshtiwari.com/work/metis

Side project. AI stock analysis for Indian swing traders. 70+ traders surveyed, 2,100+ stocks covered, 25 beta users on WhatsApp. From concept to daily-use product in 48 days.

## Key facts

- Role: Product Engineer
- Client: Metis
- Year: 2026
- Status: Ended
- Live: https://trymetis.app
- Tech: Next.js, TypeScript, Vercel AI SDK, Claude Sonnet, Gemini 2.5 Flash, Groq Llama 3.3, Drizzle ORM, Neon Postgres, Upstash Redis, PostHog, Serper, FYERS API, NextAuth, Web Push, SWR

## At a glance

- Problem: Indian swing traders got raw charts and numbers, but no clear call on what to do.
- What I built: An AI analyst on WhatsApp that gives entry, stop-loss and position size for Indian stocks.
- Result: Traders get a clear plan in one message instead of a chart to decode.

## Numbers

| Metric | Value |
| --- | --- |
| Lower cost per session | 76% |
| Beta users | 25 |
| NSE + BSE stocks | 2,100+ |
| Built in | 48 days |
| Cost per session | $0.06-0.08 |
| AI providers | 3 |
| Sector coverage | 1,284 |
| Traders surveyed | 70+ |

Values with a + are public figures rounded down.

## The problem

91% of Indian retail traders lose money (SEBI 2024 study). I surveyed 70+ traders to find out why. 68% said wrong entry/exit timing was their biggest pain. The tools that existed (Screener.in, TradingView, Chartink) gave raw data but not analysis. They showed you RSI is 58. They didn't tell you what that meant for your trade, where to enter, where to place a stop loss, or how many shares to buy given your capital. And no tool solved the deeper problem: traders don't know what to look at on any given morning.

## What I built

Side project I worked on in 2026. Stopped to focus on other engagements. AI chat that combined real-time NSE and BSE data with actual analysis. Fetched live OHLCV, computed 7 technical indicators (RSI, MACD, Bollinger Bands, ATR, SMA, EMA, pivot points), pulled FII/DII flows, option chain (PCR, max pain, OI), delivery percentages, and macro context (DXY, VIX, crude, gold), then generated a structured verdict with confidence score (0-10 weighted across 5 factors), interest zones, risk levels, and position sizing based on your capital. Rendered as an interactive widget with candlestick charts, technical panels, and flow data, not just text. Built Market Pulse as a daily habit loop with sector heatmap, leaders/laggards drill-down, AI-generated morning briefs, and 8:30 AM IST push notifications. Added weekly streak system (Duolingo-style with freeze mechanic) and Quick-Ask inline analysis cards. Natural language stock screener over a 2,132-stock NSE universe plus BSE. Shareable analysis pages with SEO (Article JSON-LD, dynamic sitemap) that doubled as organic landing pages. Config-driven provider registry with Gemini, Groq, and Anthropic fallback chain and three cost-optimization passes that dropped per-session cost from $0.25 to $0.06-0.08 (68-76% savings) via model routing, prompt caching, context slicing, and Gemini-first utility routing. Email OTP + Google SSO, 6-layer security model (input, data, auth, file, infrastructure, ops), dual-layer analytics (PostHog AARRR + in-DB columns), and an admin panel for beta ops. 7 free SEO tools shipped (Position Size, Risk-Reward, Swing Profit, Capital Gains, Stock Average, Pivot Point, F&O Turnover) targeting 650K+ monthly searches.

### Core Analysis Engine

Real-time NSE/BSE data + 7 technical indicators (RSI, MACD, Bollinger, ATR, SMA, EMA, pivots) + FII/DII flows + option chain (PCR, max pain, OI) feeding a structured verdict with 0-10 confidence score, interest zones, and capital-aware position sizing.

### Market Pulse (Daily Habit Loop)

Sector heatmap, AI morning briefs, 8:30 AM IST push notifications, weekly streaks (Duolingo-style with freeze mechanic). Reduced heatmap load from 117 HTTP calls to 16, render time 3-5s to under 1s.

### Stock Discovery

Natural language screener over a 2,132-stock NSE universe plus BSE. Quick-Ask inline analysis cards. Market movers by sector drill-down with leaders and laggards.

### Cost-Optimized AI Infrastructure

Config-driven provider registry with Gemini → Groq → Anthropic fallback chain. Three cost-optimization passes (model routing, prompt caching, context slicing, Gemini-first utility routing) dropped per-session cost from $0.25 to $0.06-0.08.

### Shareable Analysis Pages

SEO-optimized analysis pages with Article JSON-LD and dynamic sitemap that double as organic landing pages. Interactive widget with candlestick charts, technical panels, and flow data.

### Platform & Growth

Email OTP + Google SSO, 6-layer security model (input, data, auth, file, infrastructure, ops), dual-layer analytics (PostHog AARRR + in-DB columns), admin panel for beta ops. 7 free SEO tools (Position Size, Risk-Reward, Swing Profit, Capital Gains, Pivot Point, F&O Turnover) targeting 650K+ monthly searches.

## Highlights

- Cut per-session API cost from $0.25 to $0.06 (76% savings) via multi-provider LLM routing with zero quality regression
- 70+ user interviews validated the problem before writing a line of code; 25 active beta users on WhatsApp generating daily analyses
- Reduced Market Pulse heatmap load from 117 HTTP calls to 16 via batch quote chunking, render time 3-5s to under 1s
- Config-driven provider registry with Gemini → Groq → Anthropic fallback chain absorbs outages without user impact

## Further reading

- [Metis on the blog](https://www.devanshtiwari.com/blog/how-i-validated-metis-before-writing-code) (Markdown: https://www.devanshtiwari.com/blog/how-i-validated-metis-before-writing-code.md)

## Work with Devansh

Devansh Tiwari is an AI product engineer based in India, available for freelance and consulting work: custom data feeds from sites without APIs, AI features (agents, chat, RAG, MCP servers) built on that data, and running them after launch.

- Book a 15 minute call: https://cal.com/devansh0718/15min
- Email: devanshtiwari365@gmail.com
- All case studies: https://www.devanshtiwari.com/work
- Site summary for AI tools: https://www.devanshtiwari.com/llms.txt
