Market Data Feeder V3 not working today

Is there any issue in Market Data Feeder V3. Today getting error in websocket

1 Like

Hi @dhruvgangani1,

Welcome to the Upstox Community!

Let me check this and get back to you, thanks.

@Ushnota Below is my code.

async function initProtobuf() {
// protobufRoot = await protobuf.load(__dirname + ā€œ/MarketDataFeed.protoā€);
protobufRoot = await protobuf.load(__dirname + ā€œ/MarketDataFeedV3.protoā€);
console.log(ā€œProtobuf part initialization completeā€);
}

function decodeProfobuf(buffer) {
if (protobufRoot == null) {
console.warn(ā€œProtobuf part not initialized yet!ā€);
return null;
}

// const FeedResponse = protobufRoot.lookupType(ā€œcom.upstox.marketdatafeeder.rpc.proto.FeedResponseā€);
const FeedResponse = protobufRoot.lookupType(ā€œcom.upstox.marketdatafeederv3udapi.rpc.proto.FeedResponseā€);

return FeedResponse.decode(buffer);
}

ws.on(ā€œmessageā€, (data) => {
this.isWebMessageReceived = true;
if (data) {
console.log(data);
const jsonData = decodeProfobuf(data);
// if (jsonData) {
// this.processData(jsonData);
// }
}
});

V2 working fine but in V3 when decodingData in websocket message getting below error.

throw indexOutOfRange(this, length);
^

RangeError: index out of range: 62 + 4 > 62
at indexOutOfRange (E:\NodeJS\AutoTradeNode\node_modules\protobufjs\src\reader.js:13:12)
at BufferReader.skip (E:\NodeJS\AutoTradeNode\node_modules\protobufjs\src\reader.js:343:19)
at Reader.skipType (E:\NodeJS\AutoTradeNode\node_modules\protobufjs\src\reader.js:377:18)
at Type.FeedResponse$decode [as decode] (eval at Codegen (E:\NodeJS\AutoTradeNode\node_modules@protobufjs\codegen\index.js:50:33), :44:5)
at decodeProfobuf (E:\NodeJS\AutoTradeNode\functions\strategyOne.js:182:23)
at WebSocket. (E:\NodeJS\AutoTradeNode\functions\strategyOne.js:239:28)
at WebSocket.emit (node:events:520:28)
at Receiver.receiverOnMessage (E:\NodeJS\AutoTradeNode\node_modules\ws\lib\websocket.js:1220:20)
at Receiver.emit (node:events:520:28)
at Receiver.dataMessage (E:\NodeJS\AutoTradeNode\node_modules\ws\lib\receiver.js:569:14)
at E:\NodeJS\AutoTradeNode\node_modules\ws\lib\receiver.js:530:12
at E:\NodeJS\AutoTradeNode\node_modules\ws\lib\permessage-deflate.js:309:9
at E:\NodeJS\AutoTradeNode\node_modules\ws\lib\permessage-deflate.js:392:7
at afterWrite (node:internal/streams/writable:701:5)
at onwrite (node:internal/streams/writable:679:7)
at Zlib.cb (node:internal/streams/transform:191:7)

@Ushnota @MohitGolecha There is around 3-5 minutes delay in ws feed after subscribing to the instruments. Can you please check it?

Hi @adhil_a_backer,

We are checking this. Will get back to you in a bit, thanks.

Yes, it is not working for me either. It used to work flawlessly since I started using the Upstox API a few days ago, up until 11 AM today, when it went haywire. I’ve been banging my head against the wall trying to fix it ever since. Right now, I’m either getting no data or very few data points. Could you please check if there are any issues on your end? If not, I’ll try to fix it from my side and appreciate your help with troubleshooting.

I find only this error and then it reconnected
2025-02-10 11:06:06 ERROR Status Code:1006 reason:

Yes, for me as well. But after reconnecting there was no data.

Hello @Abhishek_Panigrahi,

Welcome to the Upstox Community!

We are checking this and will get back to you soon. Thanks.

1 Like

@dhruvgangani1, @adhil_a_backer, and @Abhishek_Panigrahi – We had a cache-related issue around 11 AM, which has now been resolved. Thanks for your understanding.

2 Likes

@shanmu, I used to get approx. 16-17k ticks a minute currently getting 3-4k ticks.

Hello guys,

Please change MarketDataFeedV3.proto file. Yesterday it was changed. After updating it the latest it is working fine. Link shared below.

1 Like

I’ve updated it, still faced issue at the morning. And currently the frequency of data was very low.
After 11:30, I got a descent amount of data.
Last week, I used to get 16-17k tick a minute
From the morning till 11:30 - There was no data or 2-3k
Currently - I’m getting 11-13k ticks.

Is the frequency of data streaming reduced ? @shanmu

@Abhishek_Panigrahi

No, there’s no change in the planned frequency. However, we did encounter an issue with the sockets, which the team is working on. A fix is expected later today. I’ll drop a note here once it’s patched.

Thanks!

1 Like

@Abhishek_Panigrahi - The patch is deployed. Let us know if you still encounter the issue. Thanks!

2 Likes

Today (19/02/25) same issue, the messages not received in websocket. Websocket disconneted. @shanmu @Ushnota please let us know when your websocket will run smoothly. Because It involves real money and because of system error we could not take risk of technical error.

1 Like