Pending Tasks after Login,Profile generation

Hello i have created profile, login,access-token everything is working good , after doing this i want to know what task is needed to be done further .
i want to create live market data feed guide me how to do it

To access real-time market data, refer to the Upstox API documentation at Upstox API Documentation for Market Data Feed.

For examples of WebSocket implementations, visit Upstox API Sample Implementation.

is there need of websocket .
how to download it and what required steps are need to do .
i have started doing market feed but how to start it i am getting confused

@vinod_mokashi

To get real-time market updates, please utilize the Market Data Feed websocket API. You can find comprehensive instructions and sample implementation code at this link: Sample Implementation | Upstox Developer API.

Choose the sample implementation that suits your preferred programming language, and then integrate it into your application accordingly.

Thank you!

should i install websocket .
then do further tasks or else is need .
like just post method

i followed above instructions , but i am confused on which example to use - Node.js or Reac.js .
my project has both programming .
guide me which one to use react or node

The type of application you’re developing greatly influences your approach. As we’ve suggested several times before, assisting with the specific needs of your application is beyond our scope, and it would be best to seek guidance from a consultant or subject matter expert in that area.

Nonetheless, we’re fully committed to assisting with any issues related to the Upstox API. Thank you for your understanding.

Thank you for your suggestions , and i know the scope of application while When i have a good guidance from upstox i dont need other guidance .
Moving forward : i have connected the Market feed but i am getting this response will you check it , according to website the response is not matching .
here is resonse

“{"feeds":{"NSE_EQ|INE669E01016":{"ff":{"marketFF":{"ltpc":{"ltp":16.5,"ltt":"1705314589321","ltq":"2","cp":15.85},"marketLevel":{"bidAskQuote":[{"bq":293938,"bp":16.5,"bno":36},{},{},{},{}]},"optionGreeks":{},"marketOHLC":{"ohlc":[{"interval":"1d","open":15.9,"high":16.7,"low":15.8,"close":16.5,"volume":213367109,"ts":"1705257000000"},{"interval":"I1","open":16.4,"high":16.45,"low":16.4,"close":16.45,"volume":851459,"ts":"1705312680000"},{"interval":"I1","open":16.4,"high":16.45,"low":16.4,"close":16.45,"volume":1530451,"ts":"1705312740000"},{"interval":"I30","open":16.1,"high":16.7,"low":16.05,"close":16.5,"volume":75510004,"ts":"1705310100000"},{"interval":"I30","open":16.45,"high":16.5,"low":16.4,"close":16.45,"volume":18343812,"ts":"1705311900000"}]},"eFeedDetails":{"atp":16.17,"cp":15.85,"vtt":"213367109","tbq":293938,"lc":14.3,"uc":17.4,"yh":18.4,"yl":5.7,"fp":16.5,"fv":2}}}}}}”
@shanmu

its working now. Thank you for your Response

Hello ,
i want to access multiple live feed data like this way -
instrumentKeys: [
“NSE_FO|BHARTIARTL”,
“NSE_INDEX|Nifty 50”,
“NSE_INDEX|Nifty Bank”,
“NSE_INDEX|FinNifty”,
],
but unfortunately one anyone is worked and giving response .
how should i access multiple response.
i have read documents but not much info provided

at backend the data is working but received an error at frontend side and status not connected .market feed.

@vinod_mokashi

When subscribing to several instrument keys, the socket object will appear in this format:

{
  "feeds": {
    "NSE_FO|BHARTIARTL": { },
    "NSE_INDEX|Nifty 50": { },
    ....
  }
}

Your application will need to be configured to navigate through each child object in order to extract the data.

Thanks!

i am unale to subscribe multiple instrument keys , thank you for your response but i am getting only any one .
useEffect(() => {
const connectWebSocket = async (token) => {
try {
const wsUrl = await getUrl(token);
const ws = new WebSocket(wsUrl);

    ws.onopen = () => {
      setIsConnected(true);
      console.log("Connected");
      const data = {
        guid: "someguid",
        method: "sub",
        data: {
          mode: "full",
          instrumentKeys: [
            // "NSE_FO|BHARTIARTL",
            "NSE_INDEX|Nifty 50",
            // "NSE_INDEX|Nifty Bank",
            // "NSE_INDEX|FinNifty",
          ],
        },
      };
      ws.send(Buffer.from(JSON.stringify(data)));
    };

    ws.onclose = () => {
      setIsConnected(false);
      console.log("Disconnected");
    };

    ws.onmessage = async (event) => {
      const arrayBuffer = await blobToArrayBuffer(event.data);
      let buffer = Buffer.from(arrayBuffer);
      let response = decodeProfobuf(buffer);
      setFeedData((currentData) => [
        ...currentData,
        JSON.stringify(response),
      ]);
    };

    ws.onerror = (error) => {
      setIsConnected(false);
      console.log("WebSocket error:", error);
    };

    return () => ws.close();
  } catch (error) {
    console.error("WebSocket connection error:", error);
  }
};

initProtobuf();
connectWebSocket(token);

}, [token]);
this is code

i have downloaded nse.csv file will you tell me how to apply . please explain me

@shanmu @Pradeep_Jaiswar - waiting

@vinod_mokashi

It seems there might be a typo in your code. I noticed that you have subscribed to only one instrument_key while the others appear to be commented out. Could you please review your code and attempt again?

Thank you!

   instrumentKeys: [
                "NSE_FO|BHARTIARTL",
                "NSE_INDEX|Nifty 50",
                "NSE_INDEX|Nifty Bank",
                "NSE_INDEX|FinNifty",
                "NSE_INDEX|Nifty Energy",
              ],

the values are been displayed but i want the entire trading symbol from nse.csv file.
plase tell me how should i do it

@Pradeep_Jaiswar @shanmu .
what happened ? i am waiting

@vinod_mokashi

To set up a socket connection for the instrument keys listed in the CSV file, you’ll need to create a logic within your application that can process the file and establish the necessary socket connections. This falls under client application development, so I suggest looking for guidance on relevant forums or seeking advice from an expert in this area.

However, if you require assistance with the Upstox API, feel free to reach out to us for support.

Thank you!

thank you for suggesstions , i have done and its working using package papaparse.