#[repr(u8)]pub enum TradingCommand {
Buy = 0,
Sell = 1,
BuyLimit = 2,
SellLimit = 3,
BuyStop = 4,
SellStop = 5,
Balance = 6,
Credit = 7,
}
Expand description
Enum representing different types of trading actions
Variants§
Buy = 0
Buy
Sell = 1
Sell
BuyLimit = 2
Buy limit
SellLimit = 3
Sell limit
BuyStop = 4
Buy stop
SellStop = 5
Sell stop
Balance = 6
Read only. Used in getTradesHistory for manager’s deposit/withdrawal operations (profit>0 for deposit, profit<0 for withdrawal).
Credit = 7
Read only
Trait Implementations§
Source§impl Clone for TradingCommand
impl Clone for TradingCommand
Source§fn clone(&self) -> TradingCommand
fn clone(&self) -> TradingCommand
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 TradingCommand
impl Debug for TradingCommand
Source§impl Default for TradingCommand
impl Default for TradingCommand
Source§fn default() -> TradingCommand
fn default() -> TradingCommand
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TradingCommand
impl<'de> Deserialize<'de> for TradingCommand
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 From<TradingCommand> for u8
impl From<TradingCommand> for u8
Source§fn from(enum_value: TradingCommand) -> Self
fn from(enum_value: TradingCommand) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TradingCommand
impl PartialEq for TradingCommand
Source§impl Serialize for TradingCommand
impl Serialize for TradingCommand
Source§impl TryFrom<u8> for TradingCommand
impl TryFrom<u8> for TradingCommand
Source§type Error = TryFromPrimitiveError<TradingCommand>
type Error = TryFromPrimitiveError<TradingCommand>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for TradingCommand
impl TryFromPrimitive for TradingCommand
const NAME: &'static str = "TradingCommand"
type Primitive = u8
type Error = TryFromPrimitiveError<TradingCommand>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for TradingCommand
impl StructuralPartialEq for TradingCommand
Auto Trait Implementations§
impl Freeze for TradingCommand
impl RefUnwindSafe for TradingCommand
impl Send for TradingCommand
impl Sync for TradingCommand
impl Unpin for TradingCommand
impl UnwindSafe for TradingCommand
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