Navigation

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

    MessageReceived method/function not available in the smart-api.dll

    C#/.Net SDK
    websocket
    2
    8
    56
    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.
    • W
      West2t14 last edited by

      Hello Admin -

      MessageReceived method/function not available in the smart-api.dll for websocket. Could you please update the dll with the MessageReceived method for websocket?

      8a1ea3e3-802c-4542-8b14-993e153f3715-image.png

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

        Hi @West2t14 we have reported this to team.

        W 2 Replies Last reply Reply Quote 0
        • W
          West2t14 @admin last edited by

          @admin said in MessageReceived method/function not available in the smart-api.dll:

          Hi @West2t14 we have reported this to team.

          Thank you!

          1 Reply Last reply Reply Quote 0
          • W
            West2t14 @admin last edited by

            @admin Hello There -

            Any update here?

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

              HI @West2t14 we have reported this to the team we will update you soon.

              W 1 Reply Last reply Reply Quote 0
              • W
                West2t14 @admin last edited by

                @admin Thank you! Will be waiting for your reply. I am stuck here and this will help me automate my trades!

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

                  HI @West2t14
                  The MessageReceived is not missing in the library, It's there. you has to create an instance of WebSocket class of AngelBroking library as follow then you can get access to this event handler

                  AngelBroking.WebSocket _WS = new AngelBroking.WebSocket();
                  
                      var exitEvent = new ManualResetEvent(false);
                  
                      _WS.ConnectforStockQuote(sagr.feedToken, Client_code);
                  ​
                      if (_WS.IsConnected())
                      {
                  
                      string script = "nse_cm|2885&nse_cm|1594&nse_cm|11536&nse_cm|3045";
                  
                      _WS.RunScript(sagr.feedToken, Client_code, script, "mw");
                  
                      _WS.MessageReceived += WriteResult;
                  
                             //_WS.Close(true);// to stop and close socket connection
                      }
                  
                  W 1 Reply Last reply Reply Quote 0
                  • W
                    West2t14 @admin last edited by

                    @admin said in MessageReceived method/function not available in the smart-api.dll:

                    HI @West2t14
                    The MessageReceived is not missing in the library, It's there. you has to create an instance of WebSocket class of AngelBroking library as follow then you can get access to this event handler

                    AngelBroking.WebSocket _WS = new AngelBroking.WebSocket();
                    
                        var exitEvent = new ManualResetEvent(false);
                    
                        _WS.ConnectforStockQuote(sagr.feedToken, Client_code);
                    ​
                        if (_WS.IsConnected())
                        {
                    
                        string script = "nse_cm|2885&nse_cm|1594&nse_cm|11536&nse_cm|3045";
                    
                        _WS.RunScript(sagr.feedToken, Client_code, script, "mw");
                    
                        _WS.MessageReceived += WriteResult;
                    
                               //_WS.Close(true);// to stop and close socket connection
                        }
                    

                    Thank you! Will check it out!

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