pub struct ExchangeInfoSymbol {
pub symbol: String,
pub status: Status,
pub base_asset: String,
pub base_asset_precision: usize,
pub quote_asset: String,
pub quote_precision: usize,
pub order_types: Vec<OrderType>,
pub iceberg_allowed: bool,
pub filters: Vec<Filter>,
pub permissions: Vec<Permission>,
}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.
base_asset_precision: usizeThe generic number of fractional digits in the secondary token. Do not use for the price scale!
quote_asset: StringThe primary token in the trading pair.
quote_precision: usizeThe generic number of fractional digits in the primary token. Do not use for the price scale!
order_types: Vec<OrderType>The order types allowed for the symbol.
iceberg_allowed: boolIf iceberd order is allowed for the symbol.
filters: Vec<Filter>The conditions Binance puts on the symbol.
permissions: Vec<Permission>The allowed trading methods like spot, margin, etc.
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 has_margin(&self) -> bool
pub fn has_margin(&self) -> bool
If margin trading is allowed for the symbol.
Sourcepub fn price_precision(&self) -> Option<u32>
pub fn price_precision(&self) -> Option<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) -> Option<u32>
pub fn quantity_precision(&self) -> Option<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>,
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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