nautilus_common/messages/execution/
report.rs

1// -------------------------------------------------------------------------------------------------
2//  Copyright (C) 2015-2025 Posei Systems Pty Ltd. All rights reserved.
3//  https://poseitrader.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
23#[derive(Debug)]
24pub struct GenerateOrderStatusReport {
25    command_id: UUID4,
26    ts_init: UnixNanos,
27    instrument_id: Option<InstrumentId>,
28    client_order_id: Option<ClientOrderId>,
29    venue_order_id: Option<ClientOrderId>,
30}
31
32impl GenerateOrderStatusReport {
33    #[must_use]
34    pub const fn new(
35        command_id: UUID4,
36        ts_init: UnixNanos,
37        instrument_id: Option<InstrumentId>,
38        client_order_id: Option<ClientOrderId>,
39        venue_order_id: Option<ClientOrderId>,
40    ) -> Self {
41        Self {
42            command_id,
43            ts_init,
44            instrument_id,
45            client_order_id,
46            venue_order_id,
47        }
48    }
49}
50
51#[derive(Debug)]
52pub struct GenerateOrderStatusReports {
53    command_id: UUID4,
54    ts_init: UnixNanos,
55    open_only: bool,
56    instrument_id: Option<InstrumentId>,
57    start: Option<UnixNanos>,
58    end: Option<UnixNanos>,
59}
60
61impl GenerateOrderStatusReports {
62    #[must_use]
63    pub const fn new(
64        command_id: UUID4,
65        ts_init: UnixNanos,
66        open_only: bool,
67        instrument_id: Option<InstrumentId>,
68        start: Option<UnixNanos>,
69        end: Option<UnixNanos>,
70    ) -> Self {
71        Self {
72            command_id,
73            ts_init,
74            open_only,
75            instrument_id,
76            start,
77            end,
78        }
79    }
80}
81
82#[derive(Debug)]
83pub struct GenerateFillReports {
84    command_id: UUID4,
85    ts_init: UnixNanos,
86    instrument_id: Option<InstrumentId>,
87    venue_order_id: Option<ClientOrderId>,
88    start: Option<UnixNanos>,
89    end: Option<UnixNanos>,
90}
91
92impl GenerateFillReports {
93    #[must_use]
94    pub const fn new(
95        command_id: UUID4,
96        ts_init: UnixNanos,
97        instrument_id: Option<InstrumentId>,
98        venue_order_id: Option<ClientOrderId>,
99        start: Option<UnixNanos>,
100        end: Option<UnixNanos>,
101    ) -> Self {
102        Self {
103            command_id,
104            ts_init,
105            instrument_id,
106            venue_order_id,
107            start,
108            end,
109        }
110    }
111}
112
113#[derive(Debug)]
114pub struct GeneratePositionReports {
115    command_id: UUID4,
116    ts_init: UnixNanos,
117    instrument_id: Option<InstrumentId>,
118    start: Option<UnixNanos>,
119    end: Option<UnixNanos>,
120}
121
122impl GeneratePositionReports {
123    #[must_use]
124    pub const fn new(
125        command_id: UUID4,
126        ts_init: UnixNanos,
127        instrument_id: Option<InstrumentId>,
128        start: Option<UnixNanos>,
129        end: Option<UnixNanos>,
130    ) -> Self {
131        Self {
132            command_id,
133            ts_init,
134            instrument_id,
135            start,
136            end,
137        }
138    }
139}