实现类型化订单有效期合同
This commit is contained in:
@@ -3824,7 +3824,7 @@ fn has_execution_quote_near_start_time(
|
||||
fn decision_has_algo_execution(decision: &StrategyDecision) -> bool {
|
||||
decision.order_intents.iter().any(|intent| {
|
||||
matches!(
|
||||
intent,
|
||||
intent.unwrapped(),
|
||||
OrderIntent::AlgoValue { .. }
|
||||
| OrderIntent::AlgoPercent { .. }
|
||||
| OrderIntent::TimedTargetValue { .. }
|
||||
@@ -3852,7 +3852,7 @@ fn execution_quote_symbols_for_decision(
|
||||
}
|
||||
|
||||
for intent in &decision.order_intents {
|
||||
match intent {
|
||||
match intent.unwrapped() {
|
||||
OrderIntent::Shares { symbol, .. }
|
||||
| OrderIntent::LimitShares { symbol, .. }
|
||||
| OrderIntent::Lots { symbol, .. }
|
||||
@@ -3880,6 +3880,7 @@ fn execution_quote_symbols_for_decision(
|
||||
OrderIntent::CancelAll { .. } => {
|
||||
symbols.extend(open_orders.iter().map(|order| order.symbol.clone()));
|
||||
}
|
||||
OrderIntent::WithTimeInForce { .. } => unreachable!("intent is unwrapped"),
|
||||
OrderIntent::UpdateUniverse { .. }
|
||||
| OrderIntent::Subscribe { .. }
|
||||
| OrderIntent::Unsubscribe { .. }
|
||||
@@ -3901,7 +3902,7 @@ fn algo_execution_quote_windows_for_decision(
|
||||
) -> BTreeMap<(Option<NaiveTime>, Option<NaiveTime>), BTreeSet<String>> {
|
||||
let mut groups = BTreeMap::<(Option<NaiveTime>, Option<NaiveTime>), BTreeSet<String>>::new();
|
||||
for intent in &decision.order_intents {
|
||||
match intent {
|
||||
match intent.unwrapped() {
|
||||
OrderIntent::AlgoValue {
|
||||
symbol,
|
||||
start_time,
|
||||
|
||||
Reference in New Issue
Block a user