I am trying to fetch market data for Nifty 50 index using fyers websocket but it always return empty response as below. The problem is same for BANK NIFTY index also
Custom []
pong received
Custom []
Custom []
Below is the code I used:
def custom_message(self):
print ("Custom " + str(self.response))
ws.FyersSocket.websocket_data = custom_message
acctoken = client_id+':'+accessToken
data_type ="symbolData"
symbol = ["NSE:NIFTY50-INDEX"]
fyersSocket = ws.FyersSocket(access_token=acctoken, data_type=data_type,symbol=symbol)
fyersSocket.subscribe()
But it works for the respective strike price symbol like: "NSE:NIFTY21SEP17850CE"