After installed binance-futures-connector,binance-connector-python can not work
install new binance-connector-python(3.7.0) 2. install binance-futures-connector(4.0.0) 3. Run below code:
`from binance.websocket.spot.websocket_api import SpotWebsocketAPIClient
def message_handler(_, message): logging.info(message)
proxies = { 'http': 'http://1.2.3.4:8080' }
my_client = SpotWebsocketAPIClient(on_message=message_handler, proxies=proxies, timeout=10)
my_client.ticker(symbol="OPUSDT", type="FULL")
time.sleep(5) logging.info("closing ws connection") my_client.stop()`
Error:
Traceback (most recent call last):
File "E:\xx.py", line 10, in
futures-connector rewrite utils.py file?
The problem is that both dependencies share the same package name i.e. binance.
A quick fix is to change the order of installation:
- Remove both packages
- Install binance-futures-connector
- Install binance-connector
Hi @roc1 , I'm closing this issue as we published a brand new modularised version of the Python connector. Feel free to start using it and open a new issue if you encounter any problems.