Defining Class For On Ticks

akshay07
I have declared a class named as kwsmodule
which has the on_ticks() ,on connect as follows some part is not included here but if i want to call this on_ticks member of this class how do I do it .as ws and ticks are already defined in kite connect how should i pass

eg:KwsModule.on_ticks()

what should be the arguments for on_ticks abbove

class KwsModule:


def __init__(self,df_ohlc_company):
@staticmethods
def on_ticks(self,ws,ticks)

def on_connect(ws,response):
<---------Code------------>




  • sujith
    These are event listeners, the use-case of these methods is, these are called when a websocket connection is opened, or when a tick is received.
    You just need to set your method as a listener for the events. You can assign callbacks as mentioned here.
  • akshay07
    thanks @sujith the issue was resolved
This discussion has been closed.