pub struct CryptoTradeConfig {
pub symbol: String,
pub exchange: String,
pub pi_only: bool,
pub tick_size_nano: i64,
pub min_trade_qty_nano: i64,
pub max_trade_qty_nano: i64,
pub qty_increment_nano: i64,
}Expand description
Crypto 交易配置缓存。
C++ INNData_Trd_CryptoTradeConfig 以 (broker_id, symbol, exchange) 作为
lookup key,MaxBuySellQty 投影用 minimum_qty 和 base_tick_size 做数量
步进对齐。这里保存解析后的 nano 整数,避免每个 surface 自己解析 decimal。
Fields§
§symbol: String§exchange: String§pi_only: bool§tick_size_nano: i64§min_trade_qty_nano: i64§max_trade_qty_nano: i64§qty_increment_nano: i64Trait Implementations§
Source§impl Clone for CryptoTradeConfig
impl Clone for CryptoTradeConfig
Source§fn clone(&self) -> CryptoTradeConfig
fn clone(&self) -> CryptoTradeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CryptoTradeConfig
impl Debug for CryptoTradeConfig
Source§impl Default for CryptoTradeConfig
impl Default for CryptoTradeConfig
Source§fn default() -> CryptoTradeConfig
fn default() -> CryptoTradeConfig
Returns the “default value” for a type. Read more
impl Eq for CryptoTradeConfig
Source§impl PartialEq for CryptoTradeConfig
impl PartialEq for CryptoTradeConfig
Source§fn eq(&self, other: &CryptoTradeConfig) -> bool
fn eq(&self, other: &CryptoTradeConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CryptoTradeConfig
Auto Trait Implementations§
impl Freeze for CryptoTradeConfig
impl RefUnwindSafe for CryptoTradeConfig
impl Send for CryptoTradeConfig
impl Sync for CryptoTradeConfig
impl Unpin for CryptoTradeConfig
impl UnsafeUnpin for CryptoTradeConfig
impl UnwindSafe for CryptoTradeConfig
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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