asterdex-sdk 0.1.4

AsterDex Futures SDK v3 — Rust async client for REST and WebSocket APIs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// US-003: ApiResponse wrapper — exposes rate-limit header values (ADR-005)

/// Wraps every REST response. Access typed body via `.data`, rate limits via `.used_weight`/`.order_count`.
#[derive(Debug)]
pub struct ApiResponse<T> {
    /// The typed response body
    pub data: T,
    /// X-MBX-USED-WEIGHT-1MINUTE header value (None if absent or non-numeric)
    pub used_weight: Option<u32>,
    /// X-MBX-ORDER-COUNT-1MINUTE header value (None if absent or non-numeric)
    pub order_count: Option<u32>,
}