pub struct OrderUpdatePoint {}Expand description
On-disk record (96 bytes LE) for an order lifecycle event: u64 ts_ms (8) — event timestamp u64 order_id_hash (8) — fnv1a-64 of order_id string u64 client_id_hash (8) — fnv1a-64 of client_order_id, or 0 u8 status (1) — OrderStatus enum value (see STATUS_* consts) u8 side (1) — 0=Buy 1=Sell u8 order_type (1) — 0=Market 1=Limit 2=Other u8 _pad (1) f64 price (8) — limit price (0.0 for market) f64 qty (8) — total order quantity f64 filled_qty (8) — cumulative filled quantity f64 avg_price (8) — average fill price (0.0 if none) f64 last_fill_price (8) — last fill price (0.0 if none) f64 last_fill_qty (8) — last fill quantity (0.0 if none) f64 last_fill_comm (8) — last fill commission (0.0 if none) 32 bytes reserved (zero-padded)
Fields§
§ts_ms: i64§order_id_hash: u64§client_id_hash: u64§status: u8OrderStatus encoded: 0=New/Open, 1=PartiallyFilled, 2=Filled, 3=Canceled, 4=Rejected/Expired
side: u80=Buy, 1=Sell
order_type: u80=Market, 1=Limit, 2=Other
price: f64§qty: f64§filled_qty: f64§avg_price: f64§last_fill_price: f64§last_fill_qty: f64§last_fill_commission: f64Implementations§
Source§impl OrderUpdatePoint
impl OrderUpdatePoint
pub fn status_label(&self) -> &'static str
pub fn side_label(&self) -> &'static str
pub fn order_type_label(&self) -> &'static str
Trait Implementations§
Source§impl Clone for OrderUpdatePoint
impl Clone for OrderUpdatePoint
Source§fn clone(&self) -> OrderUpdatePoint
fn clone(&self) -> OrderUpdatePoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl DataPoint for OrderUpdatePoint
impl DataPoint for OrderUpdatePoint
Source§const RECORD_SIZE: usize = SIZE
const RECORD_SIZE: usize = SIZE
Source§fn encode(&self, out: &mut [u8])
fn encode(&self, out: &mut [u8])
self to a fixed-size buffer (little-endian). Read moreSource§fn decode(bytes: &[u8]) -> Option<Self>
fn decode(bytes: &[u8]) -> Option<Self>
Source§fn timestamp_ms(&self) -> i64
fn timestamp_ms(&self) -> i64
Source§fn from_stream_event(ev: &StreamEvent) -> Option<Self>
fn from_stream_event(ev: &StreamEvent) -> Option<Self>
Self from a raw WS StreamEvent. Returns None if the
event doesn’t carry data for this class.Source§fn encode_blob(&self) -> Option<Vec<u8>>
fn encode_blob(&self) -> Option<Vec<u8>>
.blob file. Read moreSource§impl Debug for OrderUpdatePoint
impl Debug for OrderUpdatePoint
Source§impl<'de> Deserialize<'de> for OrderUpdatePoint
impl<'de> Deserialize<'de> for OrderUpdatePoint
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 PartialEq for OrderUpdatePoint
impl PartialEq for OrderUpdatePoint
Source§fn eq(&self, other: &OrderUpdatePoint) -> bool
fn eq(&self, other: &OrderUpdatePoint) -> bool
self and other values to be equal, and is used by ==.