HFT Rate Limiter: Token Bucket - Quant Developer Interview Question
Difficulty: Medium
Category: architecture & logic
Asked at: Jump Trading, Tower Research, Optiver, Citadel Securities, HRT
Topics: algorithms, system design, rate limiting, cpp
Problem Description
High-frequency trading systems utilize rate limiters to adhere to exchange protocols and prevent order rejection or penalties. The Token Bucket algorithm is a standard mechanism for this purpose, allowing for controlled burstiness while enforcing an average transmission rate. This approach ensures that order flow remains compliant with exchange limits by managing a finite supply of transmission tokens.
Task
Implement a token bucket rate limiter to process a stream of order requests. Given a buc
Practice this medium developer interview question on MyntBit - the LeetCode for quants with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.