Navigation

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

    Order Status Websocket not working

    NodeJS SDK
    0
    5
    52
    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.
    • H
      hashmeet last edited by

      Hi @administrators @admin,
      Getting the following error while trying to connect to Order Status Websocket.

      com.neovisionaries.ws.client.WebSocketException: The status line of the opening handshake response is empty.
      	at com.neovisionaries.ws.client.HandshakeReader.readStatusLine(HandshakeReader.java:99)
      	at com.neovisionaries.ws.client.HandshakeReader.readHandshake(HandshakeReader.java:48)
      	at com.neovisionaries.ws.client.WebSocket.readHandshake(WebSocket.java:3440)
      	at com.neovisionaries.ws.client.WebSocket.shakeHands(WebSocket.java:3319)
      	at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2354)
      	at com.angelbroking.smartapi.smartTicker.SmartWebsocket.connect(SmartWebsocket.java:257)
      	at org.example.Main.main(Main.java:118)
      
      

      Also while trying the same from POSTMAN getting error:

      Error: socket hang up
      

      Can someone please help understand what the issue is and how to resolve it?

      A 1 Reply Last reply Reply Quote 1
      • A
        ajitjv last edited by

        Hi,
        I am also facing the same issue.
        @SmartAPI-Admin can you please provide an update on this.

        1 Reply Last reply Reply Quote 0
        • A
          ajitjv @hashmeet last edited by

          @SmartAPI-Admin ,
          I am also facing same issue.
          Has something changed or is the support removed?
          Please provide some update.

          1 Reply Last reply Reply Quote 0
          • V
            vijayyande last edited by

            I am facing this issue, anyone have solution for this?

            1 Reply Last reply Reply Quote 0
            • V
              vijayyande last edited by

              I am facing this issue. I am using samples provided by angel. I am running test and login is working ticker is not working

              Logged in user: MY USER NAME 
              15:53:40.873 [main] INFO com.angelbroking.smartapi.smartstream.ticker.SmartStreamTicker - connected to uri: wss://smartapisocket.angelone.in/smart-stream
              
              15:53:40.927 [ReadingThread] INFO com.angelbroking.smartapi.smartstream.SmartStreamListenerImpl - subscriptionMode: SNAP_QUOTE exchangeType: NSE_CM token: NSE_CM-26000                     sequenceNumber: 15855280 ltp: 22198.35 lastTradedQty: 0 avgTradedPrice: 0.00 volumeTradedToday: 0 totalBuyQty: 0.00 totalSellQty: 0.00 open: 0.00 high: 0.00 low: 0.00 close: 22122.05 lastTradedTimestamp: 0 openInterest: 1287514.50 openInterestChangePerc: 407.69 bestFiveBuyData: [SmartApiBBSInfo(buySellFlag=1, quantity=0, price=0, numberOfOrders=0), SmartApiBBSInfo(buySellFlag=1, quantity=0, price=0, numberOfOrders=0), SmartApiBBSInfo(buySellFlag=1, quantity=0, price=0, numberOfOrders=0), SmartApiBBSInfo(buySellFlag=1, quantity=0, price=0, numberOfOrders=0), SmartApiBBSInfo(buySellFlag=1, quantity=0, price=0, numberOfOrders=0)] bestFiveSellData: [SmartApiBBSInfo(buySellFlag=0, quantity=0, price=0, numberOfOrders=0), SmartApiBBSInfo(buySellFlag=0, quantity=0, price=0, numberOfOrders=0), SmartApiBBSInfo(buySellFlag=0, quantity=0, price=0, numberOfOrders=0), SmartApiBBSInfo(buySellFlag=0, quantity=0, price=0, numberOfOrders=0), SmartApiBBSInfo(buySellFlag=0, quantity=0, price=0, numberOfOrders=0)] upperCircuit: 0.00 lowerCircuit: 0.00 yearlyHighPrice: 0.00 yearlyLowPrice: 0.00 exchangeTime: 2024-02-27T15:53:20+05:30[Asia/Kolkata] exchangeToClientLatency: 20924
              com.neovisionaries.ws.client.WebSocketException: The status line of the opening handshake response is empty.
              	at com.neovisionaries.ws.client.HandshakeReader.readStatusLine(HandshakeReader.java:99)
              	at com.neovisionaries.ws.client.HandshakeReader.readHandshake(HandshakeReader.java:48)
              	at com.neovisionaries.ws.client.WebSocket.readHandshake(WebSocket.java:3440)
              	at com.neovisionaries.ws.client.WebSocket.shakeHands(WebSocket.java:3319)
              	at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2354)
              	at com.angelbroking.smartapi.smartstream.ticker.SmartStreamTicker.connect(SmartStreamTicker.java:383)
              	at com.angelbroking.smartapi.smartstream.SmartStreamTickerTest.testSmartStreamTicketLTP(SmartStreamTickerTest.java:52)
              	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
              	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:728)
              	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
              	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
              	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
              	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
              	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
              	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
              	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
              	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
              	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
              	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
              	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
              	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
              	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
              	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:218)
              	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:214)
              	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:139)
              	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
              	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
              	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
              	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
              	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
              	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
              	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
              	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
              	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
              	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
              	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
              	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
              	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
              	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
              	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
              	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
              	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
              	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
              	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198)
              	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
              	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
              	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58)
              	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141)
              	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57)
              	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
              	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
              	at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
              	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:63)
              	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
              	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
              	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
              	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
              	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
              	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
              
              com.neovisionaries.ws.client.WebSocketException: The status line of the opening handshake response is empty.
              
              	at com.neovisionaries.ws.client.HandshakeReader.readStatusLine(HandshakeReader.java:99)
              	at com.neovisionaries.ws.client.HandshakeReader.readHandshake(HandshakeReader.java:48)
              	at com.neovisionaries.ws.client.WebSocket.readHandshake(WebSocket.java:3440)
              	at com.neovisionaries.ws.client.WebSocket.shakeHands(WebSocket.java:3319)
              	at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2354)
              	at com.angelbroking.smartapi.smartstream.ticker.SmartStreamTicker.connect(SmartStreamTicker.java:383)
              	at com.angelbroking.smartapi.smartstream.SmartStreamTickerTest.testSmartStreamTicketLTP(SmartStreamTickerTest.java:52)
              	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
              	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
              
              
              1 Reply Last reply Reply Quote 0
              • First post
                Last post