You seem to be exceeding the rate limit here while making another API call inside Websocket streaming and blocking the main thread. You can check the current rate limit here. You can also refer to this thread to know about the handling of the main thread block.