standard-relayer-api icon indicating copy to clipboard operation
standard-relayer-api copied to clipboard

document websocket connection heartbeat interval

Open BlinkyStitt opened this issue 7 years ago • 2 comments

I am using python's aiohttp library to handle websockets instead of your typescript library because I am just building a quick prototype and I know python better than javascript/typescript.

I have the subscribe command working and returning a bunch of orders, but 60 seconds after connecting, I get an error about an unclosed client session.

After some tinkering, I realized that I need to enable heartbeats to keep the connection alive. I changed my command to be async with http_session.ws_connect(relay_url, heartbeat=30) as ws:.

Heartbeats being necessary (and their recommended interval) should probably be added to the docs.

BlinkyStitt avatar Jan 30 '18 01:01 BlinkyStitt

@WyseNynja which API are you connected to?

BMillman19 avatar Feb 01 '18 22:02 BMillman19

RadarRelay.

Side note: is there a list of all the public open relays somewhere?

BlinkyStitt avatar Feb 02 '18 01:02 BlinkyStitt