Hello SmartAPI Team,
I am using the SmartWebSocketV2 to build 1-minute OHLCV candles. I am facing an issue regarding the accuracy of per-tick volume across different exchanges.
The Issue:
To calculate the volume for a specific candle, I am tracking the volume_traded_today field. My logic subtracts the cumulative volume of the previous tick from the current tick to derive the "Per-Tick Volume."
MCX: This logic works perfectly. The incremental volume is accurate.
NSE/BSE: The calculation becomes highly inaccurate. The delta between ticks often results in anomalies or does not align with the actual trade quantity executed in that timeframe.
Questions:
Is volume_traded_today the recommended field for deriving interval volume on high-frequency exchanges like NSE, or is there a known lag in cumulative volume updates?
Should I be using last_traded_quantity (LTQ) to sum up the volume for my candle instead?
Does the WebSocket V2 feed for NSE/BSE provide a direct "Tick Volume" field that I might be overlooking to avoid manual cumulative subtraction?
Environment:
Language: Python
Library: SmartApi
Feed Method: WebSocket V2 (LTP, Quote, or Snap quote mode)
Any guidance on the most reliable way to capture accurate per-tick/per-candle volume for NSE/BSE would be greatly appreciated.
Thank you.