I’ve noticed when using the polygon websocket stream with minute data, the polygon python API is slow to react to the unsub/sub command sent via the python API - it looks like it won’t modify the subscription state until it receives data, which can be quite some time if it’s only subscribed to minute data.
I’m currently working around this by always having a seconds data subscription to TQQQ as a kind of keepalive, but I’m wondering if there’s something else I can do - even if that means moving websocket functionality to a different language - wondering if this is a quirk of python websockets - Any advice?