pub struct TradeConfig {Show 14 fields
pub currency_pair: Option<CurrencyPair>,
pub base_tick_size: Option<String>,
pub quote_tick_size: Option<String>,
pub symbol: Option<String>,
pub exchange: Option<String>,
pub minimum_qty: Option<String>,
pub maximum_qty: Option<String>,
pub min_amount: Option<String>,
pub max_amount: Option<String>,
pub status: Option<String>,
pub pi_only: Option<bool>,
pub amount_tick_size: Option<String>,
pub price_protection_pct: Option<String>,
pub upstream_exchanges: Vec<String>,
}Fields§
§currency_pair: Option<CurrencyPair>交易货币对
base_tick_size: Option<String>基础货币的数量精度,例如 0.0005
quote_tick_size: Option<String>报价货币的价格精度,例如 0.02
symbol: Option<String>交易代码,eg.BTCUSD
exchange: Option<String>交易所(用于匹配,并不代表关联的真实交易所),eg.CRYPTO
minimum_qty: Option<String>最小委托数量
maximum_qty: Option<String>最大委托数量
min_amount: Option<String>最小委托金额
max_amount: Option<String>最大委托金额
status: Option<String>交易对状态,详见TradeConfigStatus
pi_only: Option<bool>是否仅支持PI(专业投资者)用户交易,true:仅支持PI用户交易,false:所有用户均可交易
amount_tick_size: Option<String>金额的精度,例如 0.00000001
price_protection_pct: Option<String>价格保护百分比Price Protection Percentage,例如 3.5%的值为0.035
upstream_exchanges: Vec<String>支持的上游交易所列表,eg.Coinbase,DDex,PantherTrade,HashKey
Implementations§
Source§impl TradeConfig
impl TradeConfig
Sourcepub fn base_tick_size(&self) -> &str
pub fn base_tick_size(&self) -> &str
Returns the value of base_tick_size, or the default value if base_tick_size is unset.
Sourcepub fn quote_tick_size(&self) -> &str
pub fn quote_tick_size(&self) -> &str
Returns the value of quote_tick_size, or the default value if quote_tick_size is unset.
Sourcepub fn symbol(&self) -> &str
pub fn symbol(&self) -> &str
Returns the value of symbol, or the default value if symbol is unset.
Sourcepub fn exchange(&self) -> &str
pub fn exchange(&self) -> &str
Returns the value of exchange, or the default value if exchange is unset.
Sourcepub fn minimum_qty(&self) -> &str
pub fn minimum_qty(&self) -> &str
Returns the value of minimum_qty, or the default value if minimum_qty is unset.
Sourcepub fn maximum_qty(&self) -> &str
pub fn maximum_qty(&self) -> &str
Returns the value of maximum_qty, or the default value if maximum_qty is unset.
Sourcepub fn min_amount(&self) -> &str
pub fn min_amount(&self) -> &str
Returns the value of min_amount, or the default value if min_amount is unset.
Sourcepub fn max_amount(&self) -> &str
pub fn max_amount(&self) -> &str
Returns the value of max_amount, or the default value if max_amount is unset.
Sourcepub fn status(&self) -> &str
pub fn status(&self) -> &str
Returns the value of status, or the default value if status is unset.
Sourcepub fn pi_only(&self) -> bool
pub fn pi_only(&self) -> bool
Returns the value of pi_only, or the default value if pi_only is unset.
Sourcepub fn amount_tick_size(&self) -> &str
pub fn amount_tick_size(&self) -> &str
Returns the value of amount_tick_size, or the default value if amount_tick_size is unset.
Sourcepub fn price_protection_pct(&self) -> &str
pub fn price_protection_pct(&self) -> &str
Returns the value of price_protection_pct, or the default value if price_protection_pct is unset.
Trait Implementations§
Source§impl Clone for TradeConfig
impl Clone for TradeConfig
Source§fn clone(&self) -> TradeConfig
fn clone(&self) -> TradeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TradeConfig
impl Debug for TradeConfig
Source§impl Default for TradeConfig
impl Default for TradeConfig
Source§impl Hash for TradeConfig
impl Hash for TradeConfig
Source§impl Message for TradeConfig
impl Message for TradeConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for TradeConfig
impl PartialEq for TradeConfig
impl Eq for TradeConfig
impl StructuralPartialEq for TradeConfig
Auto Trait Implementations§
impl Freeze for TradeConfig
impl RefUnwindSafe for TradeConfig
impl Send for TradeConfig
impl Sync for TradeConfig
impl Unpin for TradeConfig
impl UnsafeUnpin for TradeConfig
impl UnwindSafe for TradeConfig
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<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
§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
§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
key and return true if they are equal.