my 2am routine: how i handle websocket drops overnight
hey all, night shift person here as usual. figured i'd share how i run things because i almost never see the market during "normal" hours and i've had to build around that.
my setup is pretty boring. i keep a small set of pairs, alerts fire to my phone, and i only actually touch things when something crosses a level i already wrote down before i started. the part that took me longest to sort out wasn't strategy at all, it was connection stuff. i used to get feed drops in the dead hours and wake up (or look up from a show) to find my chart was frozen and had been for who knows how long. nothing bad happened but the not-knowing was the worst part.
so now: heartbeat check every so often, and if the stream goes quiet longer than a set window i just kill everything and go flat rather than trust stale data. also i stopped keeping resting orders that i'm not willing to have filled while i'm making tea. if i wouldn't want it filled at a random moment, it doesn't go in.
the thing i still haven't solved is reconciliation after a reconnect. like, feed comes back, but is my local view of open orders actually the truth? i re-query positions on every reconnect but that feels clunky and i'm probably hammering endpoints for no reason.
how do you night people handle the gap between "i lost the stream" and "i know for sure what my account looks like"? do you trust the reconnect or do you always do a full state pull? curious if there's a saner pattern than what i'm doing.
not asking anyone what to trade, just process stuff. ☕