xchange-stream
xchange-stream copied to clipboard
Add subscription to heartbeat channel on GDAX
I was not able to make GDAX trade subscription sustainable - for me it terminates every other day without any indication - websocket does not disconnect. You can emulate this by disconnecting the network after initial subscription has been established.
Checking if I've received any messages in the last n seconds would work, but seems hacky.
GDAX API docs indicate there is heartbeat channel to verify that connection is healthy, would be great to have that implemented. https://docs.gdax.com, search for 'heartbeat'
There is a new isAlive method in the streaming service - does it work?
Heartbeat pattern seems nice but someone need to make a research whether it's commonly supported feature by exchanges or GDAX is the only one.
I get the same disconnects. Some callback on disconnect would be appropriate. I think there also was some PR for automatic reconnect?