#[repr(C)]pub struct Equity {Show 17 fields
pub id: InstrumentId,
pub raw_symbol: Symbol,
pub isin: Option<Ustr>,
pub currency: Currency,
pub price_precision: u8,
pub price_increment: Price,
pub margin_init: Decimal,
pub margin_maint: Decimal,
pub maker_fee: Decimal,
pub taker_fee: Decimal,
pub lot_size: Option<Quantity>,
pub max_quantity: Option<Quantity>,
pub min_quantity: Option<Quantity>,
pub max_price: Option<Price>,
pub min_price: Option<Price>,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
}
Expand description
Represents a generic equity instrument.
Fields§
§id: InstrumentId
The instrument ID.
raw_symbol: Symbol
The raw/local/native symbol for the instrument, assigned by the venue.
isin: Option<Ustr>
The instruments International Securities Identification Number (ISIN).
currency: Currency
The futures contract currency.
price_precision: u8
The price decimal precision.
price_increment: Price
The minimum price increment (tick size).
margin_init: Decimal
The initial (order) margin requirement in percentage of order value.
margin_maint: Decimal
The maintenance (position) margin in percentage of position value.
maker_fee: Decimal
The fee rate for liquidity makers as a percentage of order value.
taker_fee: Decimal
The fee rate for liquidity takers as a percentage of order value.
lot_size: Option<Quantity>
The rounded lot unit size (standard/board).
max_quantity: Option<Quantity>
The maximum allowable order quantity.
min_quantity: Option<Quantity>
The minimum allowable order quantity.
max_price: Option<Price>
The maximum allowable quoted price.
min_price: Option<Price>
The minimum allowable quoted price.
ts_event: UnixNanos
UNIX timestamp (nanoseconds) when the data event occurred.
ts_init: UnixNanos
UNIX timestamp (nanoseconds) when the data object was initialized.
Implementations§
Source§impl Equity
impl Equity
Sourcepub fn new_checked(
id: InstrumentId,
raw_symbol: Symbol,
isin: Option<Ustr>,
currency: Currency,
price_precision: u8,
price_increment: Price,
lot_size: Option<Quantity>,
max_quantity: Option<Quantity>,
min_quantity: Option<Quantity>,
max_price: Option<Price>,
min_price: Option<Price>,
margin_init: Option<Decimal>,
margin_maint: Option<Decimal>,
maker_fee: Option<Decimal>,
taker_fee: Option<Decimal>,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Result<Self>
pub fn new_checked( id: InstrumentId, raw_symbol: Symbol, isin: Option<Ustr>, currency: Currency, price_precision: u8, price_increment: Price, lot_size: Option<Quantity>, max_quantity: Option<Quantity>, min_quantity: Option<Quantity>, max_price: Option<Price>, min_price: Option<Price>, margin_init: Option<Decimal>, margin_maint: Option<Decimal>, maker_fee: Option<Decimal>, taker_fee: Option<Decimal>, ts_event: UnixNanos, ts_init: UnixNanos, ) -> Result<Self>
Sourcepub fn new(
id: InstrumentId,
raw_symbol: Symbol,
isin: Option<Ustr>,
currency: Currency,
price_precision: u8,
price_increment: Price,
lot_size: Option<Quantity>,
max_quantity: Option<Quantity>,
min_quantity: Option<Quantity>,
max_price: Option<Price>,
min_price: Option<Price>,
margin_init: Option<Decimal>,
margin_maint: Option<Decimal>,
maker_fee: Option<Decimal>,
taker_fee: Option<Decimal>,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Self
pub fn new( id: InstrumentId, raw_symbol: Symbol, isin: Option<Ustr>, currency: Currency, price_precision: u8, price_increment: Price, lot_size: Option<Quantity>, max_quantity: Option<Quantity>, min_quantity: Option<Quantity>, max_price: Option<Price>, min_price: Option<Price>, margin_init: Option<Decimal>, margin_maint: Option<Decimal>, maker_fee: Option<Decimal>, taker_fee: Option<Decimal>, ts_event: UnixNanos, ts_init: UnixNanos, ) -> Self
Creates a new Equity
instance.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Equity
impl<'de> Deserialize<'de> for Equity
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 Instrument for Equity
impl Instrument for Equity
fn into_any(self) -> InstrumentAny
fn id(&self) -> InstrumentId
fn raw_symbol(&self) -> Symbol
fn asset_class(&self) -> AssetClass
fn instrument_class(&self) -> InstrumentClass
fn underlying(&self) -> Option<Ustr>
fn base_currency(&self) -> Option<Currency>
fn quote_currency(&self) -> Currency
fn settlement_currency(&self) -> Currency
fn isin(&self) -> Option<Ustr>
fn option_kind(&self) -> Option<OptionKind>
fn exchange(&self) -> Option<Ustr>
fn strike_price(&self) -> Option<Price>
fn activation_ns(&self) -> Option<UnixNanos>
fn expiration_ns(&self) -> Option<UnixNanos>
fn is_inverse(&self) -> bool
fn price_precision(&self) -> u8
fn size_precision(&self) -> u8
fn price_increment(&self) -> Price
fn size_increment(&self) -> Quantity
fn multiplier(&self) -> Quantity
fn lot_size(&self) -> Option<Quantity>
fn max_quantity(&self) -> Option<Quantity>
fn min_quantity(&self) -> Option<Quantity>
fn max_notional(&self) -> Option<Money>
fn min_notional(&self) -> Option<Money>
fn max_price(&self) -> Option<Price>
fn min_price(&self) -> Option<Price>
fn ts_event(&self) -> UnixNanos
fn ts_init(&self) -> UnixNanos
fn symbol(&self) -> Symbol
fn venue(&self) -> Venue
fn margin_init(&self) -> Decimal
fn margin_maint(&self) -> Decimal
fn maker_fee(&self) -> Decimal
fn taker_fee(&self) -> Decimal
Source§fn make_price(&self, value: f64) -> Price
fn make_price(&self, value: f64) -> Price
Price
from the given value
with the correct price precision for the instrument.Source§fn make_qty(&self, value: f64) -> Quantity
fn make_qty(&self, value: f64) -> Quantity
Quantity
from the given value
with the correct size precision for the instrument.Source§impl PyClassImpl for Equity
impl PyClassImpl for Equity
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<Equity>
type ThreadChecker = SendablePyClass<Equity>
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<Equity> for PyClassImplCollector<Equity>
impl PyClassNewTextSignature<Equity> for PyClassImplCollector<Equity>
fn new_text_signature(self) -> Option<&'static str>
Source§impl PyMethods<Equity> for PyClassImplCollector<Equity>
impl PyMethods<Equity> for PyClassImplCollector<Equity>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for Equity
impl PyTypeInfo for Equity
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.impl Copy for Equity
impl DerefToPyAny for Equity
impl Eq for Equity
Auto Trait Implementations§
impl Freeze for Equity
impl RefUnwindSafe for Equity
impl Send for Equity
impl Sync for Equity
impl Unpin for Equity
impl UnwindSafe for Equity
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> 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.