i have tried with fyers-apiv2 == 2.0.4 which has issue of “runbackgorun”
i have tried with fyers-apiv2 == 2.0.5 which has no module - websocket…
how to work with these errors ?
i have tried with fyers-apiv2 == 2.0.4 which has issue of “runbackgorun”
i have tried with fyers-apiv2 == 2.0.5 which has no module - websocket…
how to work with these errors ?
Hey Andy,
Can you use the 2.0.5 version and run the below code,
from fyers_api.Websocket import ws
def run_process_symbol_data(access_token):
data_type = “symbolData”
symbol = [“NSE:SBIN-EQ”]
fs = ws.FyersSocket(access_token=access_token,log_path=“/home/user/logs”)
fs.websocket_data = custom_message
fs.subscribe(symbol=symbol,data_type=data_type)
fs.keep_running()
def custom_message(msg):
print (f"Custom:{msg}")
def main():
access_token = “SPXXXXE7-100:eyJ0eXAiOiJK***.eyJpc3MiOiJhcGkuZnllcnM***.IzcuRxg4tnXiULCx3***”
run_process_symbol_data(access_token)
if name == ‘main’:
main()