Not able to get live streaming of NFO data

zash121
zash121 edited June 2018 in Python client
I am trying to stream live NFO tick data, but it shows nothing,not even the error. Because previously with same code I can able to get live stream data

my python is :-

from kiteconnect import WebSocket


api_key='your_api_key'
public_token='your_public_token'
client_id='your_id'
#here i have added nifty 50 indices and then MCX GOLD contract
tokens=[53372167,256265]

pa=WebSocket(api_key,public_token,client_id)



def on_tick(tick,wbskt):
print(tick)

def on_connect(wbskt):
wbskt.subscribe(tokens)
#set the mode as you wish for market watch
wbskt.set_mode(wbskt.MODE_FULL,tokens)

pa.on_tick=on_tick
pa.on_connect=on_connect

pa.connect()
  • sujith
    You seem to be using an old version of Kite Connect API which is deprecated. You need to use the latest one.
    You can check out the example here.
Sign In or Register to comment.