1#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Fund {
7 #[prost(string, tag="1")]
9 pub code: ::prost::alloc::string::String,
10 #[prost(string, tag="2")]
12 pub name: ::prost::alloc::string::String,
13 #[prost(string, tag="3")]
15 pub category_code: ::prost::alloc::string::String,
16 #[prost(string, tag="4")]
18 pub employee_number: ::prost::alloc::string::String,
19 #[prost(string, tag="5")]
21 pub employee_name: ::prost::alloc::string::String,
22 #[prost(string, tag="6")]
24 pub limit_amount: ::prost::alloc::string::String,
25 #[prost(string, tag="7")]
27 pub department_code: ::prost::alloc::string::String,
28 #[prost(string, tag="8")]
30 pub trade_code: ::prost::alloc::string::String,
31 #[prost(string, tag="9")]
33 pub part_code: ::prost::alloc::string::String,
34 #[prost(string, tag="12")]
36 pub part_name: ::prost::alloc::string::String,
37 #[prost(string, tag="13")]
39 pub product_deal_code: ::prost::alloc::string::String,
40 #[prost(string, tag="14")]
42 pub add_up_position: ::prost::alloc::string::String,
43 #[prost(string, tag="15")]
45 pub trading_system_code: ::prost::alloc::string::String,
46 #[prost(string, tag="16")]
48 pub unique_trading_unit_code: ::prost::alloc::string::String,
49 #[prost(string, tag="17")]
51 pub unique_trading_unit_part_code: ::prost::alloc::string::String,
52 #[prost(int64, tag="18")]
54 pub unique_trading_unit_serial_number: i64,
55 #[prost(bool, tag="19")]
57 pub add_up_unique_trading_unit: bool,
58 #[prost(string, tag="20")]
60 pub short_selling_id: ::prost::alloc::string::String,
61 #[prost(message, optional, tag="21")]
63 pub pnl: ::core::option::Option<FundPnL>,
64 #[prost(message, optional, tag="22")]
66 pub positions: ::core::option::Option<FundPosition>,
67}
68#[allow(clippy::derive_partial_eq_without_eq)]
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct FundPnL {
72 #[prost(message, repeated, tag="1")]
74 pub symbols: ::prost::alloc::vec::Vec<SymbolPnL>,
75 #[prost(int64, tag="2")]
77 pub daily_pnl: i64,
78}
79#[allow(clippy::derive_partial_eq_without_eq)]
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct SymbolPnL {
83 #[prost(string, tag="1")]
85 pub symbol: ::prost::alloc::string::String,
86 #[prost(double, tag="2")]
88 pub average_buy_price: f64,
89 #[prost(int64, tag="3")]
91 pub quantity: i64,
92 #[prost(int64, tag="4")]
94 pub realized_pnl: i64,
95 #[prost(int64, tag="5")]
97 pub trading_cost: i64,
98}
99#[allow(clippy::derive_partial_eq_without_eq)]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct FundPosition {
103 #[prost(map="string, int64", tag="1")]
105 pub symbols: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
106}
107#[allow(clippy::derive_partial_eq_without_eq)]
109#[derive(Clone, PartialEq, ::prost::Message)]
110pub struct PositionExposure {
111 #[prost(string, tag="1")]
113 pub symbol: ::prost::alloc::string::String,
114 #[prost(int64, tag="2")]
116 pub quantity: i64,
117 #[prost(int64, tag="3")]
119 pub last_updated_at: i64,
120}
121#[allow(clippy::derive_partial_eq_without_eq)]
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct FundLimit {
124 #[prost(string, tag="1")]
125 pub fund: ::prost::alloc::string::String,
126 #[prost(enumeration="FundLimitType", tag="2")]
128 pub limit_type: i32,
129 #[prost(int64, tag="3")]
131 pub long_limit_quantity: i64,
132 #[prost(int64, tag="4")]
134 pub long_limit_amount: i64,
135 #[prost(int64, tag="5")]
137 pub short_limit_quantity: i64,
138 #[prost(int64, tag="6")]
140 pub short_limit_amount: i64,
141 #[prost(int64, tag="7")]
143 pub limit_quantity_per_order: i64,
144 #[prost(int64, tag="8")]
146 pub limit_amount_per_order: i64,
147 #[prost(int64, tag="9")]
149 pub tick_limit: i64,
150 #[prost(int64, tag="10")]
152 pub unfilled_limit: i64,
153 #[prost(int64, tag="11")]
155 pub spread_limit_quantity_per_order: i64,
156 #[prost(int64, tag="12")]
158 pub current_long_quantity: i64,
159 #[prost(int64, tag="13")]
161 pub current_long_amount: i64,
162 #[prost(int64, tag="14")]
164 pub current_short_quantity: i64,
165 #[prost(int64, tag="15")]
167 pub current_short_amount: i64,
168 #[prost(int64, tag="16")]
170 pub current_unfilled: i64,
171}
172#[allow(clippy::derive_partial_eq_without_eq)]
173#[derive(Clone, PartialEq, ::prost::Message)]
174pub struct LossLimitAlert {
175 #[prost(string, tag="1")]
176 pub fund_code: ::prost::alloc::string::String,
177 #[prost(int64, tag="2")]
178 pub current_loss: i64,
179 #[prost(int64, tag="3")]
180 pub loss_limit: i64,
181 #[prost(message, optional, tag="4")]
182 pub timestamp: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
183 #[prost(map="string, message", tag="5")]
184 pub snapshots: ::std::collections::HashMap<::prost::alloc::string::String, LossLimitSnapshot>,
185}
186#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct LossLimitSnapshot {
189 #[prost(string, tag="1")]
190 pub symbol: ::prost::alloc::string::String,
191 #[prost(int64, tag="2")]
192 pub quantity: i64,
193 #[prost(double, tag="3")]
194 pub average_price: f64,
195 #[prost(double, tag="4")]
196 pub current_price: f64,
197 #[prost(int64, tag="5")]
198 pub unrealized_pnl: i64,
199}
200#[allow(clippy::derive_partial_eq_without_eq)]
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct GetFundRequest {
206 #[prost(string, tag="1")]
208 pub fund: ::prost::alloc::string::String,
209}
210#[allow(clippy::derive_partial_eq_without_eq)]
212#[derive(Clone, PartialEq, ::prost::Message)]
213pub struct ListFundsRequest {
214 #[prost(uint32, optional, tag="1")]
216 pub page_size: ::core::option::Option<u32>,
217 #[prost(string, optional, tag="2")]
219 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
220 #[prost(string, tag="3")]
230 pub filter: ::prost::alloc::string::String,
231}
232#[allow(clippy::derive_partial_eq_without_eq)]
234#[derive(Clone, PartialEq, ::prost::Message)]
235pub struct ListFundsResponse {
236 #[prost(message, repeated, tag="1")]
238 pub funds: ::prost::alloc::vec::Vec<Fund>,
239 #[prost(string, tag="2")]
241 pub next_page_token: ::prost::alloc::string::String,
242}
243#[allow(clippy::derive_partial_eq_without_eq)]
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct ListFundLimitsRequest {
246 #[prost(string, tag="1")]
248 pub fund: ::prost::alloc::string::String,
249 #[prost(string, tag="2")]
256 pub filter: ::prost::alloc::string::String,
257}
258#[allow(clippy::derive_partial_eq_without_eq)]
259#[derive(Clone, PartialEq, ::prost::Message)]
260pub struct ListFundLimitsResponse {
261 #[prost(message, repeated, tag="1")]
263 pub fund_limits: ::prost::alloc::vec::Vec<FundLimit>,
264 #[prost(string, tag="2")]
266 pub next_page_token: ::prost::alloc::string::String,
267}
268#[allow(clippy::derive_partial_eq_without_eq)]
269#[derive(Clone, PartialEq, ::prost::Message)]
270pub struct WatchLossLimitAlertsRequest {
271 #[prost(string, tag="1")]
273 pub fund: ::prost::alloc::string::String,
274}
275#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
276#[repr(i32)]
277pub enum FundLimitType {
278 FundLimitUnspecified = 0,
279 Kospi200Future = 1,
280 Stock = 2,
281}
282impl FundLimitType {
283 pub fn as_str_name(&self) -> &'static str {
288 match self {
289 FundLimitType::FundLimitUnspecified => "FUND_LIMIT_UNSPECIFIED",
290 FundLimitType::Kospi200Future => "KOSPI_200_Future",
291 FundLimitType::Stock => "STOCK",
292 }
293 }
294 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
296 match value {
297 "FUND_LIMIT_UNSPECIFIED" => Some(Self::FundLimitUnspecified),
298 "KOSPI_200_Future" => Some(Self::Kospi200Future),
299 "STOCK" => Some(Self::Stock),
300 _ => None,
301 }
302 }
303}
304include!("kdo.v1.fund.tonic.rs");
305include!("kdo.v1.fund.serde.rs");
306