API restarts interrupting live trading
Split-worker fault isolation — market feed, signal processing, and broker execution run as separate processes.
Broker-Linked F&O Trading SaaS
A production-grade algorithmic trading platform built for Indian F&O markets. The same codebase ships as multiple white-label deployments — each with its own branding and domain. A Next.js trader and admin frontend pairs with a FastAPI backend split across multiple runtime processes. MongoDB stores users, broker accounts, trades, and audit data. Redis powers live tick caching, pub/sub fan-out, and asynchronous trade command routing. Multiple Indian brokers integrate behind a unified adapter layer.

Problem & goal
Retail and prop-style traders running Indian F&O strategies need more than a broker terminal. They need automated signal ingestion, centralized risk controls, multi-account management, live P&L, subscription gating, and operations tooling — without building separate broker integrations or running fragile single-process bots that fail on every deploy or restart.
The platform addresses this with a split-worker architecture where market feed ingestion, signal processing, and broker order execution run as independent processes. Traders connect broker accounts, map strategies to accounts, and monitor open positions in real time. Platform operators manage clients, subscriptions, market configuration, webhook routing, access control, and aggregate reporting from a dedicated admin console.
Target users
Traders & clients — broker account linking, live trades and watchlist, trade history, strategy settings, subscription status, and regulatory compliance flows
Managers — scoped client management, trading workspace access, and operational visibility within assigned accounts
Platform operators — client lifecycle, team management, subscription plans, market feed configuration, webhook admin, role-based access, audit logs, and aggregate reporting
Core capabilities
Email and OAuth-based login with registration verification, JWT sessions, and role-based permissions. Scoped access for managers and subscription-gated features for automated signal routing.
Multi-broker OAuth connections with daily session lifecycle management, paper vs live trading modes, per-account configuration, and encrypted credential storage.
Dedicated feed process maintains live market data via broker WebSocket. Instrument master sync from broker contract APIs. Per-user watchlists with live pricing on the dashboard.
Tick-driven monitoring of open and pending trades for entry, stop-loss, and target conditions. Supports manual entries, bulk square-off, TradingView webhook signals, and scheduled session close-outs.
Unified order gateway with fill reconciliation, position-aware exit sizing, and a defined trade lifecycle from entry through close. P/L tracking for NSE/MCX F&O conventions.
Webhook endpoint for TradingView alerts with admin-configured strategy allowlists and per-client routing maps. Async processing with parallel fan-out to subscribed clients.
Plan catalog and user subscriptions gate automated signal routing and premium features. Admin manages plans; traders view status from the dashboard.
Client management, team members, subscription plans, access control, market feed configuration, instrument sync, webhook strategy maps, trade oversight, and aggregate reporting.
Live trades with real-time pricing and P&L, trade history, broker connections, strategy settings, subscription, and user preferences.
Disclaimer, privacy policy, and terms pages. IST timezone across services. Market holiday calendar integration and regulatory disclosure flows.
High-level design
The backend is a modular monolith split across multiple processes — not distributed microservices. Domain logic lives in one codebase while failure domains stay isolated: restarting the API does not interrupt market data ingestion or scheduled session jobs.
The frontend calls versioned REST APIs through the reverse proxy. WebSocket connections serve live trade and watchlist updates. External webhook sources POST to a public API endpoint. Signal and API processes enqueue trade intents to a Redis-backed command queue, and a dedicated execution process is the sole broker I/O owner. The feed process publishes live ticks to Redis; signal processing and the WebSocket hub consume independently.
Production stack
Multi-broker adapter layer
Multiple Indian brokers integrate through a unified adapter layer with platform-specific OAuth flows, symbol resolution, and order placement. A dedicated admin-configured feed account powers market data, separate from per-user trading accounts. Order placement uses controlled execution with fill reconciliation and position-aware exit sizing.
Live data pipeline
Authenticated WebSocket connections deliver live trade state, incremental position updates, watchlist pricing, and connection health checks. Admin monitoring channels support operational oversight.
Challenges solved
Split-worker fault isolation — market feed, signal processing, and broker execution run as separate processes.
Asynchronous command routing — only the execution process touches broker APIs, serializing I/O.
Tick-driven risk monitoring on live market ticks, not solely on broker-side bracket orders.
Paper-trading safety defaults — daily broker session reset forces paper mode until traders reconnect.
White-label deployability — branding, data namespaces, and infrastructure artifacts are parameterized.
Multi-broker adapter layer — broker-specific OAuth and order APIs abstracted behind a factory pattern.
IST timezone, exchange session schedules, F&O P&L conventions, holiday calendar, and regulatory disclosure flows built in.
Built for production load
Command queue decouples signal generation from broker I/O latency
Redis pub/sub serves signal processing and WebSocket clients independently
Frontend query caching with targeted invalidation on trade events
Trading-day-aware worker scheduling to avoid idle resources on non-trading days
Metrics and optional error tracking for production operations
Rate limiting on API and frontend endpoints
Operations
Production runs as Docker containers orchestrated through Compose — MongoDB, Redis, FastAPI application, feed/signal/execution workers, Next.js standalone frontend, and Nginx reverse proxy with TLS renewal. Build and deploy are scripted from the repo root. Asia/Kolkata timezone applied across services. Local development uses Docker Compose for data services; application processes run as hot-reload dev servers.
Roadmap
Additional broker adapters
Worker autoscaling based on market activity
Enhanced strategy analytics and performance dashboards
Mobile-optimized trader experience
Multi-exchange instrument expansion
Trade alert notifications across channels
Optimized trade history for long-running accounts

Get started
Whether you're looking for a White-Label Trading Platform or a Custom Solution, I can help you build, customize, and deploy a production-ready platform tailored to your business.
White-Label Trading Platform
Custom Trading Platform Development
Broker API Integrations
TradingView Automation
Full-Stack Development & Deployment
Ongoing Support & Enhancements