Closed Wyctus closed 6 years ago
Hi, the example code you are using is customized for Bittrex, i.e def process_message might not be applicable to Cryptopia. Secondly the message handlers “uE” and “uS” are again Bittrex specific. In your case you should omit them and add “sendtradedataupdate”:
hub.client.on(“SendTradeDataUpdate”, on_message)
Thank you, it works now. How did you find out that the event name is 'SendTradeDataUpdate'? It seems a little bit strange, that the response is the same whether I use the on() method or not. Other strange thing is, that this returns only prices and can't find the orderbook stream. But this isn't closely related to your library.
Hi, I figured it out from your error message:
KeyError: 'SendTradeDataUpdate'
You use the on() method to register your message handler. I didn't understand completely what you meant by whether you use it or not.
About the output you are getting, I can't really comment on that since I am not familiar with Cryptopia's invokes and handlers.
Great, thank you!
@Wyctus could you share the working code??
My problem is that I'm unable to use the library with Cryptopia's websocket. Cryptopia's websocket is a totally undocumented, non-public websocket. It also uses signalR. The endpoint url is www.cryptopia.co.nz/signalr and the hub is called 'notificationHub'.
I just tried to modify the example code:
But I always get the following error:
File "some_path\signalr_aio\hubs_hub.py", line 43, in handle
What's the problem?