Open Hari3115 opened 5 months ago
same issues is happing with me related to the client.quotes i was try to abstract the ATM value when i assing the variable to the client.quotes it gives none as an input if anyone has solution then let me know
my code ltp = client.quotes(instrument_tokens=inst_tokens, quote_type="ltp", isIndex=False) atm = str(round(float(ltp['message'][0]['last_traded_price'])/50)*50)
have you checked the "client.on_message = on_message". For me if I call Client.quote , i get the ltp in on_message method
can you share your on_message method code
inside on_message I am storing the data in a dictionary
anyone able to actually get a response from the call back function? what is the method that works?
below mention a sample code from on_message method def on_message(message): if message['type'] == 'quotes': print(message)
When you call the quote method it will return None but the result will be print inside on_message
The problem was launching jupyter from anaconda, when i launched the jupyter notebook directly, the callback function worked fine. I m not sure why, but it worked.
Both Client.quotes and client.subscribe returning None after updating to Python SDK v1.2, issue was not there in previous version. Anyone was able to solve this? #157