pub struct OrderStatusReport {Show 29 fields
pub account_id: AccountId,
pub instrument_id: InstrumentId,
pub client_order_id: Option<ClientOrderId>,
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 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<Price>,
pub trailing_offset: Option<Price>,
pub trailing_offset_type: TrailingOffsetType,
pub avg_px: Option<f64>,
pub display_qty: Option<Quantity>,
pub post_only: bool,
pub reduce_only: bool,
pub cancel_reason: Option<String>,
pub ts_triggered: Option<UnixNanos>,
}
Expand description
Represents an order status at a point in time.
Fields§
§account_id: AccountId
The account ID associated with the position.
instrument_id: InstrumentId
The instrument ID associated with the event.
client_order_id: Option<ClientOrderId>
The client order ID.
venue_order_id: VenueOrderId
The venue assigned order ID.
order_side: OrderSide
The order side.
order_type: OrderType
The order type.
time_in_force: TimeInForce
The order time in force.
order_status: OrderStatus
The order status.
quantity: Quantity
The order quantity.
filled_qty: Quantity
The order total filled quantity.
report_id: UUID4
The unique identifier for the event.
ts_accepted: UnixNanos
UNIX timestamp (nanoseconds) when the order was accepted.
ts_last: UnixNanos
UNIX timestamp (nanoseconds) when the last event occurred.
ts_init: UnixNanos
UNIX timestamp (nanoseconds) when the event was initialized.
order_list_id: Option<OrderListId>
The order list ID associated with the order.
contingency_type: ContingencyType
The orders contingency type.
expire_time: Option<UnixNanos>
The order expiration (UNIX epoch nanoseconds), zero for no expiration.
price: Option<Price>
The order price (LIMIT).
trigger_price: Option<Price>
The order trigger price (STOP).
trigger_type: Option<TriggerType>
The trigger type for the order.
limit_offset: Option<Price>
The trailing offset for the orders limit price.
trailing_offset: Option<Price>
The trailing offset for the orders trigger price (STOP).
trailing_offset_type: TrailingOffsetType
The trailing offset type.
avg_px: Option<f64>
The order average fill price.
display_qty: Option<Quantity>
The quantity of the LIMIT
order to display on the public book (iceberg).
post_only: bool
If the order will only provide liquidity (make a market).
reduce_only: bool
If the order carries the ‘reduce-only’ execution instruction.
cancel_reason: Option<String>
The reason for order cancellation.
ts_triggered: Option<UnixNanos>
UNIX timestamp (nanoseconds) when the order was triggered.
Implementations§
Source§impl OrderStatusReport
impl OrderStatusReport
Sourcepub fn new(
account_id: AccountId,
instrument_id: InstrumentId,
client_order_id: Option<ClientOrderId>,
venue_order_id: VenueOrderId,
order_side: OrderSide,
order_type: OrderType,
time_in_force: TimeInForce,
order_status: OrderStatus,
quantity: Quantity,
filled_qty: Quantity,
ts_accepted: UnixNanos,
ts_last: UnixNanos,
ts_init: UnixNanos,
report_id: Option<UUID4>,
) -> Self
pub fn new( account_id: AccountId, instrument_id: InstrumentId, client_order_id: Option<ClientOrderId>, venue_order_id: VenueOrderId, order_side: OrderSide, order_type: OrderType, time_in_force: TimeInForce, order_status: OrderStatus, quantity: Quantity, filled_qty: Quantity, ts_accepted: UnixNanos, ts_last: UnixNanos, ts_init: UnixNanos, report_id: Option<UUID4>, ) -> 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: f64) -> Self
pub const fn with_avg_px(self, avg_px: f64) -> 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_trigger_type(self, trigger_type: TriggerType) -> Self
pub const fn with_trigger_type(self, trigger_type: TriggerType) -> Self
Sets the trigger type.
Sourcepub const fn with_limit_offset(self, limit_offset: Price) -> Self
pub const fn with_limit_offset(self, limit_offset: Price) -> Self
Sets the limit offset.
Sourcepub const fn with_trailing_offset(self, trailing_offset: Price) -> Self
pub const fn with_trailing_offset(self, trailing_offset: Price) -> Self
Sets the trailing offset.
Sourcepub const fn with_trailing_offset_type(
self,
trailing_offset_type: TrailingOffsetType,
) -> Self
pub const fn with_trailing_offset_type( self, trailing_offset_type: TrailingOffsetType, ) -> Self
Sets the trailing offset type.
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.
Source§impl OrderStatusReport
impl OrderStatusReport
pub fn py_from_dict(py: Python<'_>, values: Py<PyDict>) -> PyResult<Self>
pub fn py_to_dict(&self, py: Python<'_>) -> PyResult<PyObject>
Trait Implementations§
Source§impl Clone for OrderStatusReport
impl Clone for OrderStatusReport
Source§fn clone(&self) -> OrderStatusReport
fn clone(&self) -> OrderStatusReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§impl Display for OrderStatusReport
impl Display for OrderStatusReport
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
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<OrderStatusReport>
type ThreadChecker = SendablePyClass<OrderStatusReport>
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<OrderStatusReport> for PyClassImplCollector<OrderStatusReport>
impl PyClassNewTextSignature<OrderStatusReport> for PyClassImplCollector<OrderStatusReport>
fn new_text_signature(self) -> Option<&'static str>
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 PyMethods<OrderStatusReport> for PyClassImplCollector<OrderStatusReport>
impl PyMethods<OrderStatusReport> for PyClassImplCollector<OrderStatusReport>
fn py_methods(self) -> &'static PyClassItems
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
§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 OrderStatusReport
impl Serialize for OrderStatusReport
impl DerefToPyAny 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§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