Expose open order runtime fields
This commit is contained in:
@@ -47,6 +47,18 @@ pub enum OrderStatus {
|
||||
Rejected,
|
||||
}
|
||||
|
||||
impl OrderStatus {
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Pending => "pending",
|
||||
Self::Filled => "filled",
|
||||
Self::PartiallyFilled => "partially_filled",
|
||||
Self::Canceled => "canceled",
|
||||
Self::Rejected => "rejected",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct OrderEvent {
|
||||
#[serde(with = "date_format")]
|
||||
|
||||
Reference in New Issue
Block a user