增加类型化开放订单改单能力

This commit is contained in:
boris
2026-08-27 08:08:39 +08:00
parent 6ee1835ca5
commit 9b00a0777a
8 changed files with 846 additions and 7 deletions
+8 -1
View File
@@ -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 { .. }