Navigation

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

    Topics created by Yash-Ayu

    • Y

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

      1
      0
      Votes
      1
      Posts
      5
      Views

      No one has replied

    • Y

      getCandleData rate limit on single request even after extended cooldown
      Bugs • api historical data python • • Yash-Ayu  

      1
      0
      Votes
      1
      Posts
      3
      Views

      No one has replied

    • Y

      Threaded websocket code not given on GitHub
      Python SDK • • Yash-Ayu  

      2
      0
      Votes
      2
      Posts
      38
      Views

      A

      HI @GaryR We have noted your feedback.
    • Y

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

      5
      0
      Votes
      5
      Posts
      54
      Views

      Y

      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")