Module rate_limit

Source
Expand description

Rate limiting utilities Common rate limit handling for Binance API

Enums§

BinanceError
Binance-specific error types for rate limiting

Constants§

BINANCE_RATE_LIMITS
Rate limits for Binance API These rate limits are shared between API endpoints Converted to const array for compile-time evaluation

Functions§

extract_retry_after
Extract Retry-After header value from response headers
handle_rate_limit_error
Handle rate limit errors based on HTTP status code and headers
parse_order_count_headers
Parse order count headers from Binance response Headers are in format: X-MBX-ORDER-COUNT-{interval} where interval can be 1S, 10S, 1M, 1H, 1D
parse_used_weight_headers
Parse used weight headers from Binance response