【发布时间】:2022-08-10 13:42:29
【问题描述】:
我正在玩自动加密交易,并试图获得stellar 或XLM 加密货币的当前价格,并能够在Binance 上买卖它
我已决定使用并已安装python-binance。安装成功,然后我在控制台上打开 python 并运行以下行
from binance.client import Client
client = Client(\'heres my api key\',\'heres my api secret\')
我有一个错误
Traceback (most recent call last):
File \"<stdin>\", line 1, in <module>
File \"C:\\Users\\junya\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\binance\\__init__.py\", line 10, in <module>
from binance.depthcache import DepthCacheManager, OptionsDepthCacheManager, ThreadedDepthCacheManager # noqa
File \"C:\\Users\\junya\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\binance\\depthcache.py\", line 7, in <module>
from .streams import BinanceSocketManager
File \"C:\\Users\\junya\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\binance\\streams.py\", line 13, in <module>
from websockets.exceptions import ConnectionClosedError
ImportError: cannot import name \'ConnectionClosedError\' from \'websockets.exceptions\' (C:\\Users\\junya\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\websockets\\exceptions.py)
我该如何解决这个错误,或者这个库不再工作??? 谢谢
标签: python cryptography binance