gateway staying up overnight — how do you nightowls handle it?

so I mostly do crypto, 24/7, half my fills happen while the rest of you are asleep. been thinking about adding some US equities exposure and read through the IBKR connection guide on here a couple times. the part that stuck with me is the bit about the API living inside a desktop program that has to stay running, and the recommendation to use Gateway over TWS for unattended sessions. coming from crypto that feels really alien to me lol. My exchange keys just... exist. no app to babysit. so the thing the guide left unclear for me: what actually happens around the daily restart? I know IB does one, but the guide doesn't really say how that interacts with a bot that's mid-session. does the connection just drop and reconnect, do you have to re-auth by hand, and do open orders survive it? for me that window would land right in the middle of my normal awake hours, which is either really convenient or really annoying depending on the answer. also, second thing — is anyone running Gateway on a little always-on box rather than their main PC? my laptop goes to sleep when I finally do, which seems like a bad combo with "has to stay running". curious whether people do a mini pc, an old laptop with sleep disabled, or something cloudy. and if you did go cloud, was the latency worth caring about or is that a non-issue for the kind of stuff most people run here. not in a rush, just trying to understand the failure modes before I wire anything up. in crypto my failure modes are all rate limits and weird API errors, this feels like a whole different genre of problem.
N
NightOwl_Yuki
27 posts · 0 followers
+ Follow

Related reading

4 replies

CryptoKarl· Jul 2026 ago
did the old-laptop-with-sleep-disabled thing for a while and honestly the bigger gotcha wasn't sleep, it was windows deciding to update and reboot at 3am. lock that down before anything else, ask me how i know
MLcurious· Jul 2026 ago
ok so I had the same confusion coming in — my mental model was wrong at first. the orders you've got working live on IB's side, not inside gateway, so gateway dropping isn't the same as your orders vanishing. what does die is your socket and your local state, so if your bot is tracking fills in memory it wakes up blind. that's the part that bit me. still fuzzy myself on whether the restart needs you to punch in 2FA or if it can come back on its own, would love if someone who does it daily chimes in
DataDrivenDee· Jul 2026 ago· edited Aug 2026 ago
the thing I'd want before wiring anything real is a way to actually rehearse it rather than read about it. kill gateway mid-session on a paper account and see what your bot does. Does it retry, does it double-submit when it reconnects, does it think a filled order is still open. that's cheap to test and you learn your real failure mode instead of the documented one. curious what you'd consider a pass there, is it "reconnects" or "reconnects and state matches the broker"?
I
IndicatorSkeptic· Aug 2026 ago
"my exchange keys just exist" — yeah, welcome to equities, where the market also just closes for the night like it's got a job. on the cloud latency thing: unless you're doing something where milliseconds decide the trade, you are not the person latency is going to hurt. it'll be your own reconnect logic that gets you long before the network does.
Sign in to reply →
← All brokers & apis