pub struct ComboTrade {
pub instrument_name: String,
pub amount: Option<f64>,
pub direction: String,
}Expand description
Trade input for creating a combo
Used as input to the create_combo endpoint to specify
the instruments and directions for each leg.
Fields§
§instrument_name: StringInstrument name for this trade
amount: Option<f64>Trade amount (optional). For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin.
direction: StringDirection of trade from the maker perspective: “buy” or “sell”
Implementations§
Source§impl ComboTrade
impl ComboTrade
Sourcepub fn new(
instrument_name: impl Into<String>,
direction: impl Into<String>,
amount: Option<f64>,
) -> Self
pub fn new( instrument_name: impl Into<String>, direction: impl Into<String>, amount: Option<f64>, ) -> Self
Creates a new combo trade
§Arguments
instrument_name- The instrument identifierdirection- Trade direction (“buy” or “sell”)amount- Optional trade amount
Trait Implementations§
Source§impl Clone for ComboTrade
impl Clone for ComboTrade
Source§fn clone(&self) -> ComboTrade
fn clone(&self) -> ComboTrade
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 ComboTrade
impl Debug for ComboTrade
Source§impl<'de> Deserialize<'de> for ComboTrade
impl<'de> Deserialize<'de> for ComboTrade
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 ComboTrade
impl PartialEq for ComboTrade
Source§impl Serialize for ComboTrade
impl Serialize for ComboTrade
impl StructuralPartialEq for ComboTrade
Auto Trait Implementations§
impl Freeze for ComboTrade
impl RefUnwindSafe for ComboTrade
impl Send for ComboTrade
impl Sync for ComboTrade
impl Unpin for ComboTrade
impl UnsafeUnpin for ComboTrade
impl UnwindSafe for ComboTrade
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