Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BitMEXWebsocket error #148

Closed
spoonwzd opened this issue Aug 14, 2018 · 13 comments
Closed

BitMEXWebsocket error #148

spoonwzd opened this issue Aug 14, 2018 · 13 comments

Comments

@spoonwzd
Copy link

spoonwzd commented Aug 14, 2018

I'm a new user trying to get Market Maker to work.

Have tried on both Ubuntu and Windows with Python v3.5 / 3.6 / 3.7 all with the same result:

2018-08-14 22:26:00,751 - INFO - market_maker - BitMEX Market Maker Version: v1.4

2018-08-14 22:26:00,766 - INFO - ws_thread - Connecting to wss://testnet.bitmex.com/realtime?subscribe=quote:XBTUSD,trade:XBTUSD,instrument,order:XBTUSD,execution:XBTUSD,margin,position
2018-08-14 22:26:00,766 - INFO - ws_thread - Authenticating with API Key.
2018-08-14 22:26:00,766 - INFO - ws_thread - Started thread
2018-08-14 22:26:01,001 - ERROR - _logging - error from callback <bound method BitMEXWebsocket.__on_open of <market_maker.ws.ws_thread.BitMEXWebsocket object at 0x000002317E1452E8>>: __on_open() missing 1 required positional argument: 'ws'
2018-08-14 22:26:01,001 - ERROR - _logging - error from callback <bound method BitMEXWebsocket.__on_message of <market_maker.ws.ws_thread.BitMEXWebsocket object at 0x000002317E1452E8>>: __on_message() missing 1 required positional argument: 'message'

...and then it repeats the missing positional argument line forever more.

My Google-fu is failing me. Anyone have any ideas?

@LF76
Copy link

LF76 commented Aug 15, 2018

I second this. Happens as above on Ubuntu 18.

@wschneller
Copy link

wschneller commented Aug 15, 2018

I third this, having the same problem on windows 10.

EDIT: I've now made some progress and can get it to run consistently on my windows 10 laptop in a janky way, I still can't get it to work on an ubuntu 16.04 ec2 instance however.

I created a file in the directory above the working directory where I ran 'marketmaker setup', all the file is is

import market_maker.market_maker
market_maker.run()

I had an issue running it in anaconda prompt using a conda env that had everything installed in it, but running this file in anaconda prompt after deactivating the env is working.

@strat123123
Copy link

strat123123 commented Aug 16, 2018

Exactly the same problem for me on OSX El Capitan version 10.11.6.

@TradeFab
Copy link

Same issue on macOS High Sierra 10.13.6, and Windows 10

@TradeFab
Copy link

so it's just broken, and I assume nobody will/can fix ...

@noobsworld
Copy link

Same issue in Ubuntu 16.04/18.04, was working before , triggered when i made some changes to my config parameters not related to the web-socket, issues persists even if i revert my changes

@Cruisererick
Copy link

Any updates on this issue?

@faustiandilemma
Copy link

For what it's worth, if you take a look at https://github.com/BitMEX/api-connectors/blob/master/official-ws/python/bitmex_websocket.py you'll see that there is a positional argument for 'message' on line 107. Putting that into the ws_thread.py no longer gets the error above but now it's giving me the following error instead:

Traceback (most recent call last):
File "/Users/wahabkazi/mm_test/sample-market-maker-master/market_maker/ws/ws_thread.py", line 38, in del
self.exit()
File "/Users/wahabkazi/mm_test/sample-market-maker-master/market_maker/ws/ws_thread.py", line 140, in exit
self.ws.close()
AttributeError: 'BitMEXWebsocket' object has no attribute 'ws'

@wschneller
Copy link

wschneller commented Aug 19, 2018

I've gotten it fully working now on windows 10 and ubuntu 16.04 using a conda enviroment with python 3.6. I'm pretty sure someone updated the pip installed version of the bitmex-market-maker, but I'm new to github so I'm not sure how to check. Also I'm pretty sure the issue causing this is a result of whatever bitmex websocket version is coming with the bitmex-market-maker pip install right now. Anyway, this is how I made it work.

how to:
1.) create enviroment with python 3.6
2.) pip install bitmex-market-maker
3.) pip install bitmex-ws
4.) navigate to a working directory, run 'marketmaker setup', update the settings.py file with your api info
5.) to run do 'marketmaker XBTUSD'
(not list format 'marketmaker [XBTUSD]' as mentioned in the getting started section)

@oisinmacgiollachuda
Copy link

The [XBTUSD] part is an optional parameter (hence the square brackets), meaning if you leave it out it will run with the default (which is XBTUSD)

@spoonwzd
Copy link
Author

The missing part was 'pip install bitmex-ws'

Thanks @wschneller !

@NogbadTheBad1
Copy link

The missing part was 'pip install bitmex-ws'

Thanks @wschneller !

Yeah this is it. This should be in the readme. Thanks!

@AkshaySapra
Copy link

AkshaySapra commented Apr 25, 2020

Im surprised they havent resolved this issue yet in 2 years. Makes me wonder if they are capable of anything big. 'pip install bitmex-ws' is the easy solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests