Clarification needed in getting the latest price of a stock

Iam trying to get the symbol latest price data using general websocket . But Iam not getting any price updates apart from Ping message.

Iam sending the list of symbols just like in the sample python scipt, but not getting the response(price changes for the symbols which are sent).

Can anyone share the proper payload for this websocket?

Hey @111788225305651162329

We need more information to check this , can you let us know the input given .

Hi @WWhYB2qrsx ,

We are using java springboot framework for our backend. And we are using javax.websocket.Session for this.

And we are sending the input like this -

session.getBasicRemote().sendText("{\"symbol\": \"[\"NSE:NIFTY50-INDEX\"]\", \"data_type\":  \"symbolData\"}");

And we also tried sending the input like

session.getBasicRemote().sendText("{[\"NSE:NIFTY50-INDEX\"]");

But both of these are not working and we are not getting the price change for NSE:NIFTY50-INDEX.

And we are connecting to this url -

URI serverUri = new URI("wss://socket.fyers.in/trade/v3");

On a separate note, we are able to establish the order status websocket and we are getting the order status change update.

we are sending the text as “{"T": "SUB_ORD", "SLIST": ["orders"], "SUB_T": 1}”;

session.getBasicRemote().sendText("{\"T\": \"SUB_ORD\", \"SLIST\":  [\"orders\"], \"SUB_T\": 1}");

@WWhYB2qrsx any input??

Hi Abhishek, can you please respond to the above query? Thanks

Hey @111788225305651162329

Please refer to the docs for the inputs to be given :

https://myapi.fyers.in/docsv3