#[non_exhaustive]pub enum OrderTriggerCondition {
Default,
Inverse,
Bid,
Ask,
Mid,
Other(String),
}Expand description
Specification of which price component should be used when determining if an Order should be triggered and filled. This allows Orders to be triggered based on the bid, ask, mid, default (ask for buy, bid for sell) or inverse (ask for sell, bid for buy) price depending on the desired behaviour. Orders are always filled using their default price component. This feature is only provided through the REST API. Clients who choose to specify a non-default trigger condition will not see it reflected in any of OANDA’s proprietary or partner trading platforms, their transaction history or their account statements. OANDA platforms always assume that an Order’s trigger condition is set to the default value when indicating the distance from an Order’s trigger price, and will always provide the default trigger condition when creating or modifying an Order. A special restriction applies when creating a guaranteed Stop Loss Order. In this case the TriggerCondition value must either be “DEFAULT”, or the “natural” trigger side “DEFAULT” results in. So for a Stop Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for short trades “DEFAULT” and “ASK” are valid.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Default
DEFAULT.
Inverse
INVERSE.
Bid
BID.
Ask
ASK.
Mid
MID.
Other(String)
A value not (yet) known to this version of the SDK.
Implementations§
Trait Implementations§
Source§impl Clone for OrderTriggerCondition
impl Clone for OrderTriggerCondition
Source§fn clone(&self) -> OrderTriggerCondition
fn clone(&self) -> OrderTriggerCondition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OrderTriggerCondition
impl Debug for OrderTriggerCondition
Source§impl<'de> Deserialize<'de> for OrderTriggerCondition
impl<'de> Deserialize<'de> for OrderTriggerCondition
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for OrderTriggerCondition
impl Display for OrderTriggerCondition
impl Eq for OrderTriggerCondition
Source§impl From<&str> for OrderTriggerCondition
impl From<&str> for OrderTriggerCondition
Source§impl From<String> for OrderTriggerCondition
impl From<String> for OrderTriggerCondition
Source§impl FromStr for OrderTriggerCondition
impl FromStr for OrderTriggerCondition
Source§impl Hash for OrderTriggerCondition
impl Hash for OrderTriggerCondition
Source§impl PartialEq for OrderTriggerCondition
impl PartialEq for OrderTriggerCondition
Source§impl Serialize for OrderTriggerCondition
impl Serialize for OrderTriggerCondition
impl StructuralPartialEq for OrderTriggerCondition
Auto Trait Implementations§
impl Freeze for OrderTriggerCondition
impl RefUnwindSafe for OrderTriggerCondition
impl Send for OrderTriggerCondition
impl Sync for OrderTriggerCondition
impl Unpin for OrderTriggerCondition
impl UnsafeUnpin for OrderTriggerCondition
impl UnwindSafe for OrderTriggerCondition
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.