pub struct AddReduceMarginParams {
pub category: Category,
pub symbol: String,
pub margin: String,
pub position_idx: Option<PositionIdx>,
}Expand description
Parameters for adding or reducing margin.
Fields§
§category: CategoryProduct category.
symbol: StringTrading symbol.
margin: StringMargin amount (positive to add, negative to reduce).
position_idx: Option<PositionIdx>Position index.
Implementations§
Source§impl AddReduceMarginParams
impl AddReduceMarginParams
Sourcepub fn new(
category: Category,
symbol: impl Into<String>,
margin: impl Into<String>,
) -> Self
pub fn new( category: Category, symbol: impl Into<String>, margin: impl Into<String>, ) -> Self
Create new parameters.
Sourcepub fn position_idx(self, idx: PositionIdx) -> Self
pub fn position_idx(self, idx: PositionIdx) -> Self
Set position index.
Trait Implementations§
Source§impl Clone for AddReduceMarginParams
impl Clone for AddReduceMarginParams
Source§fn clone(&self) -> AddReduceMarginParams
fn clone(&self) -> AddReduceMarginParams
Returns a duplicate 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 AddReduceMarginParams
impl Debug for AddReduceMarginParams
Auto Trait Implementations§
impl Freeze for AddReduceMarginParams
impl RefUnwindSafe for AddReduceMarginParams
impl Send for AddReduceMarginParams
impl Sync for AddReduceMarginParams
impl Unpin for AddReduceMarginParams
impl UnwindSafe for AddReduceMarginParams
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