BitMEX / sample-market-maker

Sample BitMEX Market Making Bot
Apache License 2.0
1.7k stars 757 forks source link

Sample market-maker stopping at "Connected to WS. Waiting for data images, this may take a moment..." #233

Closed ocwendel closed 2 years ago

ocwendel commented 2 years ago

Hi,

I'm trying to run the sample market maker, but it doesn't respond after "Connected to WS. Waiting for data images, this may take a moment..." Any suggestions on what could be wrong and potential fixes? Thank you so much!

Importing symbol settings for XBTUSD... Unable to find settings-XBTUSD.py. 2022-03-10 07:35:56,901 - INFO - market_maker - BitMEX Market Maker Version: v1.1

2022-03-10 07:35:56,902 - INFO - ws_thread - Connecting to wss://testnet.bitmex.com/realtime?subscribe=quote:XBTUSD,trade:XBTUSD,instrument,order:XBTUSD,execution:XBTUSD,margin,position 2022-03-10 07:35:56,902 - INFO - ws_thread - Authenticating with API Key. 2022-03-10 07:35:56,903 - INFO - ws_thread - Started thread Exception in thread Thread-1: Traceback (most recent call last): File "/Users/olechristianwendel/Desktop/anna2.0/venv/lib/python3.8/site-packages/websocket/_app.py", line 424, in _callback callback(self, *args) TypeError: __on_open() takes 1 positional argument but 2 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/olechristianwendel/Desktop/anna2.0/venv/lib/python3.8/site-packages/websocket/_app.py", line 336, in run_forever self._callback(self.on_open) File "/Users/olechristianwendel/Desktop/anna2.0/venv/lib/python3.8/site-packages/websocket/_app.py", line 429, in _callback self.on_error(self, e) TypeError: __on_error() takes 2 positional arguments but 3 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/olechristianwendel/Desktop/anna2.0/venv/lib/python3.8/site-packages/websocket/_app.py", line 424, in _callback callback(self, *args) TypeError: __on_error() takes 2 positional arguments but 3 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/Users/olechristianwendel/Desktop/anna2.0/venv/lib/python3.8/site-packages/market_maker/ws/ws_thread.py", line 163, in self.wst = threading.Thread(target=lambda: self.ws.run_forever(sslopt=sslopt_ca_certs)) File "/Users/olechristianwendel/Desktop/anna2.0/venv/lib/python3.8/site-packages/websocket/_app.py", line 386, in run_forever self._callback(self.on_error, e) File "/Users/olechristianwendel/Desktop/anna2.0/venv/lib/python3.8/site-packages/websocket/_app.py", line 429, in _callback self.on_error(self, e) TypeError: __on_error() takes 2 positional arguments but 3 were given 2022-03-10 07:35:57,903 - INFO - ws_thread - Connected to WS. Waiting for data images, this may take a moment...

ocwendel commented 2 years ago

Resolved with: pip install bitmex-ws