增加类型化开放订单改单能力
This commit is contained in:
@@ -89,7 +89,7 @@ pub trait Strategy {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct OpenOrderView {
|
||||
pub order_id: u64,
|
||||
pub symbol: String,
|
||||
@@ -1170,6 +1170,12 @@ pub enum OrderIntent {
|
||||
order_id: u64,
|
||||
reason: String,
|
||||
},
|
||||
ModifyOrder {
|
||||
order_id: u64,
|
||||
new_total_quantity: Option<u32>,
|
||||
new_limit_price: Option<f64>,
|
||||
reason: String,
|
||||
},
|
||||
CancelSymbol {
|
||||
symbol: String,
|
||||
reason: String,
|
||||
@@ -1257,6 +1263,7 @@ impl OrderIntent {
|
||||
if matches!(
|
||||
intent,
|
||||
Self::CancelOrder { .. }
|
||||
| Self::ModifyOrder { .. }
|
||||
| Self::CancelSymbol { .. }
|
||||
| Self::CancelAll { .. }
|
||||
| Self::UpdateUniverse { .. }
|
||||
|
||||
Reference in New Issue
Block a user