Back to problems

Sliding-Window Order Message Rate Limiter

Algorithm · Akuna Capital · Medium

Requirements Create a class for trading-engine clients that limits the rate at which order messages are accepted over a continuously moving time interval. The class must provide: Configurable settings such as 100 order messages over 1 second or 500 order messages over 1 minute. A genuine moving window based on the preceding timeLimitWindow, rather than a set of fixed time buckets. Support for a single request that asks to send multiple messages at one timestamp. A method…

Checking your access…