Kotak-Neo / kotak-neo-api

113 stars 105 forks source link

Quotes api returns empty {} #46

Closed vijnair closed 1 year ago

vijnair commented 1 year ago

Quotes api takes little over 2 minutes to run. And returns {} Running python 3.11.4

This is the code

inst_tokens = [{"instrument_token": "11536", "exchange_segment": "nse_cm"},
               {"instrument_token": "1594", "exchange_segment": "nse_cm"},
               {"instrument_token": "11915", "exchange_segment": "nse_cm"},
               {"instrument_token": "13245", "exchange_segment": "nse_cm"}]
client.quotes(instrument_tokens=inst_tokens, quote_type='', isIndex=False)
vijnair commented 1 year ago

I have these in log

2023-08-30 13:06:40,626 error from callback <bound method StartServer.on_open of <neo_api_client.HSWebSocketLib.StartServer object at 0x000001E2ECBB9B50>>: a bytes-like object is required, not 'list' 2023-08-30 13:08:45,026 error from callback <bound method StartServer.on_close of <neo_api_client.HSWebSocketLib.StartServer object at 0x000001E2ECBB9B50>>: StartServer.on_close() missing 2 required positional arguments: 'close_status_code' and 'close_msg'

vijnair commented 1 year ago

Updated websocket-client to 1.5.1 and problem solved :)