pub enum BitmexOrderType {
Market,
Limit,
Stop,
StopLimit,
MarketIfTouched,
LimitIfTouched,
Pegged,
}Expand description
Represents the available order types on BitMEX.
Variants§
Market
Market order, executed immediately at current market price.
Limit
Limit order, executed only at specified price or better.
Stop
Stop Market order, triggers a market order when price reaches stop price.
StopLimit
Stop Limit order, triggers a limit order when price reaches stop price.
MarketIfTouched
Market if touched order, triggers a market order when price reaches touch price.
LimitIfTouched
Limit if touched order, triggers a limit order when price reaches touch price.
Pegged
Pegged order, price automatically tracks market.
Implementations§
Source§impl BitmexOrderType
impl BitmexOrderType
Sourcepub fn try_from_order_type(value: OrderType) -> Result<Self>
pub fn try_from_order_type(value: OrderType) -> Result<Self>
Try to convert from Nautilus OrderType with anyhow::Result.
§Errors
Returns an error if the order type is MarketToLimit (not supported by BitMEX).
Trait Implementations§
Source§impl AsRef<str> for BitmexOrderType
impl AsRef<str> for BitmexOrderType
Source§impl Clone for BitmexOrderType
impl Clone for BitmexOrderType
Source§fn clone(&self) -> BitmexOrderType
fn clone(&self) -> BitmexOrderType
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 BitmexOrderType
impl Debug for BitmexOrderType
Source§impl<'de> Deserialize<'de> for BitmexOrderType
impl<'de> Deserialize<'de> for BitmexOrderType
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 BitmexOrderType
impl Display for BitmexOrderType
Source§impl From<BitmexOrderType> for OrderType
impl From<BitmexOrderType> for OrderType
Source§fn from(value: BitmexOrderType) -> Self
fn from(value: BitmexOrderType) -> Self
Converts to this type from the input type.
Source§impl FromStr for BitmexOrderType
impl FromStr for BitmexOrderType
Source§impl IntoEnumIterator for BitmexOrderType
impl IntoEnumIterator for BitmexOrderType
type Iterator = BitmexOrderTypeIter
fn iter() -> BitmexOrderTypeIter ⓘ
Source§impl PartialEq for BitmexOrderType
impl PartialEq for BitmexOrderType
Source§impl Serialize for BitmexOrderType
impl Serialize for BitmexOrderType
Source§impl TryFrom<&str> for BitmexOrderType
impl TryFrom<&str> for BitmexOrderType
Source§impl TryFrom<OrderType> for BitmexOrderType
impl TryFrom<OrderType> for BitmexOrderType
impl Copy for BitmexOrderType
impl Eq for BitmexOrderType
impl StructuralPartialEq for BitmexOrderType
Auto Trait Implementations§
impl Freeze for BitmexOrderType
impl RefUnwindSafe for BitmexOrderType
impl Send for BitmexOrderType
impl Sync for BitmexOrderType
impl Unpin for BitmexOrderType
impl UnsafeUnpin for BitmexOrderType
impl UnwindSafe for BitmexOrderType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.§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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> SetterInput<Owned> for T
impl<T> SetterInput<Owned> for T
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.