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 exposure: ::core::option::Option<FundExposure>,
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 positions: ::prost::alloc::vec::Vec<PositionPnL>,
75 #[prost(int64, tag="2")]
77 pub daily_pnl: i64,
78 #[prost(int64, tag="3")]
80 pub last_updated_at: i64,
81}
82#[allow(clippy::derive_partial_eq_without_eq)]
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct PositionPnL {
86 #[prost(string, tag="1")]
88 pub symbol: ::prost::alloc::string::String,
89 #[prost(double, tag="2")]
91 pub average_buy_price: f64,
92 #[prost(int64, tag="3")]
94 pub quantity: i64,
95 #[prost(int64, tag="4")]
97 pub realized_pnl: i64,
98 #[prost(int64, tag="5")]
100 pub trading_cost: i64,
101 #[prost(int64, tag="6")]
103 pub last_updated_at: i64,
104}
105#[allow(clippy::derive_partial_eq_without_eq)]
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct FundExposure {
109 #[prost(message, repeated, tag="1")]
111 pub positions: ::prost::alloc::vec::Vec<PositionExposure>,
112 #[prost(int64, tag="2")]
114 pub last_updated_at: i64,
115}
116#[allow(clippy::derive_partial_eq_without_eq)]
118#[derive(Clone, PartialEq, ::prost::Message)]
119pub struct PositionExposure {
120 #[prost(string, tag="1")]
122 pub symbol: ::prost::alloc::string::String,
123 #[prost(int64, tag="2")]
125 pub quantity: i64,
126 #[prost(int64, tag="3")]
128 pub last_updated_at: i64,
129}
130#[allow(clippy::derive_partial_eq_without_eq)]
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct FundLimit {
133 #[prost(string, tag="1")]
134 pub fund: ::prost::alloc::string::String,
135 #[prost(enumeration="FundLimitType", tag="2")]
137 pub limit_type: i32,
138 #[prost(int64, tag="3")]
140 pub long_limit_quantity: i64,
141 #[prost(int64, tag="4")]
143 pub long_limit_amount: i64,
144 #[prost(int64, tag="5")]
146 pub short_limit_quantity: i64,
147 #[prost(int64, tag="6")]
149 pub short_limit_amount: i64,
150 #[prost(int64, tag="7")]
152 pub limit_quantity_per_order: i64,
153 #[prost(int64, tag="8")]
155 pub limit_amount_per_order: i64,
156 #[prost(int64, tag="9")]
158 pub tick_limit: i64,
159 #[prost(int64, tag="10")]
161 pub unfilled_limit: i64,
162 #[prost(int64, tag="11")]
164 pub spread_limit_quantity_per_order: i64,
165 #[prost(int64, tag="12")]
167 pub current_long_quantity: i64,
168 #[prost(int64, tag="13")]
170 pub current_long_amount: i64,
171 #[prost(int64, tag="14")]
173 pub current_short_quantity: i64,
174 #[prost(int64, tag="15")]
176 pub current_short_amount: i64,
177 #[prost(int64, tag="16")]
179 pub current_unfilled: i64,
180}
181#[allow(clippy::derive_partial_eq_without_eq)]
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct GetFundRequest {
187 #[prost(string, tag="1")]
189 pub fund: ::prost::alloc::string::String,
190}
191#[allow(clippy::derive_partial_eq_without_eq)]
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct ListFundsRequest {
195 #[prost(uint32, optional, tag="1")]
197 pub page_size: ::core::option::Option<u32>,
198 #[prost(string, optional, tag="2")]
200 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
201 #[prost(string, tag="3")]
211 pub filter: ::prost::alloc::string::String,
212}
213#[allow(clippy::derive_partial_eq_without_eq)]
215#[derive(Clone, PartialEq, ::prost::Message)]
216pub struct ListFundsResponse {
217 #[prost(message, repeated, tag="1")]
219 pub funds: ::prost::alloc::vec::Vec<Fund>,
220 #[prost(string, tag="2")]
222 pub next_page_token: ::prost::alloc::string::String,
223}
224#[allow(clippy::derive_partial_eq_without_eq)]
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct ListFundLimitsRequest {
227 #[prost(string, tag="1")]
229 pub fund: ::prost::alloc::string::String,
230 #[prost(string, tag="2")]
237 pub filter: ::prost::alloc::string::String,
238}
239#[allow(clippy::derive_partial_eq_without_eq)]
240#[derive(Clone, PartialEq, ::prost::Message)]
241pub struct ListFundLimitsResponse {
242 #[prost(message, repeated, tag="1")]
244 pub fund_limits: ::prost::alloc::vec::Vec<FundLimit>,
245 #[prost(string, tag="2")]
247 pub next_page_token: ::prost::alloc::string::String,
248}
249#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
250#[repr(i32)]
251pub enum FundLimitType {
252 FundLimitUnspecified = 0,
253 Kospi200Future = 1,
254 Stock = 2,
255}
256impl FundLimitType {
257 pub fn as_str_name(&self) -> &'static str {
262 match self {
263 FundLimitType::FundLimitUnspecified => "FUND_LIMIT_UNSPECIFIED",
264 FundLimitType::Kospi200Future => "KOSPI_200_Future",
265 FundLimitType::Stock => "STOCK",
266 }
267 }
268 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
270 match value {
271 "FUND_LIMIT_UNSPECIFIED" => Some(Self::FundLimitUnspecified),
272 "KOSPI_200_Future" => Some(Self::Kospi200Future),
273 "STOCK" => Some(Self::Stock),
274 _ => None,
275 }
276 }
277}
278include!("kdo.v1.fund.tonic.rs");
279include!("kdo.v1.fund.serde.rs");
280