pub struct RateLimitInfo {
pub retry_after_ms: Option<u64>,
pub limit: Option<u64>,
pub remaining: Option<u64>,
pub reset_epoch: Option<u64>,
pub binance_order_count_1m: Option<u64>,
pub binance_order_count_1s: Option<u64>,
pub binance_used_weight_1m: Option<u64>,
pub binance_used_weight_1s: Option<u64>,
pub coinbase_remaining: Option<u64>,
pub coinbase_limit: Option<u64>,
pub coinbase_reset: Option<u64>,
}Expand description
Comprehensive rate limit information from exchange headers
Fields§
§retry_after_ms: Option<u64>Retry after in milliseconds (for backward compatibility)
limit: Option<u64>Generic rate limit information Maximum number of requests allowed
remaining: Option<u64>Number of requests remaining in the current window
reset_epoch: Option<u64>Epoch timestamp when the rate limit resets
binance_order_count_1m: Option<u64>Binance specific rate limits Orders placed in the last 1 minute
binance_order_count_1s: Option<u64>Orders placed in the last 1 second
binance_used_weight_1m: Option<u64>Request weight used in the last 1 minute
binance_used_weight_1s: Option<u64>Request weight used in the last 1 second
coinbase_remaining: Option<u64>Coinbase specific rate limits Remaining requests for Coinbase API
coinbase_limit: Option<u64>Maximum requests allowed for Coinbase API
coinbase_reset: Option<u64>Epoch timestamp when Coinbase rate limit resets
Implementations§
Source§impl RateLimitInfo
impl RateLimitInfo
Sourcepub const fn get_retry_after_ms(&self) -> Option<u64>
pub const fn get_retry_after_ms(&self) -> Option<u64>
Get retry after milliseconds for backward compatibility
Sourcepub fn is_approaching_limit(&self) -> bool
pub fn is_approaching_limit(&self) -> bool
Check if any rate limits are approaching the limit (> 80% usage)
Trait Implementations§
Source§impl Clone for RateLimitInfo
impl Clone for RateLimitInfo
Source§fn clone(&self) -> RateLimitInfo
fn clone(&self) -> RateLimitInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RateLimitInfo
impl Debug for RateLimitInfo
Source§impl Default for RateLimitInfo
impl Default for RateLimitInfo
Source§fn default() -> RateLimitInfo
fn default() -> RateLimitInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RateLimitInfo
impl RefUnwindSafe for RateLimitInfo
impl Send for RateLimitInfo
impl Sync for RateLimitInfo
impl Unpin for RateLimitInfo
impl UnwindSafe for RateLimitInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more