-
Notifications
You must be signed in to change notification settings - Fork 4
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
Websockets not working #5
Comments
same here... |
The way they use the websocket-client does not work anymore in the version 2 of the cobinhood websocket. If you still looking into implementing one yourself, create a new thread that calls the receive function of the ws client. Also make sure to ping the server every 60sec or the connection will be drooped. Also if you are looking into using the ticker, that does not work well either, however the orderbook does. |
Sorry, I am new to programming and still can not figure out how to get an orderbook using websocket. I realized that the library no longer works, do you happen to have some alternative method? Or, perhaps, you can show sample code, how can I get an order book using only the websocket library. I can’t find exactly the sample code anywhere, and unfortunately, the information from the official site is not enough for me. If it's not too much trouble, can you help me? |
Sure, write me a email, otherwise I might forget it ... |
I tried to initiate a websocket connection using the following example you have posted into your README:
def openTickerStream():
cob = Cobinhood()
cobeth_orderbook = Orderbook('COB-ETH')
cob.ws.start(subscribe=[cobeth_orderbook], on_message=on_message)
def on_message(cob_obj, msg):
print (cob_obj.system.get_time())
print (cob_obj.ws.exchange_data.orderbook)
print (msg)
Using this code, there is no response at all. Maybe the websocket endpoint is outdated?
The text was updated successfully, but these errors were encountered: