Navigation

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

    Can I get the websocket using simple javascript ?

    Bugs
    0
    5
    63
    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.
    • J
      jety_22 last edited by

      @admin
      I am able to get quotes using websocket in nodejs. But can I use the same in simple javascript.

      let { SmartAPI, WebSocket } = require("smartapi-javascript");
      
      
      
      
      let web_socket = new WebSocket({
          client_code: "****",
          feed_token: "****"
      });
      
      web_socket.connect()
          .then(() => {
              //  web_socket.runScript("nse_cm|2885", "cn") // SCRIPT: nse_cm|2885, mcx_fo|222900  TASK: mw|sfi|dp
              web_socket.runScript("nse_cm|2885", "mw")
                  // setTimeout(function() {
                  //     web_socket.close()
                  // }, 10000)
          })
      
      web_socket.on('tick', receiveTick)
      
      
      function receiveTick(data) {
          console.log("receiveTick:::::", data)
      }
      

      Please tell me how to get the live market feed in simple javascript.

      A 1 Reply Last reply Reply Quote 0
      • A
        admin @jety_22 last edited by

        Hi @jety_22 kindly go through below url to know supported sdk.

        J 1 Reply Last reply Reply Quote 0
        • J
          jety_22 @admin last edited by

          @admin which url ?

          A 1 Reply Last reply Reply Quote 0
          • A
            admin @jety_22 last edited by

            @jety_22
            https://smartapi.angelbroking.com/docs

            J 1 Reply Last reply Reply Quote 0
            • J
              jety_22 @admin last edited by

              @admin Does that mean I won't be able to use plain javascript for it ???

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