Developer’s Brief for Nirantar
Phase 1 Development
Objective:
To build the first phase of a modular, high-speed cloud-based trading system, starting with a single strategy: the Independent Lot Strategy, operating in both Buy and Sell modes, with integration of two broker trading accounts (Zerodha and Fyers).
This system will serve as the core foundation for a larger suite of 50+ trading strategies and AI/ML tools, integrating 10-12 broker trading accounts, dozens of indicators, live news feeds, charts, and custom watchlists in future phases.
Scope for Phase 1:
1️⃣ Strategy: Independent Lot – Buy & Sell Modes
Each lot is an autonomous trade unit with:
Individual entry/exit logic
Independent SL, target, revisit locks, and P&L tracking
Unique lifecycle, not dependent on other lots
Both Buy Mode and Sell Mode for F&O and equity must be supported
Multiple lots will run in parallel, fully independent
System must handle in excess of 1000 lots simultaneously
Includes 5–7 real-time meters (e.g., IV Meter, Range Meter, Momentum Meter) integrated into entry/exits
2️⃣ Broker Integration:
Integrate 2 live broker accounts:
Zerodha and Fyers
Develop a Smart Order Management System (OMS) with:
Real-time fund check across both accounts
Smooth, automatic mid-trade switching in case of fund shortfall or order rejection in one account
Ability to tag lots by account and track execution status separately
Broker Auto-Fallback Logic if the primary broker is unresponsive for more than 3 seconds
3️⃣ Architecture & Tech Goals:
Must be designed as a scalable web application to:
Easily plug in future strategies, indicators, accounts, and watchlists
Integrate AI/ML modules and live news feeds in later stages
Must support sub-250 ms internal processing time
Hosted on cloud infrastructure (preferably AWS, Azure, DigitalOcean, or Railway)
DevOps setup for Continuous Integration (CI), Continuous Deployment (CD) and version rollback protection
FastAPI or Node.js for asynchronous processing and real-time trade execution
WebSocket fallback layer with Message Queues for real-time data consistency
Backup Database Logic (Redis/Postgres) for failover protection
4️⃣ Frontend & Display Requirements:
Build a responsive, real-time UI Dashboard:
Real-time P&L per lot
Lot lifecycle status (active, exited, locked)
Strike grouping, lot filtering
Real-time alerts (SL hit, target hit, account switch)
Grafana dashboard for live monitoring
UI should also reflect:
Current capital status per account
Global kill/pause options
Meter values affecting trade logic
5️⃣ Security & Compliance:
Sign a strict NDA before development begins
Implement 2-FA login system for dashboard access
Store no sensitive data in plain text
Developer must follow IP & code handover clause per milestone
Ensure no hidden code hooks or backdoors
Audit Logs for all user actions (force exits, manual overrides, broker switches)
6️⃣ Payment Schedule:
Milestone-based payments:
_ % upfront upon signing of the agreement and NDA
_% upon demonstrating a functioning prototype with partial broker integration and UI component
__% after completion of Broker Integration and OMS module
__% after completion of UI and Frontend Dashboard
__% after completion of Strategy Logic and Meters
__% upon final testing, documentation, and deployment on cloud
7️⃣ Regular Code Transfer:
Developer must provide code transfer and documentation at the completion of each milestone
Handover must include:
Source code
Architecture diagram
Configuration files
API integrations
Testing scripts
Log files
8️⃣ Complete Documentation:
Developer must provide:
Setup and deployment instructions
API usage and endpoints
Configuration settings and explanation
Error handling and troubleshooting guide
Architecture blueprint and process flow
9️⃣ Post-Delivery Support:
Minimum 50 days of post-delivery support to handle:
Bug fixes
API connection issues
Basic troubleshooting
Option for extended support upon request
🔟 Third-Party Data Provider Integration:
System should be capable of integrating with third-party data providers for:
Real-time options chain
Market news
IV data
Sentiment analysis
1️⃣1️⃣ Test Simulator:
Developer must create a simulator for testing trades without real money before going live.
It should replicate live market conditions with broker APIs for realistic testing.
Timeline:
Complete delivery in 30-35 calendar days
Must follow a milestone-based approach
Milestone handover must include: tested code, source files, logs, UI, and config
Deliverables (Phase 1):
Fully working web application (front-end + backend)
Zerodha and Fyers integration
OMS with dynamic account switching and Auto-Fallback Logic
Independent Lot engine with Buy/Sell modes
5–7 core meters embedded
Live UI dashboard with Grafana monitoring
Deployed and tested on a cloud server
Simulator for Paper Trading
Source code, logs, and documentation handover at every milestone