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.
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.