Expand description
Rate limiters for the Hyperliquid REST API.
§IP-based (RestRateLimiter)
Tracks an aggregated weight budget of 1 200 per minute in a 60-second sliding window.
§Address-based (AddressRateLimiter)
Tracks the per-address action budget. Each address starts with 10 000 requests and accrues
1 request per 1 USDC traded. When exhausted, 1 request is allowed every 10 seconds.
Cancels use a higher limit: min(limit + 100_000, limit * 2).
A batch of n orders/cancels counts as n requests against this limit.
§Interface
Both limiters share the same interface:
acquire(...)→Result<(), RateLimitError>— returnsErrimmediately if throttled.acquire_blocking(...)— retries onErr, logging each wait viatracing::warn.
Structs§
- Address
Rate Limiter - Tracks the per-address action budget.
- Rate
Limit Error - Rest
Rate Limiter