Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. goutamjaiswal
    G
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    goutamjaiswal

    @goutamjaiswal

    0
    Reputation
    1
    Posts
    2
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    goutamjaiswal Follow

    Best posts made by goutamjaiswal

    This user hasn't posted anything yet.

    Latest posts made by goutamjaiswal

    • Websocket not working in Node JS

      Hi,
      Facing issue in websocket. here is my code.
      Output : Connected To websocket but not receiving any data.

      Also logged in Successfully and generated Token as well.

      let web_socket = new WebSocketClient({
      clientcode: CLIENT_CODE,
      jwttoken: JWT_TOKEN,
      apikey: API_KEY,
      feedtype: "order_feed",
      script:"nse_cm|11536"
      });

      web_socket.connect()
          .then(() => {
              var ACTION_TYPE = "subscribe";
              var FEED_TYPE = "order_feed";
              console.log("Connected to Web Socket");
              web_socket.fetchData(ACTION_TYPE,FEED_TYPE);  // ACTION_TYPE: subscribe | unsubscribe FEED_TYPE: order_feed
      
              setTimeout(function () {
                  web_socket.close()
              }, 60000)
          });
      
      web_socket.on('tick', receiveTick);
      
      
      function receiveTick(data) {
          console.log("receiveTick:::::", data);
      }
      
      posted in Bugs
      G
      goutamjaiswal