#[repr(C)]pub enum InstrumentClass {
Spot = 1,
Swap = 2,
Future = 3,
FutureSpread = 4,
Forward = 5,
Cfd = 6,
Bond = 7,
Option = 8,
OptionSpread = 9,
Warrant = 10,
SportsBetting = 11,
BinaryOption = 12,
}
Expand description
The instrument class.
Variants§
Spot = 1
A spot market instrument class. The current market price of an instrument that is bought or sold for immediate delivery and payment.
Swap = 2
A swap instrument class. A derivative contract through which two parties exchange the cash flows or liabilities from two different financial instruments.
Future = 3
A futures contract instrument class. A legal agreement to buy or sell an asset at a predetermined price at a specified time in the future.
FutureSpread = 4
A futures spread instrument class. A strategy involving the use of futures contracts to take advantage of price differentials between different contract months, underlying assets, or marketplaces.
Forward = 5
A forward derivative instrument class. A customized contract between two parties to buy or sell an asset at a specified price on a future date.
Cfd = 6
A contract-for-difference (CFD) instrument class. A contract between an investor and a CFD broker to exchange the difference in the value of a financial product between the time the contract opens and closes.
Bond = 7
A bond instrument class. A type of debt investment where an investor loans money to an entity (typically corporate or governmental) which borrows the funds for a defined period of time at a variable or fixed interest rate.
Option = 8
An options contract instrument class. A type of derivative that gives the holder the right, but not the obligation, to buy or sell an underlying asset at a predetermined price before or at a certain future date.
OptionSpread = 9
An option spread instrument class. A strategy involving the purchase and/or sale of options on the same underlying asset with different strike prices or expiration dates to capitalize on expected market moves in a controlled cost environment.
Warrant = 10
A warrant instrument class. A derivative that gives the holder the right, but not the obligation, to buy or sell a security—most commonly an equity—at a certain price before expiration.
SportsBetting = 11
A warrant instrument class. A derivative that gives the holder the right, but not the obligation, to buy or sell a security—most commonly an equity—at a certain price before expiration.
BinaryOption = 12
A binary option instrument class. A type of derivative where the payoff is either a fixed monetary amount or nothing, based on a yes/no proposition about an underlying event.
Implementations§
Trait Implementations§
Source§impl AsRef<str> for InstrumentClass
impl AsRef<str> for InstrumentClass
Source§impl Clone for InstrumentClass
impl Clone for InstrumentClass
Source§fn clone(&self) -> InstrumentClass
fn clone(&self) -> InstrumentClass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InstrumentClass
impl Debug for InstrumentClass
Source§impl<'de> Deserialize<'de> for InstrumentClass
impl<'de> Deserialize<'de> for InstrumentClass
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 InstrumentClass
impl Display for InstrumentClass
Source§impl FromStr for InstrumentClass
impl FromStr for InstrumentClass
Source§impl Hash for InstrumentClass
impl Hash for InstrumentClass
Source§impl IntoEnumIterator for InstrumentClass
impl IntoEnumIterator for InstrumentClass
type Iterator = InstrumentClassIter
fn iter() -> InstrumentClassIter ⓘ
Source§impl IntoPy<Py<PyAny>> for InstrumentClass
impl IntoPy<Py<PyAny>> for InstrumentClass
Source§impl Ord for InstrumentClass
impl Ord for InstrumentClass
Source§fn cmp(&self, other: &InstrumentClass) -> Ordering
fn cmp(&self, other: &InstrumentClass) -> 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 InstrumentClass
impl PartialEq for InstrumentClass
Source§impl PartialOrd for InstrumentClass
impl PartialOrd for InstrumentClass
Source§impl PyClass for InstrumentClass
impl PyClass for InstrumentClass
Source§impl PyClassImpl for InstrumentClass
impl PyClassImpl for InstrumentClass
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§type ThreadChecker = SendablePyClass<InstrumentClass>
type ThreadChecker = SendablePyClass<InstrumentClass>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
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>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature<InstrumentClass> for PyClassImplCollector<InstrumentClass>
impl PyClassNewTextSignature<InstrumentClass> for PyClassImplCollector<InstrumentClass>
fn new_text_signature(self) -> Option<&'static str>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a InstrumentClass
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a InstrumentClass
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut InstrumentClass
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut InstrumentClass
Source§impl PyMethods<InstrumentClass> for PyClassImplCollector<InstrumentClass>
impl PyMethods<InstrumentClass> for PyClassImplCollector<InstrumentClass>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for InstrumentClass
impl PyTypeInfo for InstrumentClass
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type or a subclass of this type.§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type.Source§impl Serialize for InstrumentClass
impl Serialize for InstrumentClass
Source§impl TryFrom<&str> for InstrumentClass
impl TryFrom<&str> for InstrumentClass
impl Copy for InstrumentClass
impl Eq for InstrumentClass
impl StructuralPartialEq for InstrumentClass
Auto Trait Implementations§
impl Freeze for InstrumentClass
impl RefUnwindSafe for InstrumentClass
impl Send for InstrumentClass
impl Sync for InstrumentClass
impl Unpin for InstrumentClass
impl UnwindSafe for InstrumentClass
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
§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
key
and return true
if they are equal.§impl<T> FromPyObject<'_> for Twhere
T: PyClass + Clone,
impl<T> FromPyObject<'_> for Twhere
T: PyClass + Clone,
§fn extract_bound(obj: &Bound<'_, PyAny>) -> Result<T, PyErr>
fn extract_bound(obj: &Bound<'_, PyAny>) -> Result<T, PyErr>
§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
§fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§impl<T> Separable for Twhere
T: Display,
impl<T> Separable for Twhere
T: Display,
Source§fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
SeparatorPolicy
. Read more