Expand description
Request weights against Hyperliquid’s rate limit (the docs’ “Rate limits and user limits”), the last minute’s spend, and the gate a 429 closes. No clock and no I/O: every call is handed the time.
Structs§
Constants§
- BASE_
COOLDOWN_ MS - The first cooldown a 429 closes the gate for; each strike doubles it.
- LIMIT
- Weight a minute per IP, reads and actions together.
- MAX_
COOLDOWN_ MS - The longest cooldown a strike sets, though a
Retry-Aftermay ask longer. - SOFT
- What reads may spend of
LIMITa minute before they wait. The last fifth is left to actions, which never wait, and to other clients on the same IP. - WINDOW_
MS - The window every figure here is over.
Functions§
- action_
weight - An action batching
batchedorders, cancels or modifies: 1, plus 1 per 40. - base_
weight - An
/inforead’s weight before counting what it returns. - per_
items - For the reads that charge for what they return: how many items add one unit of weight.
- read_
weight - A read of
kindthat returneditems.