pub struct OrderStatusReport {Show 29 fields
pub account_id: AccountId,
pub instrument_id: InstrumentId,
pub venue_order_id: VenueOrderId,
pub order_side: OrderSide,
pub order_type: OrderType,
pub time_in_force: TimeInForce,
pub order_status: OrderStatus,
pub quantity: Quantity,
pub filled_qty: Quantity,
pub report_id: UUID4,
pub ts_accepted: UnixNanos,
pub ts_last: UnixNanos,
pub ts_init: UnixNanos,
pub client_order_id: Option<ClientOrderId>,
pub order_list_id: Option<OrderListId>,
pub contingency_type: ContingencyType,
pub expire_time: Option<UnixNanos>,
pub price: Option<Price>,
pub trigger_price: Option<Price>,
pub trigger_type: Option<TriggerType>,
pub limit_offset: Option<Decimal>,
pub trailing_offset: Option<Decimal>,
pub trailing_offset_type: TrailingOffsetType,
pub avg_px: Option<Decimal>,
pub display_qty: Option<Quantity>,
pub post_only: bool,
pub reduce_only: bool,
pub cancel_reason: Option<String>,
pub ts_triggered: Option<UnixNanos>,
}
Fields§
§account_id: AccountId
§instrument_id: InstrumentId
§venue_order_id: VenueOrderId
§order_side: OrderSide
§order_type: OrderType
§time_in_force: TimeInForce
§order_status: OrderStatus
§quantity: Quantity
§filled_qty: Quantity
§report_id: UUID4
§ts_accepted: UnixNanos
§ts_last: UnixNanos
§ts_init: UnixNanos
§client_order_id: Option<ClientOrderId>
§order_list_id: Option<OrderListId>
§contingency_type: ContingencyType
§expire_time: Option<UnixNanos>
§price: Option<Price>
§trigger_price: Option<Price>
§trigger_type: Option<TriggerType>
§limit_offset: Option<Decimal>
§trailing_offset: Option<Decimal>
§trailing_offset_type: TrailingOffsetType
§avg_px: Option<Decimal>
§display_qty: Option<Quantity>
§post_only: bool
§reduce_only: bool
§cancel_reason: Option<String>
§ts_triggered: Option<UnixNanos>
Implementations§
Source§impl OrderStatusReport
impl OrderStatusReport
Sourcepub fn new(
account_id: AccountId,
instrument_id: InstrumentId,
venue_order_id: VenueOrderId,
order_side: OrderSide,
order_type: OrderType,
time_in_force: TimeInForce,
order_status: OrderStatus,
quantity: Quantity,
filled_qty: Quantity,
report_id: UUID4,
ts_accepted: UnixNanos,
ts_last: UnixNanos,
ts_init: UnixNanos,
) -> Self
pub fn new( account_id: AccountId, instrument_id: InstrumentId, venue_order_id: VenueOrderId, order_side: OrderSide, order_type: OrderType, time_in_force: TimeInForce, order_status: OrderStatus, quantity: Quantity, filled_qty: Quantity, report_id: UUID4, ts_accepted: UnixNanos, ts_last: UnixNanos, ts_init: UnixNanos, ) -> Self
Creates a new OrderStatusReport
instance with required fields.
Sourcepub const fn with_client_order_id(self, client_order_id: ClientOrderId) -> Self
pub const fn with_client_order_id(self, client_order_id: ClientOrderId) -> Self
Sets the client order ID.
Sourcepub const fn with_order_list_id(self, order_list_id: OrderListId) -> Self
pub const fn with_order_list_id(self, order_list_id: OrderListId) -> Self
Sets the order list ID.
Sourcepub const fn with_price(self, price: Price) -> Self
pub const fn with_price(self, price: Price) -> Self
Sets the price.
Sourcepub const fn with_avg_px(self, avg_px: Decimal) -> Self
pub const fn with_avg_px(self, avg_px: Decimal) -> Self
Sets the average price.
Sourcepub const fn with_trigger_price(self, trigger_price: Price) -> Self
pub const fn with_trigger_price(self, trigger_price: Price) -> Self
Sets the trigger price.
Sourcepub const fn with_display_qty(self, display_qty: Quantity) -> Self
pub const fn with_display_qty(self, display_qty: Quantity) -> Self
Sets the display quantity.
Sourcepub const fn with_expire_time(self, expire_time: UnixNanos) -> Self
pub const fn with_expire_time(self, expire_time: UnixNanos) -> Self
Sets the expire time.
Sourcepub const fn with_post_only(self, post_only: bool) -> Self
pub const fn with_post_only(self, post_only: bool) -> Self
Sets post_only
flag.
Sourcepub const fn with_reduce_only(self, reduce_only: bool) -> Self
pub const fn with_reduce_only(self, reduce_only: bool) -> Self
Sets reduce_only
flag.
Sourcepub fn with_cancel_reason(self, cancel_reason: &str) -> Self
pub fn with_cancel_reason(self, cancel_reason: &str) -> Self
Sets cancel reason.
Sourcepub const fn with_ts_triggered(self, ts_triggered: UnixNanos) -> Self
pub const fn with_ts_triggered(self, ts_triggered: UnixNanos) -> Self
Sets the triggered timestamp.
Sourcepub const fn with_contingency_type(
self,
contingency_type: ContingencyType,
) -> Self
pub const fn with_contingency_type( self, contingency_type: ContingencyType, ) -> Self
Sets the contingency type.
Trait Implementations§
Source§impl Clone for OrderStatusReport
impl Clone for OrderStatusReport
Source§fn clone(&self) -> OrderStatusReport
fn clone(&self) -> OrderStatusReport
Returns a copy 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 OrderStatusReport
impl Debug for OrderStatusReport
Source§impl<'de> Deserialize<'de> for OrderStatusReport
impl<'de> Deserialize<'de> for OrderStatusReport
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 IntoPy<Py<PyAny>> for OrderStatusReport
impl IntoPy<Py<PyAny>> for OrderStatusReport
Source§impl PartialEq for OrderStatusReport
impl PartialEq for OrderStatusReport
Source§impl PyClass for OrderStatusReport
impl PyClass for OrderStatusReport
Source§impl PyClassImpl for OrderStatusReport
impl PyClassImpl for OrderStatusReport
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
Source§type ThreadChecker = SendablePyClass<OrderStatusReport>
type ThreadChecker = SendablePyClass<OrderStatusReport>
This handles following two situations: Read more
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
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<'a, 'py> PyFunctionArgument<'a, 'py> for &'a OrderStatusReport
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a OrderStatusReport
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut OrderStatusReport
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut OrderStatusReport
Source§impl PyTypeInfo for OrderStatusReport
impl PyTypeInfo for OrderStatusReport
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
Checks if
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
Checks if
object
is an instance of this type.Source§impl Serialize for OrderStatusReport
impl Serialize for OrderStatusReport
impl DerefToPyAny for OrderStatusReport
impl Eq for OrderStatusReport
impl StructuralPartialEq for OrderStatusReport
Auto Trait Implementations§
impl Freeze for OrderStatusReport
impl RefUnwindSafe for OrderStatusReport
impl Send for OrderStatusReport
impl Sync for OrderStatusReport
impl Unpin for OrderStatusReport
impl UnwindSafe for OrderStatusReport
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<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> 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