Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. Yash-Ayu
    3. Posts
    Y
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by Yash-Ayu

    • getCandleData rate-limit continues at very low request frequency - backend telemetry check required

      Hi SmartAPI Team,
      We are still consistently receiving rate-limit errors on the Historical Candle API (getCandleData) even though our request frequency is very low and requests are spaced minutes apart.
      Recent failures on 6 Oct 2026 (UTC) occurred at approximately:

      • 06:22:14
      • 06:26:17
      • 06:31:28
      • 06:32:32
      • 06:34:35
        The error is:
        DataException: exceeding access rate
        Important observations:
      • Requests are not being sent in bursts.
      • We have conservative client-side rate limiting and cooldown handling enabled.
      • Quote/authentication APIs are working.
      • The issue appears specific to getCandleData.
      • Even isolated candle requests have sometimes been rejected.
      • The application is running in paper mode only; no live order execution is involved.
        Could you please check whether there is any API-key, account-level, IP-level, or backend historical-data throttle/restriction affecting our account?
        Please also confirm whether the currently documented getCandleData limits are being enforced differently on the backend.
        We can provide the exact request payload and timestamps if required, but we will not share authentication tokens or API secrets publicly.
        Thanks.
      posted in Bugs
      Y
      Yash-Ayu
    • getCandleData rate limit on single request even after extended cooldown

      Hi SmartAPI Team,
      I am consistently receiving a rate-limit error from getCandleData.
      Error: DataException: exceeding access rate
      I stopped my application completely and allowed an extended cooldown period. After that, I tested only ONE isolated getCandleData request for NIFTY 50 (5-minute candles), but the very first request was still rejected with the same rate-limit error.
      Quotes/authentication are working, but the historical candle API is being rejected. We have also implemented conservative client-side rate limiting and cooldown handling.
      Could you please check whether there is any API-key/account/IP-level restriction or issue affecting getCandleData and advise how to resolve it?
      Thanks.

      posted in Bugs
      Y
      Yash-Ayu
    • RE: Comparing static price with websocket LTP

      sharing this if someone needs it.

      "Code to store live websocket data in dynamic dictionary"
      ....................................................................................................................

      from smartapi import SmartConnect
      from smartapi import SmartWebSocket

      subscribetoken = "nse_cm|2031&nse_cm|212&nse_cm|3045"
      live_data = {}

      def websocketstreaming ():
      FEED_TOKEN = feedToken
      CLIENT_CODE = credentials.USER_NAME

          token = subscribetoken
          task = "mw"
      
          ss = SmartWebSocket(FEED_TOKEN, CLIENT_CODE)
      
          def on_message(ws, message):
              for i in message:
                  for j, k in i.items():
                          if j == 'ltp':
                              t = i.get('tk')  #token
                              l = i.get('ltp')  #ltp
                              #print(t, k)         
                              live_data[t] = k  #storing token:ltp in dictionary 
                              print(live_data)
                          else:
                              pass
      
          def on_open(ws):
              print("on open")
              ss.subscribe(task, token)
      
          def on_error(ws, error):
              print(error)
      
          def on_close(ws):
              print("Close")
      
      posted in Python SDK
      Y
      Yash-Ayu
    • Threaded websocket code not given on GitHub

      Hi,
      Please update code on GitHub to brief threading websocket. Thanks.

      posted in Python SDK
      Y
      Yash-Ayu
    • RE: Comparing static price with websocket LTP

      @admin Sir/Madam, I just need format of function which is not available on website. If it is available, then pls share link.

      posted in Python SDK
      Y
      Yash-Ayu
    • Comparing static price with websocket LTP

      I have excel file with predefined buy/sell price. I want to execute order when ltp will be in the range.

      I have successfully connected websocket and fetching live data of all stocks.

      "How can I fetch specific stock's LTP from websocket?" Which further I have to compare with excel file and execute orders.

      I have tried these calls to get only ltp of specific tokens but did not get success.
      print("Ticks: {}".format(message.ltp))
      print("Ticks: {}".format(message).ltp)
      print("Ticks: {}".format(message [2])
      print("Ticks: {}".format(message){2})

      Please guide.

      posted in Python SDK
      Y
      Yash-Ayu
    • RE: Must required fields are missing from Position Book API

      @admin how to fetch day's profit & loss amount? if possible, pls share details with one example. Thanks.

      posted in General Discussion
      Y
      Yash-Ayu