Financial Services > Investment & Wealth Management
Trading & Broking
Retail and institutional trading platforms, order management systems, exchange connectivity, and algorithmic trading — the technology powering India's stock markets
160M+
Demat Accounts
₹1L Cr+
Daily Volume
<1ms
Order Latency
12M+
Zerodha Users
Understanding Trading & Broking— A Developer's Domain Guide
Trading & Broking systems encompass the full lifecycle of a trade from investor intent to exchange execution and settlement. This includes retail trading apps (Zerodha, Upstox), institutional OMS/EMS systems, exchange gateways, algorithmic trading engines, risk management, and back-office settlement. India's capital markets process crores of trades daily across NSE and BSE, demanding ultra-low latency, high availability, and real-time risk controls.
Why Trading & Broking Domain Knowledge Matters for Engineers
- 1India has 160M+ demat accounts as of 2024 — explosive retail growth
- 2Zerodha, Upstox, and Angel One handle millions of orders daily on modern tech stacks
- 3High-frequency trading and algo trading create demand for low-latency engineering
- 4SEBI mandates create continuous compliance and regulatory work
- 5NSE and BSE co-location services offer microsecond-level latency challenges
- 6Open trading APIs (Zerodha Kite, Upstox API) drive fintech innovation
How Trading & Broking Organisations Actually Operate
Systems & Architecture — An Overview
Enterprise Trading & Broking platforms are composed of a set of core systems, data platforms, and external integrations. For a detailed, interactive breakdown of the core systems and the step-by-step business flows, see the Core Systems and Business Flows sections below.
The remainder of this section presents a high-level architecture diagram to visualise how channels, API gateway, backend services, data layers and external partners fit together. Use the detailed sections below for concrete system names, API examples, and the full end-to-end walkthroughs.
Technology Architecture — How Trading & Broking Platforms Are Built
Modern Trading & Brokingplatforms follow a layered microservices architecture. The diagram below shows how a typical enterprise system in this domain is structured — from the client layer through the API gateway, backend services, data stores, and external integrations. This is the kind of architecture you'll encounter on real projects, whether you're building greenfield systems or modernising legacy platforms.
End-to-End Workflows
Detailed, step-by-step business flow walkthroughs are available in the Business Flows section below. Use those interactive flow breakouts for exact API calls, system responsibilities, and failure handling patterns.
Industry Players & Real Applications
🇮🇳 Indian Companies
Zerodha
Discount Broker / Fintech
Go, Python, Kite Platform
India's largest broker by active clients, built Kite & Pi
Upstox
Discount Broker
Java, React Native, AWS
Tiger Global backed, 12M+ customers
Angel One
Full-Service + Discount
SmartAPI, Java
Listed company, AI-driven advisory
ICICI Direct
Bank-backed Broker
Custom OMS, Java
Integrated with ICICI banking
HDFC Securities
Bank-backed Broker
Custom Platform, Java
Part of HDFC Group
Motilal Oswal
Full-Service Broker
Custom + Vendored OMS
Research-heavy full-service
🌍 Global Companies
Interactive Brokers
USA/GlobalGlobal Broker
C++, TWS Platform
Professional and institutional trader favorite
Charles Schwab
USARetail + Institutional
Custom + Apex Clearing
TD Ameritrade acquired
Citadel Securities
USAMarket Maker / HFT
C++, FPGA, Co-location
Largest US retail order router
Virtu Financial
USAHFT / Market Maker
Custom Low-Latency Stack
Algo market making globally
Robinhood
USARetail Fintech Broker
Python, AWS, React Native
Commission-free trading pioneer
Revolut Trading
UK/EuropeNeobank + Broker
Microservices, AWS
Embedded trading in super app
🛠️ Enterprise Platform Vendors
Fidessa (ION Group)
OMS, EMS, Algo Trading
Enterprise institutional OMS leader
Bloomberg EMSX
Execution Management System
Buy-side EMS integrated with Terminal
FlexTrade
FlexOMS, FlexEMS
Multi-asset OMS/EMS
ODIN (Financial Technologies)
ODIN Trading Platform
Widely used in Indian brokers
Tradetron
Algo Strategy Platform
Indian algo trading platform
Core Systems
These are the foundational systems that power Trading & Broking operations. Understanding these systems — what they do, how they integrate, and their APIs — is essential for anyone working in this domain.
Business Flows
Key Business Flows Every Developer Should Know.Business flows are where domain knowledge directly impacts code quality. Each flow represents a real business process that your code must correctly implement — including all the edge cases, failure modes, and regulatory requirements that aren't obvious from the happy path.
The detailed step-by-step breakdown of each flow — including the exact API calls, data entities, system handoffs, and failure handling — is covered below. Study these carefully. The difference between a developer who “knows the code” and one who “knows the domain” is exactly this: the domain-knowledgeable developer reads a flow and immediately spots the missing error handling, the missing audit log, the missing regulatory check.
Technology Stack
Real Industry Technology Stack — What Trading & Broking Teams Actually Use. Every technology choice in Trading & Brokingis driven by specific requirements — reliability, compliance, performance, or integration capabilities. Here's what you'll encounter on real projects and, more importantly, why these technologies were chosen.
The pattern across Trading & Broking is consistent: battle-tested backend frameworks for business logic, relational databases for transactional correctness, message brokers for event-driven workflows, and cloud platforms for infrastructure. Modern Trading & Brokingplatforms increasingly adopt containerisation (Docker, Kubernetes), CI/CD pipelines, and observability tools — the same DevOps practices you'd find at any modern tech company, just with stricter compliance requirements.
⚙️ backend
Go
Ultra-low-latency trading APIs — used by Zerodha (Kite)
C++
HFT engines, exchange gateways, matching engine
Java
OMS, risk systems, institutional platforms
Python
Algo strategy development, analytics, backtesting
🖥️ frontend
React / Next.js
Web trading terminal, portfolio views
React Native / Flutter
Mobile trading apps
WebSocket
Real-time market data streaming to frontend
🗄️ database
PostgreSQL
Order history, client data, trade records
Redis
Live positions, real-time P&L, session data
InfluxDB / Kdb+
Tick data, time-series market data (HFT uses kdb+)
Apache Kafka
Trade event streaming, market data distribution
💡 protocols
FIX Protocol
Industry standard for order routing to exchanges
CTCL (NSE)
NSE's broker connectivity protocol
WebSocket / SSE
Real-time price streaming to clients
NEAT/BOLT
NSE/BSE legacy trading terminals
☁️ cloud
AWS
Most modern brokers — Upstox, Angel One
NSE Co-location
HFT firms — physical servers at NSE data centre
Azure
Enterprise institutional platforms
Interview Questions
Q1.Explain the lifecycle of a trade order from placement to settlement.
1) Order Entry — investor places order in app, 2) Pre-trade risk check — margin, limits, compliance, 3) OMS routing — order sent to exchange gateway, 4) Exchange matching — matched against counterpart order, 5) Trade confirmation — fill sent back via FIX ExecutionReport, 6) Post-trade processing — allocation, position update, trade reporting, 7) Clearing — NSCCL nets positions, calculates obligations, 8) Settlement (T+1) — CDSL/NSDL credits securities, funds settle via clearing bank.
Q2.What is the FIX protocol and what are its key message types?
FIX (Financial Information eXchange) is the industry standard messaging protocol for electronic trading. Key messages: NewOrderSingle (place order) — tag 35=D; ExecutionReport (fills, rejections) — tag 35=8; OrderCancelRequest — tag 35=F; OrderCancelReplaceRequest (modify) — tag 35=G; Heartbeat — tag 35=0; MarketDataRequest/SnapshotFullRefresh for quotes. FIX uses tag=value pairs. Important tags: 49=SenderCompID, 56=TargetCompID, 55=Symbol, 54=Side (1=Buy, 2=Sell), 38=OrderQty, 44=Price.
Q3.How does SPAN margin work for F&O?
SPAN (Standard Portfolio Analysis of Risk) calculates margin for F&O by scanning 16 risk scenarios (price up/down × 3, volatility up/down, time decay) and takes the worst-case loss. Components: Scanning Risk (worst scenario loss) + Inter-month spread credit + Delivery margin + Net Option Value. SEBI mandates SPAN margins. Example: Buying 1 lot Nifty Call — OTM options have lower SPAN but deep ITM or short positions require higher. Brokers can charge extra 'exposure margin' above SPAN.
Q4.What happens during a circuit breaker?
Circuit breakers halt trading when indices fall rapidly. Index circuit breakers (NSE): 10% move → 45 min halt (if before 1 PM); 15% move → 1h45m halt; 20% move → rest of day halt. Stock-level circuits: 5%, 10%, or 20% daily bands — trading paused for 15 min on breach. System impact: Pending orders may be cancelled or frozen, risk systems flag exposure, brokers notify clients, square-off may be triggered for leveraged positions. System must handle order status updates correctly post-circuit.
Q5.Explain how a discount broker like Zerodha achieves low latency.
1) Co-location — servers physically located at NSE/BSE data centres, reducing network hops from 10ms to <1ms, 2) Optimised network stack — kernel bypass networking (DPDK/RDMA), 3) Language choice — Go for API servers (low GC pause), C++ for exchange gateway, 4) In-memory state — positions and risk in Redis, avoid DB round-trips, 5) Async processing — Kafka for non-critical paths, synchronous only for order critical path, 6) Pre-allocated memory — avoid GC in hot path, 7) Direct Market Access (DMA) — no broker intervention in order routing.
Glossary & Key Terms
OMS
Order Management System — manages the full order lifecycle
EMS
Execution Management System — focused on smart order routing and execution
FIX
Financial Information eXchange — messaging protocol for electronic trading
VWAP
Volume Weighted Average Price — benchmark for execution algorithms
TWAP
Time Weighted Average Price — executes order evenly over time period
DMA
Direct Market Access — direct order routing to exchange without broker intervention
Co-location
Placing trading servers at exchange data centre for minimum latency
NSCCL
NSE Clearing Corporation — clears and settles NSE trades
SPAN
Standard Portfolio Analysis of Risk — F&O margin calculation methodology
MTM
Mark-to-Market — revaluing positions at current market prices
Circuit Breaker
Automatic market halt when price moves beyond defined threshold
HFT
High-Frequency Trading — microsecond-speed algorithmic trading strategies