pub struct GetOpenInterestParams {
pub category: Category,
pub symbol: String,
pub interval_time: IntervalTime,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub limit: Option<u64>,
pub cursor: Option<String>,
}Expand description
Query params for Client::get_open_interest.
Covers: linear / inverse
Fields§
§category: CategoryProduct type. linear, inverse.
symbol: StringSymbol name, like BTCUSDT, uppercase only.
interval_time: IntervalTimeInterval time. 5min, 15min, 30min, 1h, 4h, 1d.
start_time: Option<Timestamp>The start timestamp (ms).
end_time: Option<Timestamp>The end timestamp (ms).
limit: Option<u64>Max 200. Default 50.
cursor: Option<String>Cursor. Used to paginate.
Implementations§
Source§impl GetOpenInterestParams
impl GetOpenInterestParams
Sourcepub fn new(
category: Category,
symbol: impl Into<String>,
interval_time: IntervalTime,
) -> Self
pub fn new( category: Category, symbol: impl Into<String>, interval_time: IntervalTime, ) -> Self
Create with the required fields; set the optional ones with the with_* methods.
Sourcepub fn with_start_time(self, v: Timestamp) -> Self
pub fn with_start_time(self, v: Timestamp) -> Self
Set start_time: the start timestamp (ms).
Sourcepub fn with_end_time(self, v: Timestamp) -> Self
pub fn with_end_time(self, v: Timestamp) -> Self
Set end_time: the end timestamp (ms).
Sourcepub fn with_limit(self, v: u64) -> Self
pub fn with_limit(self, v: u64) -> Self
Set limit: max 200. Default 50.
Sourcepub fn with_cursor(self, v: impl Into<String>) -> Self
pub fn with_cursor(self, v: impl Into<String>) -> Self
Set cursor: cursor. Used to paginate.
Trait Implementations§
Source§impl Clone for GetOpenInterestParams
impl Clone for GetOpenInterestParams
Source§impl Debug for GetOpenInterestParams
impl Debug for GetOpenInterestParams
Auto Trait Implementations§
impl Freeze for GetOpenInterestParams
impl RefUnwindSafe for GetOpenInterestParams
impl Send for GetOpenInterestParams
impl Sync for GetOpenInterestParams
impl Unpin for GetOpenInterestParams
impl UnsafeUnpin for GetOpenInterestParams
impl UnwindSafe for GetOpenInterestParams
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