Building a Production ML Trading Dashboard with the Dhan API A developer detailed the integration of machine learning models with live broker data via the Dhan API for a production trading dashboard, focusing on NIFTY options. The system uses XGBoost on 15-minute bars and emphasizes separating inference from execution, with paper trading first. The developer reported 60.5% top-decile accuracy but unprofitable fixed stop-loss backtests, highlighting the importance of honest research status. Real integration notes for wiring NIFTY ML models to live broker data via Dhan. Research/ paper-trading context — not a live-trading recommendation. Dhan's API exposes direct option-chain access — exactly what an options-ML system needs: POST /optionchain — full chain for an underlying POST /optionchain/expirylist — available expiries security id , last price , volume , oi , previous oi , implied volatility , top bid price , top ask price , and greeks delta/theta/gamma/vega Security IDs are stable: NIFTY = 13 IDX I , BANKNIFTY = 10001 IDX I . A research dashboard pulls live chain + underlying, runs the trained XGBoost model on each new 15-minute bar, and displays: Keep the inference path separate from the execution path . The dashboard shows; a permissioned, human-approved module places orders. The DhanLiveTrader pattern: load the model, predict on each new bar, place long orders with configurable SL/TP default 1.0 ATR SL, 2.0 ATR TP , and run in paper mode first . Only after stable out-of-sample + paper evidence should any execution module even be considered. { "client id": "YOUR DHAN CLIENT ID", "access token": "YOUR DHAN ACCESS TOKEN", "is paper trade": true, "nifty symbol": "NIFTY", "quantity": 50, "max trades per day": 3, "sl atr mult": 1.0, "tp atr mult": 2.0 } A known footgun: using a Stop-Loss Limit SL-L order with price = sl − 0.05 means it won't fill if price crashes through the stop. Prefer SL-Market for the protective stop. Execution quality is its own research topic — don't bolt it on at the end. The ML side of this stack showed real directional skill 60.5% top-decile accuracy but the fixed-SL backtest was still unprofitable PF 0.53 . A dashboard that displays an honest "RESEARCH / PAPER" status is worth more than one that hides the gap. Research only. Not investment advice. SEBI/compliance is a separate, required topic before live trading.