pub struct TradeTransInfo {
pub cmd: TradingCommand,
pub custom_comment: String,
pub expiration: u64,
pub offset: i32,
pub order: i32,
pub price: f64,
pub sl: f64,
pub symbol: String,
pub tp: f64,
pub type_: TransactionType,
pub volume: f64,
}Fields§
§cmd: TradingCommandOperation code
custom_comment: StringThe value the customer may provide in order to retrieve it later.
expiration: u64Pending order expiration time
offset: i32Trailing offset
order: i320 or position number for closing/modifications
price: f64Trade price
sl: f64Stop loss
symbol: StringTrade symbol
tp: f64Take profit
type_: TransactionTypeTrade transaction type
volume: f64Trade volume
Implementations§
Source§impl TradeTransInfo
impl TradeTransInfo
Sourcepub fn with_cmd(self, value: impl Into<TradingCommand>) -> Self
pub fn with_cmd(self, value: impl Into<TradingCommand>) -> Self
Sets the cmd field of this struct.
Sourcepub fn with_custom_comment(self, value: impl Into<String>) -> Self
pub fn with_custom_comment(self, value: impl Into<String>) -> Self
Sets the custom_comment field of this struct.
Sourcepub fn with_expiration(self, value: impl Into<u64>) -> Self
pub fn with_expiration(self, value: impl Into<u64>) -> Self
Sets the expiration field of this struct.
Sourcepub fn with_offset(self, value: impl Into<i32>) -> Self
pub fn with_offset(self, value: impl Into<i32>) -> Self
Sets the offset field of this struct.
Sourcepub fn with_order(self, value: impl Into<i32>) -> Self
pub fn with_order(self, value: impl Into<i32>) -> Self
Sets the order field of this struct.
Sourcepub fn with_price(self, value: impl Into<f64>) -> Self
pub fn with_price(self, value: impl Into<f64>) -> Self
Sets the price field of this struct.
Sourcepub fn with_symbol(self, value: impl Into<String>) -> Self
pub fn with_symbol(self, value: impl Into<String>) -> Self
Sets the symbol field of this struct.
Sourcepub fn with_type_(self, value: impl Into<TransactionType>) -> Self
pub fn with_type_(self, value: impl Into<TransactionType>) -> Self
Sets the type_ field of this struct.
Sourcepub fn with_volume(self, value: impl Into<f64>) -> Self
pub fn with_volume(self, value: impl Into<f64>) -> Self
Sets the volume field of this struct.
Trait Implementations§
Source§impl Clone for TradeTransInfo
impl Clone for TradeTransInfo
Source§fn clone(&self) -> TradeTransInfo
fn clone(&self) -> TradeTransInfo
Returns a copy of the value. Read more
1.0.0 · 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 TradeTransInfo
impl Debug for TradeTransInfo
Source§impl Default for TradeTransInfo
impl Default for TradeTransInfo
Source§fn default() -> TradeTransInfo
fn default() -> TradeTransInfo
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TradeTransInfo
impl<'de> Deserialize<'de> for TradeTransInfo
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
Source§impl PartialEq for TradeTransInfo
impl PartialEq for TradeTransInfo
Source§impl Serialize for TradeTransInfo
impl Serialize for TradeTransInfo
impl StructuralPartialEq for TradeTransInfo
Auto Trait Implementations§
impl Freeze for TradeTransInfo
impl RefUnwindSafe for TradeTransInfo
impl Send for TradeTransInfo
impl Sync for TradeTransInfo
impl Unpin for TradeTransInfo
impl UnwindSafe for TradeTransInfo
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)