pub struct GetHistoricalVolatilityParams {
pub category: Category,
pub base_coin: Option<String>,
pub period: Option<u16>,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
}Expand description
Query params for Client::get_historical_volatility.
Covers: option only
Fields§
§category: CategoryProduct type. option.
base_coin: Option<String>Default: BTC.
period: Option<u16>Accepted values: 7, 14, 21, 30, 60, 90, 180, 270.
start_time: Option<Timestamp>The start timestamp (ms).
end_time: Option<Timestamp>The end timestamp (ms).
Implementations§
Source§impl GetHistoricalVolatilityParams
impl GetHistoricalVolatilityParams
Sourcepub fn new(category: Category) -> Self
pub fn new(category: Category) -> Self
Create with the required fields; set the optional ones with the with_* methods.
Sourcepub fn with_base_coin(self, v: impl Into<String>) -> Self
pub fn with_base_coin(self, v: impl Into<String>) -> Self
Set base_coin: default: BTC.
Sourcepub fn with_period(self, v: u16) -> Self
pub fn with_period(self, v: u16) -> Self
Set period: accepted values: 7, 14, 21, 30, 60, 90, 180, 270.
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).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GetHistoricalVolatilityParams
impl RefUnwindSafe for GetHistoricalVolatilityParams
impl Send for GetHistoricalVolatilityParams
impl Sync for GetHistoricalVolatilityParams
impl Unpin for GetHistoricalVolatilityParams
impl UnsafeUnpin for GetHistoricalVolatilityParams
impl UnwindSafe for GetHistoricalVolatilityParams
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