pub enum OrderType {
Market,
Limit,
Algorithmic,
Iceberg,
Conditional,
}Expand description
Type of an order for placement (orderType of the create and edit requests). The wire form is a digit as text.
The connector sends market and limit orders, and conditional orders for stop orders. The other types
are in the broker docs and need the optional parameters of OrderExtras. How a combination
behaves is described in the docs of the broker and is not verified against the live API.
§Examples
use brokapi_bcs_protocol::http::models::OrderType;
assert_eq!(serde_json::to_string(&OrderType::Limit)?, "\"2\"");
assert_eq!(serde_json::to_string(&OrderType::Conditional)?, "\"5\"");Variants§
Market
Market order ("1").
Limit
Limit order ("2").
Algorithmic
Algorithmic “good till date” order (timeInForce = 3).
Iceberg
Iceberg: visible is the shown quantity.
Conditional
Conditional: stop-loss and/or take-profit (stopPrice, takePrice, execution*Type, spread,
offset). Added to the docs after the first live runs. The connector uses it for stop orders.
Trait Implementations§
impl Copy for OrderType
Source§impl<'de> Deserialize<'de> for OrderType
impl<'de> Deserialize<'de> for OrderType
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
impl Eq for OrderType
impl StructuralPartialEq for OrderType
Auto Trait Implementations§
impl Freeze for OrderType
impl RefUnwindSafe for OrderType
impl Send for OrderType
impl Sync for OrderType
impl Unpin for OrderType
impl UnsafeUnpin for OrderType
impl UnwindSafe for OrderType
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
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
Checks if this value is equivalent to the given key. Read more
§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.