#[repr(C)]pub enum TimeInForce {
Gtc = 1,
Ioc = 2,
Fok = 3,
Gtd = 4,
Day = 5,
AtTheOpen = 6,
AtTheClose = 7,
}Expand description
The ‘Time in Force’ instruction for an order.
Variants§
Gtc = 1
Good Till Cancel (GTC) - Remains active until canceled.
Ioc = 2
Immediate or Cancel (IOC) - Executes immediately to the extent possible, with any unfilled portion canceled.
Fok = 3
Fill or Kill (FOK) - Executes in its entirety immediately or is canceled if full execution is not possible.
Gtd = 4
Good Till Date (GTD) - Remains active until the specified expiration date or time is reached.
Day = 5
Day - Remains active until the close of the current trading session.
AtTheOpen = 6
At the Opening (ATO) - Executes at the market opening or expires if not filled.
AtTheClose = 7
At the Closing (ATC) - Executes at the market close or expires if not filled.
Implementations§
Source§impl TimeInForce
impl TimeInForce
Trait Implementations§
Source§impl AsRef<str> for TimeInForce
impl AsRef<str> for TimeInForce
Source§impl Clone for TimeInForce
impl Clone for TimeInForce
Source§fn clone(&self) -> TimeInForce
fn clone(&self) -> TimeInForce
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TimeInForce
impl Debug for TimeInForce
Source§impl<'de> Deserialize<'de> for TimeInForce
impl<'de> Deserialize<'de> for TimeInForce
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>,
Source§impl Display for TimeInForce
impl Display for TimeInForce
Source§impl<'a, 'py> FromPyObject<'a, 'py> for TimeInForcewhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for TimeInForcewhere
Self: Clone,
Source§impl FromStr for TimeInForce
impl FromStr for TimeInForce
Source§impl Hash for TimeInForce
impl Hash for TimeInForce
Source§impl IntoEnumIterator for TimeInForce
impl IntoEnumIterator for TimeInForce
type Iterator = TimeInForceIter
fn iter() -> TimeInForceIter ⓘ
Source§impl<'py> IntoPyObject<'py> for TimeInForce
impl<'py> IntoPyObject<'py> for TimeInForce
Source§type Target = TimeInForce
type Target = TimeInForce
Source§type Output = Bound<'py, <TimeInForce as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <TimeInForce as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'py>>::Output, <Self as IntoPyObject<'py>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'py>>::Output, <Self as IntoPyObject<'py>>::Error>
Source§impl Ord for TimeInForce
impl Ord for TimeInForce
Source§fn cmp(&self, other: &TimeInForce) -> Ordering
fn cmp(&self, other: &TimeInForce) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TimeInForce
impl PartialEq for TimeInForce
Source§impl PartialOrd for TimeInForce
impl PartialOrd for TimeInForce
Source§impl PyClass for TimeInForce
impl PyClass for TimeInForce
Source§impl PyClassImpl for TimeInForce
impl PyClassImpl for TimeInForce
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// The 'Time in Force' instruction for an order.
const RAW_DOC: &'static CStr = /// The 'Time in Force' instruction for an order.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<TimeInForce as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<TimeInForce>
type Layout = <<TimeInForce as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<TimeInForce>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForTimeInForce
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
Source§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
Source§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for TimeInForce
impl PyClassNewTextSignature for TimeInForce
const TEXT_SIGNATURE: &'static str = "(value)"
Source§impl PyStubType for TimeInForce
impl PyStubType for TimeInForce
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
Source§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for TimeInForce
impl PyTypeInfo for TimeInForce
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Source§impl Serialize for TimeInForce
impl Serialize for TimeInForce
Source§impl TryFrom<&str> for TimeInForce
impl TryFrom<&str> for TimeInForce
impl Copy for TimeInForce
impl Eq for TimeInForce
impl StructuralPartialEq for TimeInForce
Auto Trait Implementations§
impl Freeze for TimeInForce
impl RefUnwindSafe for TimeInForce
impl Send for TimeInForce
impl Sync for TimeInForce
impl Unpin for TimeInForce
impl UnsafeUnpin for TimeInForce
impl UnwindSafe for TimeInForce
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.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§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>
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>
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 moreSource§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.Source§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
Source§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.