It looks like you're new here. If you want to get involved, click one of these buttons!
from kiteconnect import KiteTicker
import logging
logging.basicConfig(level=logging.DEBUG)
api_key="api"
access_token="token"
tokens=[14668802]
kws=KiteTicker(api_key,access_token)
def on_ticks(ws,ticks):
for tick in ticks:
print('last_price',tick['last_price'],'date',tick['timestamp'])
def on_connect(ws,response):
ws.subscribe(tokens)
ws.set_mode(ws.MODE_FULL,tokens)
kws.on_ticks=on_ticks
kws.on_connect=on_connect
kws.connect()
Can you please share the working example.
api_key="api"
access_token="token"
tokens=[14668802]
kite = KiteConnect(api_key=api_key)
data = kite.generate_session(access_token, api_secret=api_secret)
kws=KiteTicker(api_key,data["access_token"])
I used request token as access token thats what caused the confusion.
Thanks for the response