pub struct SwitchPositionModeParams {
pub category: Category,
pub symbol: Option<String>,
pub coin: Option<String>,
pub mode: i32,
}Expand description
Parameters for switching position mode.
Fields§
§category: CategoryProduct category.
symbol: Option<String>Trading symbol (for linear, required if coin is not set).
coin: Option<String>Coin (for inverse, required if symbol is not set).
mode: i32Position mode (0=one-way, 3=hedge).
Implementations§
Source§impl SwitchPositionModeParams
impl SwitchPositionModeParams
Sourcepub fn one_way_by_symbol(category: Category, symbol: impl Into<String>) -> Self
pub fn one_way_by_symbol(category: Category, symbol: impl Into<String>) -> Self
Create parameters for one-way mode with symbol.
Sourcepub fn hedge_by_symbol(category: Category, symbol: impl Into<String>) -> Self
pub fn hedge_by_symbol(category: Category, symbol: impl Into<String>) -> Self
Create parameters for hedge mode with symbol.
Sourcepub fn one_way_by_coin(category: Category, coin: impl Into<String>) -> Self
pub fn one_way_by_coin(category: Category, coin: impl Into<String>) -> Self
Create parameters for one-way mode with coin.
Sourcepub fn hedge_by_coin(category: Category, coin: impl Into<String>) -> Self
pub fn hedge_by_coin(category: Category, coin: impl Into<String>) -> Self
Create parameters for hedge mode with coin.
Trait Implementations§
Source§impl Clone for SwitchPositionModeParams
impl Clone for SwitchPositionModeParams
Source§fn clone(&self) -> SwitchPositionModeParams
fn clone(&self) -> SwitchPositionModeParams
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 SwitchPositionModeParams
impl Debug for SwitchPositionModeParams
Auto Trait Implementations§
impl Freeze for SwitchPositionModeParams
impl RefUnwindSafe for SwitchPositionModeParams
impl Send for SwitchPositionModeParams
impl Sync for SwitchPositionModeParams
impl Unpin for SwitchPositionModeParams
impl UnwindSafe for SwitchPositionModeParams
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