pub struct ProductSymbol {
pub symbol: String,
pub status: Status,
pub base_asset: String,
pub quote_asset: String,
pub price_tick: Decimal,
pub quantity_tick: Decimal,
pub plan_to_open_market_time: Option<u64>,
}Expand description
The trading symbol data.
Fields§
§symbol: StringThe symbol name.
status: StatusThe symbol status on the exchange.
base_asset: StringThe secondary token in the trading pair.
quote_asset: StringThe primary token in the trading pair.
price_tick: DecimalThe price tick size.
quantity_tick: DecimalThe quantity tick size.
plan_to_open_market_time: Option<u64>The market open timestamp, if the symbol is not being traded yet.
Implementations§
Source§impl Symbol
impl Symbol
Sourcepub fn is_trading(&self) -> bool
pub fn is_trading(&self) -> bool
If the symbol is active and can be normally traded.
Sourcepub fn price_precision(&self) -> u32
pub fn price_precision(&self) -> u32
The number of fractional digits in the symbol price.
E.g. 0.000256 has 6 fractional digits.
E.g. 0.42 has 2 fractional digits.
Sourcepub fn quantity_precision(&self) -> u32
pub fn quantity_precision(&self) -> u32
The number of fractional digits in the symbol quantity.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Symbol
impl<'de> Deserialize<'de> for Symbol
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnwindSafe for Symbol
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more