Not able to fetch any market data using api v2

Hi All,Ā 

can anyone please resolve this issue of fetching marketdata.

I am using the pip version 2.0.4

Ā 

code:
def getMarketData(self):

Ā  Ā  Ā  Ā  access_token=client_id+':'+self.access_token

Ā  Ā  Ā  Ā  print('access_token>>>>',access_token)

Ā  Ā  Ā  Ā  data_type='symbolData'

Ā  Ā  Ā  Ā  symbol = ['NSE:TATAMOTORS-EQ', 'NSE:ITC-EQ']

Ā  Ā  Ā  Ā  def custom_message(ticks):

Ā  Ā  Ā  Ā  Ā  Ā  print (ticks.response)

Ā  Ā  Ā  Ā  ws.FyersSocket.websocket_data=custom_message

Ā  Ā  Ā  Ā  fs=ws.FyersSocket(access_token,data_type,symbol)

Ā  Ā  Ā  Ā  fs.subscribe ()

Ā 

can anyone please help me , why this is not working

and the output is like this:

Ā 

any help and answers would be helpful, if anyone else is facing the same issue please comment.

thank you.

7 replies