Missing data on market feed websocket

Market feed data for tick by tick is missing volume from market feed websocket

Received feed: "NSE_INDEX|Nifty Bank" Feed { 
feed_union: Some(Ff(FullFeed { 
full_feed_union: Some(IndexFf(IndexFullFeed 
{ ltpc: Some(Ltpc { ltp: 48114.85, ltt: 1705391813000, ltq: 0, cp: 48158.3 }), 
market_ohlc: Some(MarketOhlc { ohlc: [Ohlc { interval: "1d", open: 48109.95, high: 48305.4, low: 48031.2, close: 48114.85, volume: 0, ts: 1705343400000 }, Ohlc { interval: "I1", open: 48107.3, high: 48116.65, low: 48091.5, close: 48114.35, volume: 0, ts: 1705391700000 }, Ohlc { interval: "I1", open: 48112.45, high: 48126.05, low: 48112.45, close: 48114.85, volume: 0, ts: 1705391760000 }, Ohlc { interval: "I30", open: 48206.75, high: 48216.65, low: 48091.5, close: 48122.85, volume: 0, ts: 1705389300000 }, Ohlc { interval: "I30", open: 48122.65, high: 48145.6, low: 48088.4, close: 48114.85, volume: 0, ts: 1705391100000 }] }),
last_close: 0.0, yh: 48636.45, yl: 38613.15 })) })) }

I’m using the protobuf’s provided https://assets.upstox.com/feed/market-data-feed/v1/MarketDataFeed.proto

the proto binary data gets decoded so i’m guessing that volume data is missing from the payload.

@Deep_Vora

For a clearer understanding of the data you’ll receive for an Index over the websocket, please check out the response structure detailed at https://upstox.com/developer/api-documentation/get-market-data-feed#message-structure.

Thanks!

1 Like

Hi @shanmu.
I was working with websocket market data feed.
I am using the python sdk to fetch real-time data
Few points I noted regarding data feed for subscribed instruments:
1.marketLevel.bidAskQuote.bno or Bid number of orders is not broadcasted for every symbol subscribed. Sometimes it shows and sometimes it does not.
2. same with marketLevel.bidAskQuote.ano Ask number of orders.
3. The Intraday candle data for Interval 1Hr or interval30m is broadcasted twice for a particular instrument.
kindly check on your end
I am attaching a copy of the data for your reference:
Instruments = [‘NSE_EQ|INE002A01018’, ‘NSE_EQ|INE040A01034’, ‘NSE_EQ|INE062A01020’, ‘NSE_EQ|INE238A01034’, ‘NSE_EQ|INE090A01021’, ‘NSE_EQ|INE154A01025’, ‘NSE_EQ|INE237A01028’, ‘NSE_EQ|INE918I01026’, ‘NSE_EQ|INE296A01024’, ‘NSE_EQ|INE467B01029’, ‘NSE_EQ|INE095A01012’, ‘NSE_EQ|INE030A01027’, ‘NSE_EQ|INE397D01024’]

‘NSE_EQ|INE062A01020’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 628.3, ‘ltt’: ‘1705657925900’, ‘ltq’: ‘5’, ‘cp’: 628.3}, ‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 327, ‘bp’: 628.25, ‘bno’: 11, ‘aq’: 19, ‘ap’: 628.3, ‘ano’: 1}, {‘bq’: 204, ‘bp’: 628.2, ‘bno’: 2, ‘aq’: 574, ‘ap’: 628.35, ‘ano’: 4}, {‘bq’: 2892, ‘bp’: 628.15, ‘bno’: 7, ‘aq’: 1499, ‘ap’: 628.4, ‘ano’: 6}, {‘bq’: 4558, ‘bp’: 628.1, ‘bno’: 14, ‘aq’: 1045, ‘ap’: 628.45, ‘ano’: 8}, {‘bq’: 682, ‘bp’: 628.05, ‘bno’: 9, ‘aq’: 3864, ‘ap’: 628.5, ‘ano’: 19}]}, ‘optionGreeks’: {}, ‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’, ‘open’: 633.0, ‘high’: 635.5, ‘low’: 624.7, ‘close’: 628.3, ‘volume’: 11267617, ‘ts’: ‘1705602600000’}, {‘interval’: ‘I1’, ‘open’: 628.5, ‘high’: 628.6, ‘low’: 628.1, ‘close’: 628.15, ‘volume’: 45370, ‘ts’: ‘1705657860000’}, {‘interval’: ‘I1’, ‘open’: 628.2, ‘high’: 628.35, ‘low’: 628.15, ‘close’: 628.3, ‘volume’: 3695, ‘ts’: ‘1705657920000’}, {‘interval’: ‘I30’, ‘open’: 627.45, ‘high’: 628.5, ‘low’: 626.25, ‘close’: 627.35, ‘volume’: 1269079, ‘ts’: ‘1705655700000’}, {‘interval’: ‘I30’, ‘open’: 627.35, ‘high’: 629.0, ‘low’: 627.05, ‘close’: 628.3, ‘volume’: 493488, ‘ts’: ‘1705657500000’}]}, ‘eFeedDetails’: {‘atp’: 629.5, ‘cp’: 628.3, ‘vtt’: ‘11267617’, ‘tbq’: 636668.0, ‘tsq’: 1580739.0, ‘lc’: 565.5, ‘uc’: 691.1, ‘yh’: 660.4, ‘yl’: 499.35, ‘fp’: 628.3, ‘fv’: 100}}}}, ‘NSE_EQ|INE237A01028’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 1762.7, ‘ltt’: ‘1705657925624’, ‘ltq’: ‘2’, ‘cp’: 1777.25}, ‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 1247, ‘bp’: 1762.65, ‘bno’: 18, ‘aq’: 7, ‘ap’: 1762.7, ‘ano’: 2}, {‘bq’: 763, ‘bp’: 1762.6, ‘bno’: 6, ‘aq’: 1082, ‘ap’: 1762.75, ‘ano’: 3}, {‘bq’: 935, ‘bp’: 1762.55, ‘bno’: 4, ‘aq’: 341, ‘ap’: 1762.8, ‘ano’: 8}, {‘bq’: 445, ‘bp’: 1762.5, ‘bno’: 6, ‘aq’: 3, ‘ap’: 1762.95, ‘ano’: 1}, {‘bq’: 1, ‘bp’: 1762.45, ‘bno’: 1, ‘aq’: 81, ‘ap’: 1763.15, ‘ano’: 1}]}, ‘optionGreeks’: {}, ‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’, ‘open’: 1787.05, ‘high’: 1799.95, ‘low’: 1754.15, ‘close’: 1762.7, ‘volume’: 4353017, ‘ts’: ‘1705602600000’}, {‘interval’: ‘I1’, ‘open’: 1762.75, ‘high’: 1762.8, ‘low’: 1762.55, ‘close’: 1762.65, ‘volume’: 12658, ‘ts’: ‘1705657860000’}, {‘interval’: ‘I1’, ‘open’: 1762.7, ‘high’: 1762.75, ‘low’: 1762.65, ‘close’: 1762.7, ‘volume’: 2348, ‘ts’: ‘1705657920000’}, {‘interval’: ‘I30’, ‘open’: 1768.4, ‘high’: 1771.45, ‘low’: 1763.0, ‘close’: 1765.1, ‘volume’: 577389, ‘ts’: ‘1705655700000’}, {‘interval’: ‘I30’, ‘open’: 1765.2, ‘high’: 1765.85, ‘low’: 1762.0, ‘close’: 1762.7, ‘volume’: 154700, ‘ts’: ‘1705657500000’}]}, ‘eFeedDetails’: {‘atp’: 1776.77, ‘cp’: 1777.25, ‘vtt’: ‘4353017’, ‘tbq’: 162935.0, ‘tsq’: 180724.0, ‘lc’: 1599.55, ‘uc’: 1954.95, ‘yh’: 2064.4, ‘yl’: 1643.5, ‘fp’: 1762.75, ‘fv’: 6}}}}}}
Time taken: 0.0002601146697998047
{‘type’: ‘live_feed’, ‘feeds’: {‘NSE_EQ|INE397D01024’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 1124.6, ‘ltt’: ‘1705657925985’, ‘ltq’: ‘48’, ‘cp’: 1087.05}, ‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 108, ‘bp’: 1124.6, ‘aq’: 436, ‘ap’: 1124.65}, {‘bq’: 720, ‘bp’: 1124.55, ‘aq’: 13, ‘ap’: 1124.7}, {‘bq’: 184, ‘bp’: 1124.5, ‘aq’: 478, ‘ap’: 1124.75}, {‘bq’: 3434, ‘bp’: 1124.45, ‘aq’: 82, ‘ap’: 1124.85}, {‘bq’: 4, ‘bp’: 1124.4, ‘aq’: 230, ‘ap’: 1124.9}]}, ‘optionGreeks’: {}, ‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’, ‘open’: 1091.0, ‘high’: 1136.35, ‘low’: 1089.8, ‘close’: 1124.6, ‘volume’: 11474253, ‘ts’: ‘1705602600000’}, {‘interval’: ‘I1’, ‘open’: 1125.2, ‘high’: 1125.2, ‘low’: 1124.3, ‘close’: 1124.55, ‘volume’: 81871, ‘ts’: ‘1705657860000’}, {‘interval’: ‘I1’, ‘open’: 1124.6, ‘high’: 1124.65, ‘low’: 1124.55, ‘close’: 1124.6, ‘volume’: 3617, ‘ts’: ‘1705657920000’}, {‘interval’: ‘I30’, ‘open’: 1125.4, ‘high’: 1126.15, ‘low’: 1123.85, ‘close’: 1125.05, ‘volume’: 872474, ‘ts’: ‘1705655700000’}, {‘interval’: ‘I30’, ‘open’: 1125.05, ‘high’: 1125.3, ‘low’: 1124.3, ‘close’: 1124.6, ‘volume’: 308716, ‘ts’: ‘1705657500000’}]}, ‘eFeedDetails’: {‘atp’: 1120.15, ‘cp’: 1087.05, ‘vtt’: ‘11474253’, ‘tbq’: 161461.0, ‘tsq’: 188708.0, ‘lc’: 978.35, ‘uc’: 1195.75, ‘yh’: 1136.35, ‘yl’: 735.8}}}}, ‘NSE_EQ|INE467B01029’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 3943.65, ‘ltt’: ‘1705657925827’, ‘ltq’: ‘10’, ‘cp’: 3902.6}, ‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 665, ‘bp’: 3943.65, ‘aq’: 45, ‘ap’: 3943.7}, {‘bq’: 14, ‘bp’: 3943.6, ‘aq’: 104, ‘ap’: 3943.75}, {‘bq’: 828, ‘bp’: 3943.55, ‘aq’: 100, ‘ap’: 3943.9}, {‘bq’: 710, ‘bp’: 3943.5, ‘aq’: 2, ‘ap’: 3943.95}, {‘bq’: 124, ‘bp’: 3943.45, ‘aq’: 43, ‘ap’: 3944.0}]}, ‘optionGreeks’: {}, ‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’, ‘open’: 3945.0, ‘high’: 3963.55, ‘low’: 3915.05, ‘close’: 3943.65, ‘volume’: 2823521, ‘ts’: ‘1705602600000’}, {‘interval’: ‘I1’, ‘open’: 3942.65, ‘high’: 3943.95, ‘low’: 3942.4, ‘close’: 3943.65, ‘volume’: 13521, ‘ts’: ‘1705657860000’}, {‘interval’: ‘I1’, ‘open’: 3943.75, ‘high’: 3943.75, ‘low’: 3943.55, ‘close’: 3943.65, ‘volume’: 679, ‘ts’: ‘1705657920000’}, {‘interval’: ‘I30’, ‘open’: 3941.95, ‘high’: 3945.4, ‘low’: 3931.45, ‘close’: 3942.55, ‘volume’: 343790, ‘ts’: ‘1705655700000’}, {‘interval’: ‘I30’, ‘open’: 3942.55, ‘high’: 3945.95, ‘low’: 3940.0, ‘close’: 3943.65, ‘volume’: 125709, ‘ts’: ‘1705657500000’}]}, ‘eFeedDetails’: {‘atp’: 3942.62, ‘cp’: 3902.6, ‘vtt’: ‘2823521’, ‘tbq’: 53878.0, ‘tsq’: 229080.0, ‘lc’: 3488.05, ‘uc’: 4263.15, ‘yh’: 3965.0, ‘yl’: 3070.25}}}}, ‘NSE_EQ|INE002A01018’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 2733.95, ‘ltt’: ‘1705657926511’, ‘ltq’: ‘250’, ‘cp’: 2735.9}, ‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 356, ‘bp’: 2733.9, ‘aq’: 1372, ‘ap’: 2733.95}, {‘bq’: 24, ‘bp’: 2733.85, ‘aq’: 701, ‘ap’: 2734.0}, {‘bq’: 1622, ‘bp’: 2733.8, ‘aq’: 328, ‘ap’: 2734.05}, {‘bq’: 2310, ‘bp’: 2733.75, ‘aq’: 35, ‘ap’: 2734.15}, {‘bq’: 77, ‘bp’: 2733.7, ‘aq’: 110, ‘ap’: 2734.7}]}, ‘optionGreeks’: {}, ‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’, ‘open’: 2752.0, ‘high’: 2752.0, ‘low’: 2718.0, ‘close’: 2733.95, ‘volume’: 4985691, ‘ts’: ‘1705602600000’}, {‘interval’: ‘I1’, ‘open’: 2734.95, ‘high’: 2734.95, ‘low’: 2733.75, ‘close’: 2733.85, ‘volume’: 28049, ‘ts’: ‘1705657860000’}, {‘interval’: ‘I1’, ‘open’: 2733.9, ‘high’: 2733.95, ‘low’: 2733.8, ‘close’: 2733.95, ‘volume’: 5066, ‘ts’: ‘1705657920000’}, {‘interval’: ‘I30’, ‘open’: 2737.55, ‘high’: 2739.95, ‘low’: 2732.15, ‘close’: 2734.45, ‘volume’: 687008, ‘ts’: ‘1705655700000’}, {‘interval’: ‘I30’, ‘open’: 2734.45, ‘high’: 2736.4, ‘low’: 2733.75, ‘close’: 2733.95, ‘volume’: 260498, ‘ts’: ‘1705657500000’}]}, ‘eFeedDetails’: {‘atp’: 2732.13, ‘cp’: 2735.9, ‘vtt’: ‘4985691’, ‘tbq’: 127982.0, ‘tsq’: 326785.0, ‘lc’: 2462.35, ‘uc’: 3009.45, ‘yh’: 2856.0, ‘yl’: 2180.0}}}}}}

@soum_91

Thank you for reaching out to us.

We will provide an update after reviewing your query.

Thanks!

1 Like

I create asp.net Console App and using

var apiInstance = new WebsocketApi();
WebsocketAuthRedirectResponse result = apiInstance.GetMarketDataFeedAuthorize(apiVersion);
string URL = result.Data.AuthorizedRedirectUri;

and after establishment websocket connection I send Message

{"guid":"someguid","method":"sub","data":{"mode":"full","instrumentKeys":["NSE_INDEX|Nifty Bank","NSE_INDEX|Nifty 50"]}}

then OnMessage event when receives I get Data in hex format

12-33-0A-14-4E-53-45-5F-49-4E-44-45-58-7C-4E-69-66-74-79-20-42-61-6E-6B-12-1B-0A-19-09-66-66-66-66-46-7D-E6-40-10-C0-A0-AE-B3-D2-31-21-CD-CC-CC-CC-A4-50-E6-40-18-9E-A1-D6-B7-D2-31

but I am not able Deserialize or not able to convert in hex format into json string

Coz it’s not supposed to be json, it’s protobuf.
Market Data Feed | Upstox Developer API read the whole 1st section

Hi @shanmu
Awaiting your update

@soum_91

@Pradeep_Jaiswar
I was talking about the post regarding missing bidTotal orders and askTotal orders in market feed. kindly go through my previous post tagged to @shanmu .

Thanks

@Pradeep_Jaiswar

This one

Hi @shanmu @Pradeep_Jaiswar
waiting for update on my previous post on EQ data . Also FO data feeds are missing data quite frequently (like volume data from 1hr, 30 mins OHLC, dhoi, dloi ,fp, fv).Some additional information which are not mentioned in the market data feed documentation at Market Data Feed | Upstox Developer API like in option Greeks there is ‘op’ and ‘up’. What do they stand for?
Attaching live FO data.

{‘type’: ‘live_feed’, ‘feeds’: {‘NSE_FO|72227’: {‘ff’: {‘marketFF’: {‘ltpc’: {‘ltp’: 970.0, ‘ltt’: ‘1706687466028’, ‘ltq’: ‘15’, ‘cp’: 710.65}, ‘marketLevel’: {‘bidAskQuote’: [{‘bq’: 120, ‘bp’: 969.0, ‘aq’: 240, ‘ap’: 972.2}, {‘bq’: 30, ‘bp’: 968.65, ‘aq’: 270, ‘ap’: 972.25}, {‘bq’: 180, ‘bp’: 968.6, ‘aq’: 255, ‘ap’: 972.4}, {‘bq’: 30, ‘bp’: 968.5, ‘aq’: 30, ‘ap’: 972.5}, {‘bq’: 300, ‘bp’: 968.4, ‘aq’: 90, ‘ap’: 972.75}]}, ‘optionGreeks’: {‘op’: 974.65, ‘up’: 46269.45, ‘iv’: 0.18040292190256932, ‘delta’: 0.5217932157732432, ‘theta’: -16.138280398244543, ‘gamma’: 0.00016908469878630257, ‘vega’: 52.04520278562927, ‘rho’: 18.464640526057245}, ‘marketOHLC’: {‘ohlc’: [{‘interval’: ‘1d’, ‘open’: 622.95, ‘high’: 1083.65, ‘low’: 612.6, ‘close’: 970.0, ‘volume’: 149670, ‘ts’: ‘1706639400000’}, {‘interval’: ‘I1’, ‘open’: 974.6, ‘high’: 974.65, ‘low’: 974.6, ‘close’: 974.65, ‘volume’: 105, ‘ts’: ‘1706687400000’}, {‘interval’: ‘I1’, ‘open’: 974.6, ‘high’: 974.6, ‘low’: 970.0, ‘close’: 970.0, ‘volume’: 30, ‘ts’: ‘1706687460000’}, {‘interval’: ‘I30’, ‘open’: 918.15, ‘high’: 979.0, ‘low’: 902.0, ‘close’: 973.3, ‘volume’: 9375, ‘ts’: ‘1706685300000’}, {‘interval’: ‘I30’, ‘open’: 973.7, ‘high’: 984.8, ‘low’: 965.0, ‘close’: 970.0, ‘volume’: 1755, ‘ts’: ‘1706687100000’}]}, ‘eFeedDetails’: {‘atp’: 945.07, ‘cp’: 710.65, ‘vtt’: ‘149670’, ‘oi’: 54585.0, ‘tbq’: 17160.0, ‘tsq’: 19065.0, ‘lc’: 0.05, ‘uc’: 1671.25, ‘poi’: 34620.0}}}}

I am having similar issue. I am using node express for connecting upstox market feed data api through websockets, but the issue is that websockets is connected successfully but api is not returning any data.I have connected during the market is open but then also please help me out to solve this issue.

Code link: GitHub - hetpatel4902/upstox