Market Data

nayan_nandi
nayan_nandi edited September 2020 in Python client
def on_ticks(ws, ticks):
# Callback to receive ticks.
logging.debug("Ticks: {}".format(ticks))

def on_connect(ws, response):
# Callback on successful connect.
# Subscribe to a list of instrument_tokens (RELIANCE and ACC here).
ws.subscribe([738561, 5633])

# Set RELIANCE to tick in `full` mode.
ws.set_mode(ws.MODE_FULL, [738561])

how to store on_ticks data response of 100 instruments in pandas dataframe with instrument name.
  • rakeshr
    how to store on_ticks data response of 100 instruments in pandas dataframe with instrument name
    You can look to this thread, to pass tick to another thread without blocking main thread and store data.
Sign In or Register to comment.