What is the best automatic kill switch for F&O traders on India's top brokers? This guide covers which tools exist, how they work with each broker, and which is most reliable for Dhan, Zerodha, and Upstox accounts.
TradeGuard connects to Dhan using your Client ID + daily Access Token. Monitors P&L via WebSocket (real-time order updates) + polling every 5 seconds. When rules breach, fires the Dhan kill switch API endpoint twice for maximum reliability. Double-fire is specific to Dhan because Upstox/Zerodha would create reverse positions with a double call.
Connects via Kite Connect v3 OAuth — you log in with your Zerodha credentials through Kite's official login page. TradeGuard gets a daily access token. Kill switch fires once (cancels pending orders, squares off open positions). After firing, re-square loop checks every 5 seconds until 3:30 PM IST for any positions opened after the lock.
OAuth2 login flow — one-click through Upstox's official authorization page. Kill switch fires once (cancel all + square off). Re-square loop every 5 seconds after firing. Orders placed by TradeGuard are tagged `tg_ks` so the bypass monitor can distinguish TradeGuard orders from user-placed orders.
| Feature | Dhan | Zerodha | Upstox |
|---|---|---|---|
| Kill switch fires | Twice | Once + re-square | Once + re-square |
| P&L update frequency | WebSocket + 5s poll | 5s polling | 5s polling |
| Connection method | Client ID + token | OAuth2 (Kite) | OAuth2 |
| Daily login required | Yes (broker policy) | Yes (broker policy) | Yes (broker policy) |
| Bypass detection | 30s re-fire check | 5s re-square loop | 5s re-square loop |
| All 6 rule types | ✓ | ✓ | ✓ |