Skip to main content

apple_quant_algorithmic/order_manager/
capacity_spec.rs

1pub trait OrdersCapacitySpec {
2	type const PENDING_CLIENT: usize;
3	type const PENDING_REMOTE: usize;
4	type const WORKING_REMOTE: usize;
5	type const COMPLETED_REMOTE: usize;
6
7	type const DEPENDENCY: usize;
8	type const PARTIAL_FILL: usize;
9}
10
11pub struct SimpleOrdersCapacitySpec;
12
13impl OrdersCapacitySpec for SimpleOrdersCapacitySpec {
14	type const PENDING_CLIENT: usize = 2;
15	type const PENDING_REMOTE: usize = 2;
16	type const WORKING_REMOTE: usize = 4;
17	type const COMPLETED_REMOTE: usize = 1;
18
19	type const DEPENDENCY: usize = 4;
20	type const PARTIAL_FILL: usize = 4;
21}
22
23pub struct MinimalOrdersCapacitySpec;
24
25impl OrdersCapacitySpec for MinimalOrdersCapacitySpec {
26	type const PENDING_CLIENT: usize = 1;
27	type const PENDING_REMOTE: usize = 1;
28	type const WORKING_REMOTE: usize = 1;
29	type const COMPLETED_REMOTE: usize = 1;
30
31	type const DEPENDENCY: usize = 1;
32	type const PARTIAL_FILL: usize = 1;
33}