fyersSocket = ws.FyersSocket(access_token=feedtoken,run_background=True,log_path=‘/content’)
brokerTicks = fyersSocket.subscribe(symbol=symbol,data_type=data_type)
ticks =
for bTick in brokerTicks:
isd = Instruments.getInstrumentDataBySymbol(bTick[‘symbol’])
tradingSymbol = isd[‘symbol’]
tick = TickData(tradingSymbol)
tick.lastTradedPrice = bTick[‘ltp’]
tick.lastTradedQuantity = bTick[‘last_traded_quantity’]
tick.avgTradedPrice = bTick[‘avg_trade_price’]
tick.volume = bTick[‘vol_traded_today’]
tick.totalBuyQuantity = bTick[‘tot_buy_qty’]
tick.totalSellQuantity = bTick[‘tot_sell_qty’]
tick.open = bTick[‘open_price’]
tick.high = bTick[‘high_price’]
tick.low = bTick[‘low_price’]
tick.close = bTick[‘close_price’]
ticks.append(tick)
I am getting error:
File “d:\AlgoTraderFyers\src\ticker[FyersTicker.py](http://FyersTicker.py)”, line 53, in registerSymbols for symbol_data in brokerTicks: TypeError: ‘NoneType’ object is not iterable