Per second websocket data

Hi,
do we get per second data through the websockets. I checked it out and found that we are getting data on 1 minute interval.
How can we obtain details on a per second basis

You can generate it from LTP. As all the LTP are being received with timestamp in milliseconds. You can create OHLC for any timeframe from that.

This could possibly be a wrong approach as each second has its own OHLCV details. If you’re creating from the LTP then you’d be ignoring other values.

we generally obtain a feed like this from websocket:
{‘type’: ‘live_feed’, ‘feeds’: {‘NSE_FO|51244’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 409.1, ‘ltt’: ‘1739181484994’, ‘ltq’: ‘75’, ‘cp’: 292.2}, ‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 150, ‘bp’: 408.95, ‘aq’: 75, ‘ap’: 409.15, ‘bidQ’: ‘150’, ‘askQ’: ‘75’}, {‘bq’: 75, ‘bp’: 408.9, ‘aq’: 150, ‘ap’: 409.2, ‘bidQ’: ‘75’, ‘askQ’: ‘150’}, {‘bq’: 75, ‘bp’: 408.85, ‘aq’: 75, ‘ap’: 409.75, ‘bidQ’: ‘75’, ‘askQ’: ‘75’}, {‘bq’: 75, ‘bp’: 408.8, ‘aq’: 225, ‘ap’: 409.85, ‘bidQ’: ‘75’, ‘askQ’: ‘225’}, {‘bq’: 225, ‘bp’: 408.65, ‘aq’: 375, ‘ap’: 409.95, ‘bidQ’: ‘225’, ‘askQ’: ‘375’}]}, ‘optionGreeks’: {‘op’: 409.1, ‘up’: 23394.966431470963, ‘iv’: 0.10986328125, ‘delta’: -0.9571, ‘theta’: -3.5413, ‘gamma’: 0.0004, ‘vega’: 1.9349, ‘rho’: -1.8748}, ‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’, ‘open’: 307.65, ‘high’: 476.75, ‘low’: 304.0, ‘close’: 409.1, ‘volume’: 2665125, ‘ts’: ‘1739125800000’, ‘vol’: ‘2665125’}, {‘interval’: ‘I1’, ‘open’: 409.8, ‘high’: 409.8, ‘low’: 407.65, ‘close’: 408.7, ‘volume’: 3450, ‘ts’: ‘1739181420000’, ‘vol’: ‘3450’}, {‘interval’: ‘I1’, ‘open’: 408.95, ‘high’: 409.1, ‘low’: 408.95, ‘close’: 409.1, ‘volume’: 825, ‘ts’: ‘1739181480000’, ‘vol’: ‘825’}, {‘interval’: ‘I30’, ‘open’: 416.2, ‘high’: 425.15, ‘low’: 389.2, ‘close’: 411.35, ‘volume’: 180975, ‘ts’: ‘1739178900000’, ‘vol’: ‘180975’}, {‘interval’: ‘I30’, ‘open’: 411.3, ‘high’: 414.0, ‘low’: 404.0, ‘close’: 409.1, ‘volume’: 72675, ‘ts’: ‘1739180700000’, ‘vol’: ‘72675’}]}, ‘eFeedDetails’: {‘atp’: 406.7, ‘cp’: 292.2, ‘vtt’: ‘2665125’, ‘oi’: 726075.0, ‘tbq’: 188400.0, ‘tsq’: 36825.0, ‘lc’: 0.05, ‘uc’: 998.9, ‘poi’: 910500.0}}}}}, ‘currentTs’: ‘1739181486193’}

There are two ‘1’ minute interval data, one for current and the other for the previous minute. Having a second interval information would have been beneficial.

Bro Upstox team has already informed that in V3 they will only have one day and previous 1minute ohlc data. they can not add more. But I was suggesting that from collection of LTPs we can create OHLC by our own. and I have noted that It is almost accurate unless we face any disconnection. In V3 they will include only previous 1minute data so make your changes accordingly. My strategy is working perfectly with previous minute OHLC data.

Thanks for sharing your experience. Since, officially Upstox is not adding per second granularity, I guess we’ll have to contend with this information and work with what we have. Thanks again