python - 无法连接到 bybit websocket(出现错误:[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1076))
问题描述
我正在尝试连接到 websocket api,感兴趣的人可以使用 bybit 的 websocket。我尝试了一切并阅读了我能找到的所有文档,它仍然给我和错误:
[SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 警报内部错误 (_ssl.c:1076)
我的代码如下所示:
import websocket
def on_message(ws, message):
print(message)
def on_error(ws, error):
print(error)
def on_close(ws):
print("### closed ###")
def on_open(ws):
ws.send("{'op': 'subscribe', 'args': ['orderBookL2_25.BTCUSDT']}")
ws = websocket.WebSocketApp(url="wss://stream-testnet.bybit.com/realtime_public",
on_message=on_message,
on_error=on_error,
on_close=on_close,
on_open=on_open)
ws.run_forever()
我任何人都知道问题是什么或可能是什么,请告诉我/掌舵我,因为这个,过去两天我一直在用头撞墙。提前致谢 :)
解决方案
推荐阅读
- reporting-services - 如何在 SSRS 2017 中隐藏帮助菜单
- javascript - 单击按钮后使用 jscolor.js
- java - 有什么方法可以从 JEditorPane 上显示的网站获取响应?
- model - UPPAAL SMC 激励示例
- azure - 在逻辑应用中限制 APIM IP 时无法通过 APIM 访问逻辑应用
- javascript - 与 >> 运算符的简单 for 循环之间的区别
- amazon-cognito - Auth0 作为前端登录 Cognito 用户
- c# - EntityFrameworkCore PostgreSQL Left Join with where not working
- rest - 如何测试服务器 API (REST),包括来自多个用户/客户端与 symfony 的交互?
- elasticsearch - 如何搜索不在特定地理区域内的文档?