Navigation

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

    sen

    @sen

    2
    Reputation
    6
    Posts
    4
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    sen Follow

    Best posts made by sen

    • Dot Net Core SMART API Client Avaialble

      Re: From when can get updated C#/.net SDK

      https://github.com/Sen-Gupta/AngelOne.SmartApi

      Please feel to open ideas/issues on Github.

      This is just a smaple project.

      posted in C#/.Net SDK
      S
      sen

    Latest posts made by sen

    • RE: Invalid totp

      @nishi21694 That's correct.

      The code id resulting AB1050 error.

      Seems like Angel Team making changes without testing them thoroughly.

      posted in General Discussion
      S
      sen
    • Dot Net Core SMART API Client Avaialble

      Re: From when can get updated C#/.net SDK

      https://github.com/Sen-Gupta/AngelOne.SmartApi

      Please feel to open ideas/issues on Github.

      This is just a smaple project.

      posted in C#/.Net SDK
      S
      sen
    • RE: "INTERNAL SERVER ERROR" WHILE LOGIN TOTP

      What is the language being used?

      posted in General Discussion
      S
      sen
    • RE: TOTP Integration

      You are not supposed to enter TOTP. You are supposed to enter the QR code received during TOTP registration.

      If you are using python/dot net, or any other language, they have their OTP nugets, where you can pass your QR and it generates the OTP.

      Plesae let me the language you are using for integration for further help.

      posted in General Discussion
      S
      sen
    • RE: i am not able to login in angel smartapi....error code AB1050. wrong otp.it has been really frustating.

      What programing language are you using for it?

      posted in General Discussion
      S
      sen
    • RE: AB1050 Invalid TOTP while connect.GenerateSession

      You are supposed to use any OTP library.

      1. Do you have the QR code for TOTP?
      2. Add OTPNet nuget in your project. (OTPNet)
      3. Convert TOTP QR to OTP string.

      //Initialize Samart API using clientcode and password to test the code.
      string totp = "2EYUVJNXYERUXPLAATDRTUHSWM";
      string Client_code = "DELL2456"; //YOUR CLIENT CODE
      string Password = "3456"; //YOUR PASSWORD
      string api_key = "OvPZUMMM";
      string JWTToken = ""; // optional
      string RefreshToken = ""; // optional

      SmartApi connect = new SmartApi(api_key, JWTToken, RefreshToken);
      OutputBaseClass obj = new OutputBaseClass();

      //Login by client code and password
      obj = connect.GenerateSession(Client_code, Password, totp);

      ------Next in SmartConnetClass
      /User Calls/
      public OutputBaseClass GenerateSession(string clientcode, string password, string totpString)
      {
      OutputBaseClass res = new OutputBaseClass();
      byte[] secretBytes = Base32Encoding.ToBytes(totpString);

       **// Create an instance of the TOTP class
       var totp = new Totp(secretBytes);
      
       // Get the current TOTP code
       string totpCode = totp.ComputeTotp();**
       res.status = true;
       res.http_code = "200";
       try
       {
           AngelTokenResponse agr = new AngelTokenResponse();
      
           string URL = APIURL + "/rest/auth/angelbroking/user/v1/loginByPassword";
      
           string PostData = "{\"clientcode\":\"" + clientcode + "\",\"password\":\"" + password + "\",\"totp\":\"" + **totpCode** + "\"}";
      

      If required, let me know, I can push entire code to GitHub

      posted in C#/.Net SDK
      S
      sen