Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Error while subscribing for live data feed in websocket in javascript

    Bugs
    0
    1
    27
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      prashant0701_ last edited by

      Hi @admin and everyone,
      I am trying to subscribe to a token using webscoket V2 in javascript. After making a websocket connection I am running following code inside fetchData function:

      let req = '{"correlationID":"' + "abcde12345" + '","action":"'+ 1 + '","params":"' + '{"mode":"'+ 1 + '","tokenList":"' + '[{"exchangeType":"' + 1 + '","tokens":"' + '["3045"]'+'"}]}}';

      ws.send(req);

      I am getting following error:
      Error while processing message

      Is there anything wrong in the request string?
      Please help.

      Thanks and regards,
      Prashant

      1 Reply Last reply Reply Quote 1
      • First post
        Last post