Skip to content

Instantly share code, notes, and snippets.

@ganigithub
Last active June 29, 2022 06:29
Show Gist options
  • Save ganigithub/f6d4f2c47b1854743d8511da39eb93f4 to your computer and use it in GitHub Desktop.
Save ganigithub/f6d4f2c47b1854743d8511da39eb93f4 to your computer and use it in GitHub Desktop.
form kiteconnect import KiteTicker
tokens = [738561, 5633] #token numbers of instruments
def on_ticks(ws, ticks):
print(ticks)
def on_connect(ws, response):
# Subscribe to a list of instrument_tokens
ws.subscribe(tokens)
ws.set_mode(ws.MODE_FULL, [tokens[0]]) #only for Reliance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment