BitMEX / api-connectors

Libraries for connecting to the BitMEX API.
https://www.bitmex.com/app/restAPI
909 stars 798 forks source link

WS Connection to Delta Server? #254

Open bitnom opened 5 years ago

bitnom commented 5 years ago

I am trying to connect with Python client (Websockets) to Delta server. Is it only REST? I keep getting:

2018-10-07 04:49:06,953 - bitmex_websocket - INFO - Connecting to wss://localhost:4444/realtime?subscribe=execution:XBTUSD,instrument:XBTUSD,order:XBTUSD,orderBookL2:XBTUSD,position:XBTUSD,quote:XBTUSD,trade:XBTUSD,margin
2018-10-07 04:49:06,953 - bitmex_websocket - INFO - Not authenticating.
2018-10-07 04:49:06,973 - bitmex_websocket - ERROR - Error : EOF occurred in violation of protocol (_ssl.c:1045)
2018-10-07 04:49:06,973 - websocket - ERROR - error from callback <bound method BitMEXWebsocket.__on_error of <bitmex_websocket.BitMEXWebsocket object at 0x7fa94e4ecf60>>: EOF occurred in violation of protocol (_ssl.c:1045)
2018-10-07 04:49:06,975 - bitmex_websocket - INFO - Websocket Closed

Was hoping to use WS with Delta

CoreyNelson commented 5 years ago

Yes, it is REST only. It uses websockets to get data from Bitmex so that you can make unlimited REST calls to the Delta Server.

LooOOooM commented 3 years ago

Is there a program around with kind of "restream" the websocket in order to have our own websocket. The reason I am interested in is that I am running three WS Clients connecting all to realnet, however after a time one gets always out of sync as discripted in other issues already. Therefore I just want to have a like a websocket proxy in between my Tradebots and the bitmexwebsocket in order to have the possibility to restart it in case of problems rather then restarting my whole bot environment.