Navigation

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

    Posts made by vivekruhela

    • RE: Connection reset by peer Error

      @admin : Anyone?? Is everyone on holiday??

      posted in Python SDK
      V
      vivekruhela
    • Connection reset by peer Error

      Hi,

      I am facing an error of Connection reset by peer multiple times. Can anyone suggest to me how to get rid of it? If there is any sample code, please share it. I need it urgently. Thanks in advance.

      posted in Python SDK
      V
      vivekruhela
    • Delayed response by 2 min

      @admin, I am getting a delayed response from WebSocket. I am generating a 2-minute candle to perform online technical analysis and then decide my trade (buy/sell/hold) from the live WebSocket data. But I have observed that my candles are 2 minutes late from the live market. This is causing me the wrong output from my technical indicators. Please suggest ASAP. I am facing a huge loss because of that delay. Thanks.

      posted in Python SDK
      V
      vivekruhela
    • RE: Repeated breakdown of websocket

      @admin The issue of AUTH_TOKEN is solved but I am not able to get the price and volume in websocket 2.0. I am getting the error message In on pong function==> b'ping' consistently. Please suggest ASAP.

      posted in Python SDK
      V
      vivekruhela
    • RE: Repeated breakdown of websocket

      @admin The issue of AUTH_TOKEN is solved but I am not able to get the price and volume in websocket 2.0. I am getting message In on pong function==> b'ping' consistently. Please suggest.

      posted in Python SDK
      V
      vivekruhela
    • How to get funds available for intraday trading (with margin and without margin) automatically

      Hello,

      I am trying to set my python script for automated trading. But during stock buying/selling, I don't know how to get the available fund information (with intraday margin or without intraday margin) in an automated fashion so that I can calculated I many stock I can buy to sell automatically. I the following code, I can get the userprofile basic information and holdings using obj.getProfile(refreshToken) and obj.holding(). But I don't know how to get the funds available in my account for intraday (with intraday margin).

      obj=SmartConnect(api_key="****")
      data = obj.generateSession("****","****")
      refreshToken= data['data']['refreshToken']

      #fetch the feedtoken
      feedToken=obj.getfeedToken()

      #fetch User Profile
      userProfile= obj.getProfile(refreshToken)

      Let me know how can I have this information using python SDK module (smartapi-python). Thanks

      posted in Python SDK
      V
      vivekruhela
    • RE: Repeated breakdown of websocket

      @admin What is AUTH_TOKEN? Is it access_token generated obtained from obj.access_token?

      I tried putting access_token in AUTH_TOKEN but I am getting only one response as shown below:

      In on pong function==> b'ping'

      posted in Python SDK
      V
      vivekruhela
    • RE: Repeated breakdown of websocket

      @admin What is AUTH_TOKEN? Is it access_token generated obtained from obj.access_token?

      I tried putting access_token in AUTH_TOKEN but I am getting only one response as shown below:

      In on pong function==> b'ping'

      posted in Python SDK
      V
      vivekruhela
    • Repeated breakdown of websocket

      Hi,

      I am trying to execute and monitor my trades using the python SDK module. But I am facing an issue of discontinuity of WebSockets consistently. Whenever I start my session, it shows an error [-3] after some time and stops working. First I doubt my wifi connection issue but there is no such issue in the internet connection. Can you suggest why ss.connect() shows an error (Error code: [-3]) and how to get consistent WebSocket output from 09:15 AM to 03:20 PM without any glitch. Thanks

      posted in Python SDK
      V
      vivekruhela
    • RE: How to compute RSI for first 13 minutes (intraday)

      Issue solved.

      posted in Python SDK
      V
      vivekruhela
    • How to compute RSI for first 13 minutes (intraday)

      Hi,

      As we know the formula for computing Relative Strength Index (RSI) = 100 - (100/(1+RS)) where RS is the relative strength (ratio of average gain and average loss). In general, the look-back period is 14 days. I want to know how to calculate RSI for intra-day. Is there a lookback period of 14 minutes for intra-day? If it is 14 minutes, then how to compute the RSI for the first 13 minutes?

      posted in Python SDK
      V
      vivekruhela
    • Volume shown by websocket smartAPI is not same as the sum of total buy quantity and total sell quantity

      Hi,

      I am using SmartAPIwebsocket to fetch the real-time price and volume-related information of stock. I have observed that I am getting the information about total but quantity (with key 'tbq', total sell quantity (with key 'tsq') and volume information (with key 'v'). I think total volume buy + total volume sell must be equal to the total volume traded at that moment (i.e. 'tbq' + 'tsq' = 'v') but I don't see that in the response. the total volume information (with key 'v') is always greater than 'tbq' + 'tsq'. Is it correct?

      Let me know if I am making any wrong assumptions. Thanks.

      posted in Python SDK
      V
      vivekruhela
    • RE: Extract price and volume from websocket module response

      Hello,

      Problem Solved. I tried to remove this post, but I don't have privileges for that right now.

      posted in Python SDK
      V
      vivekruhela
    • Extract price and volume from websocket module response

      Hi,

      I am trying to get real-time price and volume information using the Smartwebsocket service. I am also able to use the code and get the real-time price. But the issue is that ss.connect() gives the continuous response. I am trying to extract ltp, tbq, tsq from ss.connect() response. Can anyone tell me how to parse the continuous response obtained from continuous ss.connect()? Thanks

      posted in Python SDK
      V
      vivekruhela