Skip to main content

asterdex_sdk/rest/
response.rs

1// US-003: ApiResponse wrapper — exposes rate-limit header values (ADR-005)
2
3/// Wraps every REST response. Access typed body via `.data`, rate limits via `.used_weight`/`.order_count`.
4#[derive(Debug)]
5pub struct ApiResponse<T> {
6    /// The typed response body
7    pub data: T,
8    /// X-MBX-USED-WEIGHT-1MINUTE header value (None if absent or non-numeric)
9    pub used_weight: Option<u32>,
10    /// X-MBX-ORDER-COUNT-1MINUTE header value (None if absent or non-numeric)
11    pub order_count: Option<u32>,
12}