nautilus_execution/messages/
reports.rs

1// -------------------------------------------------------------------------------------------------
2//  Copyright (C) 2015-2025 Nautech Systems Pty Ltd. All rights reserved.
3//  https://nautechsystems.io
4//
5//  Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6//  You may not use this file except in compliance with the License.
7//  You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9//  Unless required by applicable law or agreed to in writing, software
10//  distributed under the License is distributed on an "AS IS" BASIS,
11//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//  See the License for the specific language governing permissions and
13//  limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16// Under development
17#![allow(dead_code)]
18#![allow(unused_variables)]
19
20use nautilus_core::{UUID4, UnixNanos};
21use nautilus_model::identifiers::{ClientOrderId, InstrumentId};
22
23pub struct GenerateOrderStatusReport {
24    command_id: UUID4,
25    ts_init: UnixNanos,
26    instrument_id: Option<InstrumentId>,
27    client_order_id: Option<ClientOrderId>,
28    venue_order_id: Option<ClientOrderId>,
29}
30
31impl GenerateOrderStatusReport {
32    #[must_use]
33    pub const fn new(
34        command_id: UUID4,
35        ts_init: UnixNanos,
36        instrument_id: Option<InstrumentId>,
37        client_order_id: Option<ClientOrderId>,
38        venue_order_id: Option<ClientOrderId>,
39    ) -> Self {
40        Self {
41            command_id,
42            ts_init,
43            instrument_id,
44            client_order_id,
45            venue_order_id,
46        }
47    }
48}
49
50pub struct GenerateOrderStatusReports {
51    command_id: UUID4,
52    ts_init: UnixNanos,
53    open_only: bool,
54    instrument_id: Option<InstrumentId>,
55    start: Option<UnixNanos>,
56    end: Option<UnixNanos>,
57}
58
59impl GenerateOrderStatusReports {
60    #[must_use]
61    pub const fn new(
62        command_id: UUID4,
63        ts_init: UnixNanos,
64        open_only: bool,
65        instrument_id: Option<InstrumentId>,
66        start: Option<UnixNanos>,
67        end: Option<UnixNanos>,
68    ) -> Self {
69        Self {
70            command_id,
71            ts_init,
72            open_only,
73            instrument_id,
74            start,
75            end,
76        }
77    }
78}
79
80pub struct GenerateFillReports {
81    command_id: UUID4,
82    ts_init: UnixNanos,
83    instrument_id: Option<InstrumentId>,
84    venue_order_id: Option<ClientOrderId>,
85    start: Option<UnixNanos>,
86    end: Option<UnixNanos>,
87}
88
89impl GenerateFillReports {
90    #[must_use]
91    pub const fn new(
92        command_id: UUID4,
93        ts_init: UnixNanos,
94        instrument_id: Option<InstrumentId>,
95        venue_order_id: Option<ClientOrderId>,
96        start: Option<UnixNanos>,
97        end: Option<UnixNanos>,
98    ) -> Self {
99        Self {
100            command_id,
101            ts_init,
102            instrument_id,
103            venue_order_id,
104            start,
105            end,
106        }
107    }
108}
109
110pub struct GeneratePositionReports {
111    command_id: UUID4,
112    ts_init: UnixNanos,
113    instrument_id: Option<InstrumentId>,
114    start: Option<UnixNanos>,
115    end: Option<UnixNanos>,
116}
117
118impl GeneratePositionReports {
119    #[must_use]
120    pub const fn new(
121        command_id: UUID4,
122        ts_init: UnixNanos,
123        instrument_id: Option<InstrumentId>,
124        start: Option<UnixNanos>,
125        end: Option<UnixNanos>,
126    ) -> Self {
127        Self {
128            command_id,
129            ts_init,
130            instrument_id,
131            start,
132            end,
133        }
134    }
135}