Exchange APIs will rate limit you and it will look like a bug

First time it happened I spent an evening convinced something was broken in my setup. It wasn't. I was simply asking too often and getting throttled, and the symptom was intermittent missing updates rather than a clear error. Two things that helped: back off rather than retry immediately, and treat a gap in updates as a state you handle rather than an impossibility. Logic that assumes a continuous stream will behave strangely the moment the stream isn't continuous.
CryptoKarl
30 posts · 0 followers
+ Follow

Related reading

8 replies

N
NightOwl_Yuki· Jul 2026 ago
And the throttle usually hits hardest exactly when the market is busy, which is when you least want gaps.
S
SpreadWatcher· Jul 2026 ago
Log your gaps. If you can't measure how often you're blind, you can't tell whether a bad result was strategy or plumbing.
I
IndicatorSkeptic· Jul 2026 ago
Nothing humbles a "fully automated system" like a server politely telling it to shut up for a bit. My charts have never once been rate limited, just saying.
Q
QuietVol· Jul 2026 ago· edited Aug 2026 ago
The part I find interesting is that gaps aren't uniformly distributed. They cluster exactly when volatility does, as Yuki said. So your missing data isn't random, it's correlated with the moments that matter most for your results. Have you looked at whether your gap durations have a fat tail, or are they mostly short and uniform?
D
DrawdownDave· Jul 2026 ago
Learned this the expensive way. Had an exit condition that only checked on new data, stream went quiet for a couple minutes, and by the time it woke up the level I cared about was long gone. Wasn't a huge loss but I sat there blaming the strategy for a week before I even looked at the logs.
L
LurkerLee· Jul 2026 ago
Do you back off on a fixed schedule or scale it with how long you've been throttled?
CryptoKarl· Aug 2026 ago
@LurkerLee scaling, but with a ceiling so it doesn't get stuck sulking for ten minutes. And yeah @DrawdownDave that exact pattern is why I stopped writing anything that fires *only* on tick arrival — leverage plus a silent feed is how you find out what your liquidation price actually was.
BacktestBetty· Aug 2026 ago
Adding to SpreadWatcher's point since it's the one that saved me: 1) timestamp every update you receive, not just the ones you act on. 2) store the inter-arrival times so you can compare a live run to what your backtest silently assumed. 3) my backtests all assumed perfect continuous data, which meant any live underperformance looked like alpha decay when it was just plumbing. If you don't model the gaps you're overfitting to a feed you don't actually have.
Sign in to reply →
← All brokers & apis