Add persistent limit orders and cancel semantics
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -31,6 +31,7 @@ pub enum OrderSide {
|
||||
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
|
||||
pub enum OrderStatus {
|
||||
Pending,
|
||||
Filled,
|
||||
PartiallyFilled,
|
||||
Canceled,
|
||||
|
||||
@@ -89,6 +89,12 @@ pub enum OrderIntent {
|
||||
quantity: i32,
|
||||
reason: String,
|
||||
},
|
||||
LimitShares {
|
||||
symbol: String,
|
||||
quantity: i32,
|
||||
limit_price: f64,
|
||||
reason: String,
|
||||
},
|
||||
Lots {
|
||||
symbol: String,
|
||||
lots: i32,
|
||||
@@ -114,6 +120,17 @@ pub enum OrderIntent {
|
||||
target_percent: f64,
|
||||
reason: String,
|
||||
},
|
||||
CancelOrder {
|
||||
order_id: u64,
|
||||
reason: String,
|
||||
},
|
||||
CancelSymbol {
|
||||
symbol: String,
|
||||
reason: String,
|
||||
},
|
||||
CancelAll {
|
||||
reason: String,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user