pub struct SetAutoAddMarginRequest {
pub category: Category,
pub symbol: String,
pub auto_add_margin: i32,
pub position_idx: Option<PositionIdx>,
}Expand description
Request body of POST /v5/position/set-auto-add-margin (Client::set_auto_add_margin).
Fields§
§category: Categorylinear, inverse
symbol: StringSymbol name, like BTCUSDT, uppercase only.
auto_add_margin: i320: false, 1: true
position_idx: Option<PositionIdx>Used to identify positions in different position modes. For hedge mode position, this param is required 0: one-way mode 1: hedge-mode Buy side 2: hedge-mode Sell side.
Implementations§
Source§impl SetAutoAddMarginRequest
impl SetAutoAddMarginRequest
Sourcepub fn new(category: Category, symbol: impl Into<String>, enabled: bool) -> Self
pub fn new(category: Category, symbol: impl Into<String>, enabled: bool) -> Self
Create with the required fields; set the optional ones with the with_* methods.
Sourcepub fn with_position_idx(self, v: PositionIdx) -> Self
pub fn with_position_idx(self, v: PositionIdx) -> Self
Set position_idx: used to identify positions in different position modes. For hedge mode position, this param is required 0: one-way mode 1: hedge-mode Buy side 2: hedge-mode Sell side.
Trait Implementations§
Source§impl Clone for SetAutoAddMarginRequest
impl Clone for SetAutoAddMarginRequest
Source§impl Debug for SetAutoAddMarginRequest
impl Debug for SetAutoAddMarginRequest
Auto Trait Implementations§
impl Freeze for SetAutoAddMarginRequest
impl RefUnwindSafe for SetAutoAddMarginRequest
impl Send for SetAutoAddMarginRequest
impl Sync for SetAutoAddMarginRequest
impl Unpin for SetAutoAddMarginRequest
impl UnsafeUnpin for SetAutoAddMarginRequest
impl UnwindSafe for SetAutoAddMarginRequest
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