The Trading Platform Technical Reality
Milliseconds matter in trading. A 100ms delay between user click and order placement loses money and users. Building a trading platform is one of the most technically demanding software challenges—require infrastructure expertise, real-time systems knowledge, and financial market domain expertise.
Latency is Non-Negotiable
Measuring Latency Correctly
- User action to order placement
- Order placement to exchange receipt
- Market feed to display update
- Total system round-trip
Each component must be optimized. Typical latency budgets:
- Client to server: 20-50ms
- Server to exchange: 50-100ms
- Display update: 50-100ms
Infrastructure for Low Latency
- Dedicated connections to exchanges (not shared internet)
- Co-location servers at exchange data centers
- Direct market data feeds, not API polling
- Single-region deployment (no multi-region replication for trading data)
- Hardware-based networking (avoid cloud for trading core)
Order Routing and Execution
Order Entry System
- Accept orders from user UI
- Validate price and quantity
- Send to exchange via FIX protocol or exchange API
- Track status and handle rejections
Position Management
- Real-time profit/loss calculations
- Margin requirement calculations
- Open interest tracking
- Risk monitoring and circuit breaker triggers
Failover and Redundancy
- Primary and backup connections to exchange
- Automatic failover without losing orders
- Duplicate order detection and prevention
- Rebuild state from exchange confirmation data
Market Data and Information
Data Feed Integration
- Subscribe to NSE and BSE real-time feeds
- Handle market data in protocol buffer or binary formats
- Broadcast to clients via WebSocket
- Handle 50-100K messages per second during peak hours
Data Validation
- Check for gaps or out-of-order data
- Detect stale data and alert users
- Reconcile with exchange (catch missed events)
- Maintain audit trail
SEBI Compliance Requirements
Market Integrity
- Detect and prevent manipulation
- Position limit enforcement
- Volatility circuit breakers
- Transaction reporting within 90 seconds
Audit and Reporting
- Every order must be logged with timestamp
- Maintain 7-year records
- Regular compliance audits
- Conduct annual stress tests
Customer Protection
- Segregated customer funds
- Real-time risk monitoring
- Client agreement with disclosed risks
- Grievance redressal mechanism
Technical Architecture Components
User Interface (Web/Mobile)
↓
Order Gateway (validation + queuing)
↓
Order Router (exchange routing logic)
↓
Risk Engine (position & margin checks)
↓
Exchange Connection (FIX protocol)
Each component requires redundancy and monitoring.
Common Failure Points
Trading platforms fail at scale due to:
- Undersized order queue capacity
- Insufficient market data feed bandwidth
- Unplanned failover during peak trading
- Database locks under high throughput
- Display lag causing confused traders
Plan for 2-3x peak traffic capacity.
Building vs Buying
Build if: You're targeting a specific market or asset class with unique needs. Building takes 18-24 months and costs ₹2-5 crores.
Buy/License if: You want to launch quickly. Platforms like NSE Gateway or White Label platforms cost ₹50-150 lakhs upfront + recurring fees.
Most Indian fintech companies license infrastructure and build UI + risk layer on top.
Frequently asked questions
How much does a co-location server at NSE cost?
Co-location fees run ₹2-4 lakhs monthly at exchange data centers. Add ₹5-10 lakhs for dedicated exchange connections and redundant hardware. Critical for serious traders.
What's the minimum SEBI compliance requirement to start?
You need membership at NSE/BSE (₹10+ crores), compliance infrastructure, audit trails, and grievance systems before trading a single share. Plan 6-12 months and ₹50+ crores for regulatory setup.
How do we prevent order duplication in failover?
Use idempotent order IDs. When failover occurs, query exchange for any already-placed orders before retransmitting. Maintain local logs to reconcile.