pub struct OrderSnapshot {Show 42 fields
pub trader_id: TraderId,
pub strategy_id: StrategyId,
pub instrument_id: InstrumentId,
pub client_order_id: ClientOrderId,
pub venue_order_id: VenueOrderId,
pub position_id: Option<PositionId>,
pub account_id: AccountId,
pub last_trade_id: Option<TradeId>,
pub order_type: OrderType,
pub order_side: OrderSide,
pub quantity: Quantity,
pub price: Option<Price>,
pub trigger_price: Option<Price>,
pub trigger_type: TriggerType,
pub limit_offset: Option<Decimal>,
pub trailing_offset: Option<Decimal>,
pub trailing_offset_type: Option<TriggerType>,
pub time_in_force: TimeInForce,
pub expire_time_ns: Option<u64>,
pub filled_qty: Quantity,
pub liquidity_side: LiquiditySide,
pub avg_px: Option<f64>,
pub slippage: Option<f64>,
pub commissions: Vec<Money>,
pub status: OrderStatus,
pub is_post_only: bool,
pub is_reduce_only: bool,
pub is_quote_quantity: bool,
pub display_qty: Option<Quantity>,
pub emulation_trigger: TriggerType,
pub trigger_instrument_id: Option<InstrumentId>,
pub contingency_type: ContingencyType,
pub order_list_id: Option<OrderListId>,
pub linked_order_ids: Option<Vec<ClientOrderId>>,
pub parent_order_id: Option<ClientOrderId>,
pub exec_algorithm_id: Option<ExecAlgorithmId>,
pub exec_algorithm_params: Option<IndexMap<String, String>>,
pub exec_spawn_id: Option<ClientOrderId>,
pub tags: Option<Vec<Ustr>>,
pub init_id: UUID4,
pub ts_init: UnixNanos,
pub ts_last: UnixNanos,
}
Expand description
Represents an order state snapshot as a certain instant.
Fields§
§trader_id: TraderId
§strategy_id: StrategyId
§instrument_id: InstrumentId
§client_order_id: ClientOrderId
§venue_order_id: VenueOrderId
§position_id: Option<PositionId>
§account_id: AccountId
§last_trade_id: Option<TradeId>
§order_type: OrderType
§order_side: OrderSide
§quantity: Quantity
§price: Option<Price>
§trigger_price: Option<Price>
§trigger_type: TriggerType
§limit_offset: Option<Decimal>
§trailing_offset: Option<Decimal>
§trailing_offset_type: Option<TriggerType>
§time_in_force: TimeInForce
§expire_time_ns: Option<u64>
§filled_qty: Quantity
§liquidity_side: LiquiditySide
§avg_px: Option<f64>
§slippage: Option<f64>
§commissions: Vec<Money>
§status: OrderStatus
§is_post_only: bool
§is_reduce_only: bool
§is_quote_quantity: bool
§display_qty: Option<Quantity>
§emulation_trigger: TriggerType
§trigger_instrument_id: Option<InstrumentId>
§contingency_type: ContingencyType
§order_list_id: Option<OrderListId>
§linked_order_ids: Option<Vec<ClientOrderId>>
§parent_order_id: Option<ClientOrderId>
§exec_algorithm_id: Option<ExecAlgorithmId>
§exec_algorithm_params: Option<IndexMap<String, String>>
§exec_spawn_id: Option<ClientOrderId>
§init_id: UUID4
§ts_init: UnixNanos
§ts_last: UnixNanos
Trait Implementations§
Source§impl Clone for OrderSnapshot
impl Clone for OrderSnapshot
Source§fn clone(&self) -> OrderSnapshot
fn clone(&self) -> OrderSnapshot
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 OrderSnapshot
impl Debug for OrderSnapshot
Source§impl<'de> Deserialize<'de> for OrderSnapshot
impl<'de> Deserialize<'de> for OrderSnapshot
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 OrderSnapshot
impl IntoPy<Py<PyAny>> for OrderSnapshot
Source§impl PartialEq for OrderSnapshot
impl PartialEq for OrderSnapshot
Source§impl PyClass for OrderSnapshot
impl PyClass for OrderSnapshot
Source§impl PyClassImpl for OrderSnapshot
impl PyClassImpl for OrderSnapshot
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<OrderSnapshot>
type ThreadChecker = SendablePyClass<OrderSnapshot>
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 OrderSnapshot
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a OrderSnapshot
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut OrderSnapshot
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut OrderSnapshot
Source§impl PyTypeInfo for OrderSnapshot
impl PyTypeInfo for OrderSnapshot
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 OrderSnapshot
impl Serialize for OrderSnapshot
impl DerefToPyAny for OrderSnapshot
impl StructuralPartialEq for OrderSnapshot
Auto Trait Implementations§
impl Freeze for OrderSnapshot
impl RefUnwindSafe for OrderSnapshot
impl Send for OrderSnapshot
impl Sync for OrderSnapshot
impl Unpin for OrderSnapshot
impl UnwindSafe for OrderSnapshot
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