Navigation

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

    Posts made by dipeshbodas

    • RE: not able to connect to wsfeeds.angelbroking.com:443

      @Moderator_2
      @Moderator_1
      @admin
      I have already said I am using latest SDK
      <dependency>
      <groupId>com.angelbroking.smartapi</groupId>
      <artifactId>smartapi-java</artifactId>
      <version>2.2.3</version>
      </dependency>

      Is there any other version availabale ?

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: not able to connect to wsfeeds.angelbroking.com:443

      @Moderator_2
      @Moderator_1
      @admin
      can someone please look into this issue ? It has been too long

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: not able to connect to wsfeeds.angelbroking.com:443

      @Moderator_2
      com.neovisionaries.ws.client.WebSocketException: Failed to connect to 'wsfeeds.angelbroking.com:443': Connection timed out: connect

      still the same error. I am using latest SDK
      <dependency>
      <groupId>com.angelbroking.smartapi</groupId>
      <artifactId>smartapi-java</artifactId>
      <version>2.2.3</version>
      </dependency>

      posted in NodeJS SDK
      D
      dipeshbodas
    • Unable to login to smarapi page

      .
      Getting below error
      Request URL:
      https://apiconnect.angelbroking.com/rest/auth/angelbroking/client/v1/login
      Request Method:
      OPTIONS
      Status Code:
      502 Bad Gateway

      posted in Bugs
      D
      dipeshbodas
    • not able to connect to wsfeeds.angelbroking.com:443

      @admin
      while connecting to wsfeeds.angelbroking.com:443 I am getting below error at this line tickerProvider.connect();

      com.neovisionaries.ws.client.WebSocketException: F`ailed to connect to 'wsfeeds.angelbroking.com:443': Connection timed out: connect
      at com.neovisionaries.ws.client.SocketConnector.connectSocket(SocketConnector.java:127)
      at com.neovisionaries.ws.client.SocketConnector.doConnect(SocketConnector.java:239)
      at com.neovisionaries.ws.client.SocketConnector.connect(SocketConnector.java:190)
      at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2351)
      at com.angelbroking.smartapi.ticker.SmartAPITicker.connect(SmartAPITicker.java:288)
      at com.tradewithpivots.algotrade.services.StreamingService.tickerUsage(StreamingService.java:70)
      at com.tradewithpivots.algotrade.services.StreamingService.getStream(StreamingService.java:34)
      at com.tradewithpivots.algotrade.startup.Onload.loadSymbols(Onload.java:23)
      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.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMethod.invoke(InitDestroyAnnotationBeanPostProcessor.java:457)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:401)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:219)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1762)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:598)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608)
      at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:436)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
      at com.tradewithpivots.algotrade.AlgoTradingApplication.main(AlgoTradingApplication.java:10)
      Caused by: java.net.ConnectException: Connection timed out: connect
      at java.base/sun.nio.ch.Net.connect0(Native Method)
      at java.base/sun.nio.ch.Net.connect(Net.java:579)
      at java.base/sun.nio.ch.Net.connect(Net.java:568)
      at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:588)
      at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
      at java.base/java.net.Socket.connect(Socket.java:633)
      at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
      at com.neovisionaries.ws.client.SocketInitiator$SocketRacer.run(SocketInitiator.java:126)

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: invalid TOTP error errorcode":"AB1050" with java

      @Moderator_2
      I had to generate the TOTP from the smartapi website and provide key to Authenticator app. TOTP generation is still not working.
      Also when authenticated getting below error
      com.neovisionaries.ws.client.WebSocketException: Failed to connect to 'wsfeeds.angelbroking.com:443': Connection timed out: connect

      posted in NodeJS SDK
      D
      dipeshbodas
    • invalid TOTP error errorcode":"AB1050" with java

      @admin
      Getting error as invliad totp. PFB code snippet
      Code :
      SmartConnect smartConnect = new SmartConnect();

      smartConnect.setApiKey("<API KEY>");
      
      GoogleAuthenticator gAuth = new GoogleAuthenticator();
      
      String totpcode = String.valueOf(gAuth.getTotpPassword("<secret key>"));
      
      System.out.println(" TOTP : "+totpcode);
      
      User user = smartConnect.generateSession("<clientCode>","<PIN>",totpcode);
      
      smartConnect.setAccessToken(user.getAccessToken());
      

      console output :

      {"data":null,"message":"Invalid totp","errorcode":"AB1050","status":false}JSONObject["data"] is not a JSONObject (class org.json.JSONObject$Null : null).

      posted in NodeJS SDK
      D
      dipeshbodas
    • getCandleData is returning null for historical dates

      trying to get Data for SBIN here is code snippet
      login successful and totp is accepted before calling this api
      JSONObject requestObejct = new JSONObject();
      requestObejct.put("exchange", "NSE");
      requestObejct.put("symboltoken", token);
      requestObejct.put("interval", "ONE_DAY");
      requestObejct.put("fromdate", "2023-08-01 09:00");
      requestObejct.put("todate", "2023-08-10 15:35");

      String response = smartConnect.candleData(requestObejct);
      System.out.println("response : "+response);

      posted in NodeJS SDK
      D
      dipeshbodas
    • Historical data returning null

      code snippet

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: Facing issue in TOTP Automation

      getTOTPCode(apiKey);

      can you share the code for this ?
      facing issues while using totp
      dipesh.bodas@gmail.com

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: {"data":null,"message":"Something Went Wrong, Please Try After Sometime","errorcode":"AB1004","status":false}JSONObject["data"] is not a JSONObject.

      @dipeshbodas
      @admin error is occurring after statement
      smartConnect.generateSession

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: {"data":null,"message":"Something Went Wrong, Please Try After Sometime","errorcode":"AB1004","status":false}JSONObject["data"] is not a JSONObject.

      @ckatangelapi

      @admin facing same issue , if we retry the api call several times, it randomly executes successfully.

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: getCandle function is throwing error and returning null

      @pashriva
      Thanks for replying. Did exactly same and resolved at my end.

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: getCandle function is throwing error and returning null

      @admin please check

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: getCandle function is throwing error and returning null

      @dipeshbodas

      code snippet

      SmartConnect smartConnect = new SmartConnect("API_KEY");

      	  User user = smartConnect.generateSession("<username>",<password>");
      	  smartConnect.setAccessToken(user.getAccessToken());
      	  smartConnect.setUserId(user.getUserId());
      	  
      	  JSONObject requestObejct = new JSONObject();
      	  requestObejct.put("exchange","NSE"); 
      	  requestObejct.put("symboltoken","3045"); 
      	  requestObejct.put("interval", "ONE_DAY");
      	  requestObejct.put("fromdate","2022-03-30 15:35"); 
      	  requestObejct.put("todate","2022-03-31 15:35"); 
      	  String response=smartConnect.candleData(requestObejct);
      
      posted in NodeJS SDK
      D
      dipeshbodas
    • getCandle function is throwing error and returning null

      smartConnect.candleData(requestObejct) has an issue with code.

      SmartConnect class on line 699
      return response.getString("data");

      it's throwning below error while fetching candle
      JSONObject["data"] is not a string.

      posted in NodeJS SDK
      D
      dipeshbodas
    • RE: ClassNotFoundException

      @V123060 said in ClassNotFoundException:

      Interceptor

      Did you find any solution, just faced the same issue with my code

      posted in NodeJS SDK
      D
      dipeshbodas
    • user is blocked

      @admin @administrators
      I am getting error while running the code.
      User Is Blocked', 'errorcode': 'AB1007', 'data': None}
      client id :D43726

      posted in General Discussion
      D
      dipeshbodas
    • websocket error send_request() missing 1 required positional argument: 'task'

      While streaming data, getting below error.

      2022-02-10 10:40:43,smartapi.webSocket - DEBUG - Connection closed: 1006 - connection was closed uncleanly (I dropped the WebSocket TCP connection: send_request() missing 1 required positional argument: 'task')

      code sample :
      ss = WebSocket(FEED_TOKEN, CLIENT_CODE)
      def on_tick(ws, tick):
      logging.debug("Starting with tickdata")

      posted in Python SDK
      D
      dipeshbodas