pub struct MFOrder {Show 17 fields
pub order_id: String,
pub exchange_order_id: Option<String>,
pub trading_symbol: String,
pub fund: String,
pub status: MFOrderStatus,
pub status_message: Option<String>,
pub folio: Option<String>,
pub transaction_type: TransactionType,
pub amount: Option<f64>,
pub quantity: Option<f64>,
pub purchase_type: Option<String>,
pub order_timestamp: DateTime<Utc>,
pub exchange_timestamp: Option<DateTime<Utc>>,
pub settlement_id: Option<String>,
pub average_price: Option<f64>,
pub placed_by: String,
pub tag: Option<String>,
}
Expand description
MF order data structure
Fields§
§order_id: String
Order ID
exchange_order_id: Option<String>
Exchange order ID
trading_symbol: String
Trading symbol
fund: String
Fund name
status: MFOrderStatus
Order status
status_message: Option<String>
Status message
folio: Option<String>
Folio number
transaction_type: TransactionType
Transaction type (BUY/SELL)
amount: Option<f64>
Amount (for purchases)
quantity: Option<f64>
Quantity (for redemptions)
purchase_type: Option<String>
Purchase type (FRESH/ADDITIONAL)
order_timestamp: DateTime<Utc>
Order timestamp
exchange_timestamp: Option<DateTime<Utc>>
Exchange timestamp
settlement_id: Option<String>
Settlement ID
average_price: Option<f64>
Average price (NAV at which units were allotted/redeemed)
placed_by: String
Placed by user ID
tag: Option<String>
Tag
Implementations§
Source§impl MFOrder
impl MFOrder
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if order is completed
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check if order is cancelled
Sourcepub fn is_rejected(&self) -> bool
pub fn is_rejected(&self) -> bool
Check if order is rejected
Sourcepub fn is_purchase(&self) -> bool
pub fn is_purchase(&self) -> bool
Check if this is a purchase order
Sourcepub fn is_redemption(&self) -> bool
pub fn is_redemption(&self) -> bool
Check if this is a redemption order
Sourcepub fn investment_amount(&self) -> Option<f64>
pub fn investment_amount(&self) -> Option<f64>
Get the investment amount (for completed orders)
Sourcepub fn order_value(&self) -> Option<f64>
pub fn order_value(&self) -> Option<f64>
Get order value (amount for purchases, NAV*quantity for redemptions)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MFOrder
impl<'de> Deserialize<'de> for MFOrder
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
Auto Trait Implementations§
impl Freeze for MFOrder
impl RefUnwindSafe for MFOrder
impl Send for MFOrder
impl Sync for MFOrder
impl Unpin for MFOrder
impl UnwindSafe for MFOrder
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