Trying to subscribe NIFTY 50 using instrument token number 256265 but no data received

Prvnkmr
Hello All,

I am trying to create chart of NIFTY 50 index using zerodha api(python) but that particular data is always empty in database. I can subscribe to other stocks and plot them and store them. Here storing is not happening.Please help me if i am doing anything wrong?
Tagged:
  • SRIJAN
    This isn't sufficient. Paste your code.
  • SRIJAN
    Not this,paste the websocket code.
  • Prvnkmr
    I hope this is the one ur asking for

    def on_ticks(self, ws, ticks):
    tick_models = [TickStore(**tick) for tick in ticks]
    TickStore.objects.bulk_create(tick_models)
    self.update_status(True, "Started ticker")
    logging.info("stored %d ticks", len(tick_models))
  • SRIJAN
    Seriously?? Ok,let me make it clear . Just subscribe to nifty and print ticks. If you're receiving the ticks,it means the problem is somewhere in your program. And,we don't provide support for programming. If you don't receive the ticks when just plain subscribing to nifty 50,you can tell.
  • Prvnkmr
    I am very sorry Srijan. This is a very complex application based on django and i only manage a part of it so i really donno whaere to search for that code ur looking for. I just need a confirmation that this particular index "NIFTY50" can be subscribed by the instrument token 256265 using kite connect api (live data only)
Sign In or Register to comment.