Huge delay in websocket feed

Today, I observed a huge delay of upto 30 minutes in the websocket live feed in I1(1 minute candles). The delay started at around 09:30 hours today. Initially, i felt like some coding bug, but at 09:56 when i was still getting 09:28 minute candles in the feed, I stopped the script for debugging later.

I just checked the logs now and am sure that there was a delay or stale data in the websockets feed. I am pasting a sample feed received from the logs:

Note: The issue was resolved from 09:56 :25.

2024-05-17 09:56:20.834 | 141 DEBUG:
{‘type’: ‘live_feed’,
‘feeds’: {‘NSE_INDEX|Nifty Bank’: {‘ff’: {‘indexFF’: {‘ltpc’: {‘ltp’: 47859.95,
‘ltt’: ‘1715918378000’,
‘cp’: 47977.05},
‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’,
‘open’: 47842.95,
‘high’: 47981.6,
‘low’: 47799.55,
‘close’: 47859.95,
‘ts’: ‘1715884200000’},
{‘interval’: ‘I1’,
‘open’: 47833.5,
‘high’: 47834.3,
‘low’: 47803.5,
‘close’: 47821.45,
‘ts’: ‘1715918280000’},
{‘interval’: ‘I1’,
‘open’: 47824.85,
‘high’: 47865.95,
‘low’: 47813.8,
‘close’: 47859.95,
‘ts’: ‘1715918340000’},
{‘interval’: ‘I30’,
‘open’: 47842.95,
‘high’: 47981.6,
‘low’: 47799.55,
‘close’: 47859.95,
‘ts’: ‘1715917500000’}]},
‘yh’: 49974.75,
‘yl’: 42105.4}}},
‘NSE_FO|38765’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 201.9,
‘ltt’: ‘1715918378939’,
‘ltq’: ‘150’,
‘cp’: 189.1},
‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 25,
‘bp’: 201.05,
‘aq’: 425,
‘ap’: 201.35},
{‘bq’: 800, ‘bp’: 200.85, ‘aq’: 675, ‘ap’: 201.4},
{‘bq’: 1525, ‘bp’: 200.8, ‘aq’: 1200, ‘ap’: 201.45},
{‘bq’: 900, ‘bp’: 200.75, ‘aq’: 1225, ‘ap’: 201.5},
{‘bq’: 1675, ‘bp’: 200.7, ‘aq’: 575, ‘ap’: 201.55}]},
‘optionGreeks’: {‘op’: 200.9,
‘up’: 22412.471067235794,
‘iv’: 0.13063358834675184,
‘delta’: -0.5867512600913543,
‘theta’: -11.939352685697418,
‘gamma’: 0.0010167506166928195,
‘vega’: 11.424924039980267,
‘rho’: -2.2862980012224634},
‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’,
‘open’: 181.95,
‘high’: 216.95,
‘low’: 170.0,
‘close’: 201.9,
‘volume’: 2209375,
‘ts’: ‘1715884200000’},
{‘interval’: ‘I1’,
‘open’: 212.0,
‘high’: 216.95,
‘low’: 211.4,
‘close’: 213.0,
‘volume’: 111925,
‘ts’: ‘1715918280000’},
{‘interval’: ‘I1’,
‘open’: 212.0,
‘high’: 213.45,
‘low’: 199.2,
‘close’: 201.9,
‘volume’: 109000,
‘ts’: ‘1715918340000’},
{‘interval’: ‘I30’,
‘open’: 171.0,
‘high’: 216.95,
‘low’: 171.0,
‘close’: 201.9,
‘volume’: 2207975,
‘ts’: ‘1715917500000’}]},
‘eFeedDetails’: {‘atp’: 207.98,
‘cp’: 189.1,
‘vtt’: ‘2209575’,
‘oi’: 1516075.0,
‘tbq’: 222525.0,
‘tsq’: 149200.0,
‘lc’: 0.05,
‘uc’: 467.55,
‘poi’: 1254650.0}}}},
‘NSE_FO|53697’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 118.75,
‘ltt’: ‘1715918378959’,
‘ltq’: ‘40’,
‘cp’: 103.15},
‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 120,
‘bp’: 118.95,
‘aq’: 200,
‘ap’: 119.35},
{‘bq’: 80, ‘bp’: 118.9, ‘aq’: 320, ‘ap’: 119.4},
{‘bq’: 360, ‘bp’: 118.85, ‘aq’: 440, ‘ap’: 119.45},
{‘bq’: 200, ‘bp’: 118.8, ‘aq’: 440, ‘ap’: 119.5},
{‘bq’: 120, ‘bp’: 118.75, ‘aq’: 360, ‘ap’: 119.55}]},
‘optionGreeks’: {‘op’: 118.05,
‘up’: 21386.302581407122,
‘iv’: 0.12056965451348642,
‘delta’: -0.5169096526439476,
‘theta’: -13.050110602074797,
‘gamma’: 0.0014328133041360445,
‘vega’: 9.200695685322932,
‘rho’: -1.3010232682702318},
‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’,
‘open’: 107.0,
‘high’: 137.15,
‘low’: 104.15,
‘close’: 118.75,
‘volume’: 1520680,
‘ts’: ‘1715884200000’},
{‘interval’: ‘I1’,
‘open’: 127.45,
‘high’: 133.2,
‘low’: 126.7,
‘close’: 129.25,
‘volume’: 68480,
‘ts’: ‘1715918280000’},
{‘interval’: ‘I1’,
‘open’: 129.05,
‘high’: 129.85,
‘low’: 117.0,
‘close’: 118.75,
‘volume’: 79640,
‘ts’: ‘1715918340000’},
{‘interval’: ‘I30’,
‘open’: 107.0,
‘high’: 137.15,
‘low’: 104.15,
‘close’: 118.75,
‘volume’: 1520520,
‘ts’: ‘1715917500000’}]},
‘eFeedDetails’: {‘atp’: 126.63,
‘cp’: 103.15,
‘vtt’: ‘1520720’,
‘oi’: 515240.0,
‘tbq’: 86880.0,
‘tsq’: 107000.0,
‘lc’: 0.05,
‘uc’: 377.0,
‘poi’: 264120.0}}}},
‘NSE_FO|53686’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 235.25,
‘ltt’: ‘1715918378603’,
‘ltq’: ‘40’,
‘cp’: 267.3},
‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 40,
‘bp’: 234.65,
‘aq’: 480,
‘ap’: 235.55},
{‘bq’: 360, ‘bp’: 234.6, ‘aq’: 120, ‘ap’: 235.6},
{‘bq’: 80, ‘bp’: 234.55, ‘aq’: 200, ‘ap’: 235.7},
{‘bq’: 200, ‘bp’: 234.5, ‘aq’: 240, ‘ap’: 235.75},
{‘bq’: 40, ‘bp’: 234.45, ‘aq’: 1160, ‘ap’: 235.8}]},
‘optionGreeks’: {‘op’: 235.6,
‘up’: 21386.302581407122,
‘iv’: 0.13107998048359512,
‘delta’: 0.7341558836600779,
‘theta’: -11.67649918754798,
‘gamma’: 0.0010846543523808873,
‘vega’: 7.572177330374488,
‘rho’: 1.8008577700227202},
‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’,
‘open’: 267.3,
‘high’: 267.3,
‘low’: 215.3,
‘close’: 235.25,
‘volume’: 90080,
‘ts’: ‘1715884200000’},
{‘interval’: ‘I1’,
‘open’: 224.9,
‘high’: 225.8,
‘low’: 220.0,
‘close’: 225.45,
‘volume’: 2360,
‘ts’: ‘1715918280000’},
{‘interval’: ‘I1’,
‘open’: 224.2,
‘high’: 238.0,
‘low’: 224.2,
‘close’: 235.25,
‘volume’: 2440,
‘ts’: ‘1715918340000’},
{‘interval’: ‘I30’,
‘open’: 267.3,
‘high’: 267.3,
‘low’: 215.3,
‘close’: 235.25,
‘volume’: 90040,
‘ts’: ‘1715917500000’}]},
‘eFeedDetails’: {‘atp’: 231.92,
‘cp’: 267.3,
‘vtt’: ‘90080’,
‘oi’: 346240.0,
‘tbq’: 39440.0,
‘tsq’: 40000.0,
‘lc’: 0.05,
‘uc’: 686.75,
‘poi’: 348080.0}}}},
‘NSE_INDEX|Nifty Fin Service’: {‘ff’: {‘indexFF’: {‘ltpc’: {‘ltp’: 21363.5,
‘ltt’: ‘1715918378000’,
‘cp’: 21416.1},
‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’,
‘open’: 21354.45,
‘high’: 21405.05,
‘low’: 21333.5,
‘close’: 21363.5,
‘ts’: ‘1715884200000’},
{‘interval’: ‘I1’,
‘open’: 21350.5,
‘high’: 21351.25,
‘low’: 21338.25,
‘close’: 21348.2,
‘ts’: ‘1715918280000’},
{‘interval’: ‘I1’,
‘open’: 21349.8,
‘high’: 21366.9,
‘low’: 21346.0,
‘close’: 21363.5,
‘ts’: ‘1715918340000’},
{‘interval’: ‘I30’,
‘open’: 21354.45,
‘high’: 21405.05,
‘low’: 21333.5,
‘close’: 21363.5,
‘ts’: ‘1715917500000’}]},
‘yh’: 22136.6,
‘yl’: 18870.15}}}}}

Apologies for the late reply. Are you still experiencing the issue?

If you are not already using the SDK to integrate the websocket feed, You might want to try our Python SDK available at GitHub - upstox/upstox-python: Official Python SDK for accessing Upstox API. The same SDK is available in other languages at Upstox · GitHub