pub enum TradingCommand {
SubmitOrder(SubmitOrder),
SubmitOrderList(SubmitOrderList),
ModifyOrder(ModifyOrder),
ModifyOrders(BatchModifyOrders),
CancelOrder(CancelOrder),
CancelOrders(BatchCancelOrders),
CancelAllOrders(CancelAllOrders),
QueryOrder(QueryOrder),
QueryAccount(QueryAccount),
}Expand description
An execution command sent to an execution client.
Serializes as the contained command object. Deserialization requires its string type field to
select the variant.
Variants§
SubmitOrder(SubmitOrder)
SubmitOrderList(SubmitOrderList)
ModifyOrder(ModifyOrder)
ModifyOrders(BatchModifyOrders)
CancelOrder(CancelOrder)
CancelOrders(BatchCancelOrders)
CancelAllOrders(CancelAllOrders)
QueryOrder(QueryOrder)
QueryAccount(QueryAccount)
Implementations§
Source§impl TradingCommand
impl TradingCommand
pub const fn client_id(&self) -> Option<ClientId>
Sourcepub const fn instrument_id(&self) -> InstrumentId
pub const fn instrument_id(&self) -> InstrumentId
Returns the instrument ID for the command.
§Panics
Panics if the command is QueryAccount which does not have an instrument ID.
pub const fn ts_init(&self) -> UnixNanos
pub const fn strategy_id(&self) -> Option<StrategyId>
pub const fn params(&self) -> Option<&Params>
Trait Implementations§
Source§impl Clone for TradingCommand
impl Clone for TradingCommand
Source§impl Debug for TradingCommand
impl Debug for TradingCommand
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 Display for TradingCommand
impl Display for TradingCommand
impl Eq for TradingCommand
Source§impl PartialEq for TradingCommand
impl PartialEq for TradingCommand
Source§impl Serialize for TradingCommand
impl Serialize 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 UnsafeUnpin for TradingCommand
impl UnwindSafe for TradingCommand
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more