Callback function anomaly within the websocket connection

When i started the query, i got this error directly every millisecond for the first 450 milliseconds or so. 2024-04-11 12:00:00.415 UTC ERROR binance.websocket.websocket_client : Error from callback <function exchange_info_handler at 0x7f7f10435 040>: ‘result’ The timestamp from which i started the API query = 11:59:59.975

Actually, since the listing moment was my first real trial, I recorded it on video. I was sure it would work, so I set all the logs to .INFO level. That’s why I usually got the error code I sent earlier as an error message. I make a query every millisecond until a purchase is made, and if a purchase is made, I scale the API query to a second. Since no purchase was ever made, I was banned after about 450 milliseconds due to the api rate limit. I guess these logs are related to the ban?

2024-04-11 12:00:00.430 UTC ERROR binance.websocket.websocket_client : Exception in read_data: [SSL: BAD_LENGTH] bad length (_ssl.c:2483) Exception in thread Thread-2: Traceback (most recent call last): File “/usr/lib64/python3.9/threading.py”, line 980, in bootstrap inner self.run() File “/usr/local/lib/python3.9/site-packages/binance_connector-3.6 .0-py3.9.egg/binance/websocket/binance_socket_manager.py”, line 60, in run File “/usr/local/lib/python3.9/site-packages/binance_connector-3.6 .0-py3.9.egg/binance/websocket/binance_socket_manager.py”, line 84, in read_data

I think this thread popped up to the console 3 or 4 times in total, including a series of callback function errors. Because I did a lot of testing later in the server terminal, the errors at the time of listing disappeared from the terminal memory. I currently have a video that I shot of the error moments where the server terminal and the symbol listing countdown interface are in the frame. It’s a little hazy, but it works.

2024-04-11 12:00:00.415 UTC ERROR binance.websocket.websocket_client : Error from callback <function exchange_info_handler at 0x7f7f10435 040>: ‘result’ return self._sslobj.write(data) BrokenPipeError: [Errno 32] Broken pipe

Apart from this, I also noticed some errors in exchange python libraries and noticed that a few functions were not working as they should and reported them. Therefore, it is necessary to make changes within the library. Why does the callback function give this error on a websocket connection? How can there be no “result” data in a situation where queries are made every millisecond?

*Why doesn’t a callback function and websocket connection that repeats an API query in a loop return any (response) data?

I am pre-querying an API for a new symbol to be listed on an exchange and performing an action based on the incoming JSON response. The symbol I am querying is not yet listed, so it will give an error for the first 25 milliseconds, which is normal because it is not yet listed and does not have any data. However, shouldn’t it start returning data after 25 milliseconds?

Even after 500 milliseconds after the listing, I was not able to receive any data. Is this related to the fact that the code starts with an error message? When the same code is run for an already listed symbol, it starts working directly with the incoming JSON responses.*