đź’ˇ Inspiration
We were inspired by the daily pain points of retail traders in India—constantly switching between news portals, charting platforms, and trading dashboards. With the rise of powerful LLMs like Claude and Perplexity, we saw an opportunity to build a single assistant that could understand financial queries, retrieve market data, and act in real time through Zerodha’s MCP (Market Control Plane). We wanted to simplify the trading workflow and empower users to focus on strategy instead of system hopping.
⚙️ What it does
Perplexi Trade is an AI-powered trading companion that helps users:
- Fetch live stock prices using Zerodha's MCP.
- Understand complex market trends via Perplexity's natural language reasoning.
- Get actionable trade insights through conversational queries.
- Interact through a web interface using simple English or voice commands.
🏗️ How we built it
- Frontend: React + Vite, integrated with voice and text interfaces.
- LLM Layer: Used Anthropic’s Claude Sonnet 4 via the Perplexity SDK for structured responses.
- MCP Integration: Connected to Zerodha’s MCP using Server-Sent Events (SSE) to fetch live data and enable tool-based calls.
- Secure Access: Managed
kite_access_tokenauthentication for secure real-time API calls. - Smart Prompt Design: Carefully crafted system prompts to keep Claude’s reasoning grounded and financially relevant.
đź§± Challenges we ran into
- MCP Token Handling: MCP endpoints were sensitive to authorization formats; even minor issues caused failures.
- Tool Invocation Issues: Claude sometimes failed silently when calling tools—debugging this took significant time.
- CORS and SSE: Integrating SSE streams in-browser without backend proxying posed challenges.
- No Public APIs: Indian stock APIs are limited or paid; Zerodha’s MCP was the only reliable route.
- Latency + Token Limits: Balancing real-time feedback with Claude’s token constraints was tricky.
🏆 Accomplishments that we're proud of
- Successfully integrated a real-time stock assistant into a browser-based UI.
- Made AI interact with external tools (MCP) for dynamic, context-aware responses.
- Created a fluid natural language interface for Indian stocks, something very few apps offer.
- Brought together Perplexity AI + real-time trading APIs, bridging the gap between LLMs and execution platforms.
📚 What we learned
- How to interface LLMs with financial tools for structured responses.
- Deep technical insights into Zerodha’s MCP architecture and SSE-based streaming.
- Effective prompt engineering in a high-precision, high-stakes domain like trading.
- How to gracefully handle tool failures and fallback to defaults when APIs break.
đź”® What's next for Perplexi Trade: AI Powered Trading Companion
- Trade Execution: Enabling actual trade placements via Zerodha Kite API.
- Portfolio Summaries: Helping users track gains/losses and rebalance intelligently.
- Voice-first Interface: Build out a hands-free trading assistant.
- Multi-LLM Support: Experiment with Claude, GPT-4, and Mixtral for ensemble reasoning.
- Mobile App: Launch a lightweight Android/iOS version with secure logins and notifications.
Built With
- api
- javascript
- llm
- mcp
- react
- typescript
Log in or sign up for Devpost to join the conversation.