Skip to main content

sandbox_quant/execution/
command.rs

1use crate::domain::exposure::Exposure;
2use crate::domain::instrument::Instrument;
3use crate::domain::order_type::OrderType;
4use crate::domain::position::Side;
5
6#[derive(Debug, Clone, PartialEq)]
7pub enum CommandSource {
8    User,
9    System,
10}
11
12#[derive(Debug, Clone, PartialEq)]
13pub enum ExecutionCommand {
14    SetTargetExposure {
15        instrument: Instrument,
16        target: Exposure,
17        order_type: OrderType,
18        source: CommandSource,
19    },
20    SubmitOptionOrder {
21        instrument: Instrument,
22        side: Side,
23        qty: f64,
24        order_type: OrderType,
25        source: CommandSource,
26    },
27    CloseSymbol {
28        instrument: Instrument,
29        source: CommandSource,
30    },
31    CloseAll {
32        source: CommandSource,
33    },
34}