Navigation

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

    order feed not working

    General Discussion
    0
    2
    22
    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.
    • T
      tsingh last edited by

      Hi team
      I am trying to integrate order feed following this documentation - https://smartapi.angelbroking.com/docs/WebSocketOrderStatus

      I am getting following error when creating websocket connection

      node.js code snippet

      let init = (jwt)=>{
          let client = new (require("websocket").client)();
          client.on('connectFailed', function(error) {
              console.error('web socket', error);
          });
          let url = `wss://smartapisocket.angelbroking.com/websocket?jwttoken=${jwt}&clientcode=${CLIENT_ID}&apikey=${KEY}`
          client.connect(url)
      }
      init()
      

      Following error is thrown immediately :-

      web socket Error: socket hang up
          at connResetException (node:internal/errors:692:14)
          at TLSSocket.socketOnEnd (node:_http_client:478:23)
          at TLSSocket.emit (node:events:539:35)
          at endReadableNT (node:internal/streams/readable:1345:12)
          at processTicksAndRejections (node:internal/process/task_queues:83:21) {
        code: 'ECONNRESET'
      }
      

      client id - T185904

      1 Reply Last reply Reply Quote 0
      • T
        tsingh last edited by

        reposted as bug

        https://smartapi.angelbroking.com/topic/3425/order-feed-not-working

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