ids_apis/
kdo.v1.fund.rs

1// @generated
2// This file is @generated by prost-build.
3/// 펀드 정보
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Fund {
7    /// 펀드 코드 (표준 코드)
8    #[prost(string, tag="1")]
9    pub code: ::prost::alloc::string::String,
10    /// 펀드 이름
11    #[prost(string, tag="2")]
12    pub name: ::prost::alloc::string::String,
13    /// 펀드분류코드
14    #[prost(string, tag="3")]
15    pub category_code: ::prost::alloc::string::String,
16    /// 펀드관리직원번호
17    #[prost(string, tag="4")]
18    pub employee_number: ::prost::alloc::string::String,
19    /// 펀드관리직원성명
20    #[prost(string, tag="5")]
21    pub employee_name: ::prost::alloc::string::String,
22    /// 펀드 한도
23    #[prost(string, tag="6")]
24    pub limit_amount: ::prost::alloc::string::String,
25    /// 관리부서코드
26    #[prost(string, tag="7")]
27    pub department_code: ::prost::alloc::string::String,
28    /// 펀드거래구분코드
29    #[prost(string, tag="8")]
30    pub trade_code: ::prost::alloc::string::String,
31    /// 파트구분코드
32    #[prost(string, tag="9")]
33    pub part_code: ::prost::alloc::string::String,
34    /// 상품매매구분코드
35    #[prost(string, tag="12")]
36    pub part_name: ::prost::alloc::string::String,
37    /// 포지션합산여부
38    #[prost(string, tag="13")]
39    pub product_deal_code: ::prost::alloc::string::String,
40    /// 파트구분명
41    #[prost(string, tag="14")]
42    pub add_up_position: ::prost::alloc::string::String,
43    /// 트레이딩시스템종류코드
44    #[prost(string, tag="15")]
45    pub trading_system_code: ::prost::alloc::string::String,
46    /// 독립거래단위구분코드
47    #[prost(string, tag="16")]
48    pub unique_trading_unit_code: ::prost::alloc::string::String,
49    /// 독립거래단위파트구분코드
50    #[prost(string, tag="17")]
51    pub unique_trading_unit_part_code: ::prost::alloc::string::String,
52    /// 독립거래단위일련번호
53    #[prost(int64, tag="18")]
54    pub unique_trading_unit_serial_number: i64,
55    /// 독립거래단위합산여부
56    #[prost(bool, tag="19")]
57    pub add_up_unique_trading_unit: bool,
58    /// 공매도ID
59    #[prost(string, tag="20")]
60    pub short_selling_id: ::prost::alloc::string::String,
61}
62#[allow(clippy::derive_partial_eq_without_eq)]
63#[derive(Clone, PartialEq, ::prost::Message)]
64pub struct FundTrading {
65    /// 펀드 한도 목록
66    #[prost(message, repeated, tag="1")]
67    pub fund_limits: ::prost::alloc::vec::Vec<FundLimit>,
68    /// 펀드 손익 목록
69    #[prost(message, optional, tag="2")]
70    pub pnls: ::core::option::Option<FundPnL>,
71    /// 펀드 익스포저 목록
72    #[prost(message, optional, tag="3")]
73    pub exposures: ::core::option::Option<FundExposure>,
74    ///
75    #[prost(message, optional, tag="4")]
76    pub timestamp: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
77}
78/// 펀드 손익(PnL) 관리
79#[allow(clippy::derive_partial_eq_without_eq)]
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct FundPnL {
82    /// 일일 손익
83    #[prost(int64, tag="1")]
84    pub daily_realized_pnl: i64,
85    /// 일일 손익
86    #[prost(int64, tag="2")]
87    pub daily_unrealized_pnl: i64,
88    /// 종목별 포지션 PnL 목록
89    #[prost(message, repeated, tag="3")]
90    pub symbols: ::prost::alloc::vec::Vec<SymbolPnL>,
91}
92/// 종목별 포지션 PnL
93#[allow(clippy::derive_partial_eq_without_eq)]
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct SymbolPnL {
96    /// 종목 코드
97    #[prost(string, tag="1")]
98    pub symbol: ::prost::alloc::string::String,
99    /// 평균 매입가
100    #[prost(double, tag="2")]
101    pub average_buy_price: f64,
102    /// 보유 수량
103    #[prost(int64, tag="3")]
104    pub quantity: i64,
105    /// 실현 손익
106    #[prost(int64, tag="4")]
107    pub realized_pnl: i64,
108    /// 거래 비용
109    #[prost(int64, tag="5")]
110    pub trading_cost: i64,
111}
112/// 펀드 익스포저(Exposure) 관리
113#[allow(clippy::derive_partial_eq_without_eq)]
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct FundExposure {
116    /// 전체 익스포저
117    #[prost(int64, tag="1")]
118    pub total_exposure: i64,
119    /// 종목별 포지션 수량 목록
120    #[prost(message, repeated, tag="2")]
121    pub symbols: ::prost::alloc::vec::Vec<SymbolExposure>,
122}
123#[allow(clippy::derive_partial_eq_without_eq)]
124#[derive(Clone, PartialEq, ::prost::Message)]
125pub struct SymbolExposure {
126    /// 종목 코드
127    #[prost(string, tag="1")]
128    pub symbol: ::prost::alloc::string::String,
129    /// 보유 수량
130    #[prost(int64, tag="2")]
131    pub quantity: i64,
132    /// 현재가
133    #[prost(int64, tag="3")]
134    pub current_price: i64,
135    /// 익스포저
136    #[prost(int64, tag="4")]
137    pub exposure: i64,
138}
139#[allow(clippy::derive_partial_eq_without_eq)]
140#[derive(Clone, PartialEq, ::prost::Message)]
141pub struct FundLimit {
142    #[prost(string, tag="1")]
143    pub fund: ::prost::alloc::string::String,
144    ///
145    #[prost(enumeration="FundLimitType", tag="2")]
146    pub limit_type: i32,
147    /// 매수한도수량
148    #[prost(int64, tag="3")]
149    pub long_limit_quantity: i64,
150    /// 매수한도금액
151    #[prost(int64, tag="4")]
152    pub long_limit_amount: i64,
153    /// 매도한도수량
154    #[prost(int64, tag="5")]
155    pub short_limit_quantity: i64,
156    /// 매도한도금액
157    #[prost(int64, tag="6")]
158    pub short_limit_amount: i64,
159    /// 1회 주문 한도계약수
160    #[prost(int64, tag="7")]
161    pub limit_quantity_per_order: i64,
162    /// 1회 주문 한도금액
163    #[prost(int64, tag="8")]
164    pub limit_amount_per_order: i64,
165    /// 1회 주문 한도틱
166    #[prost(int64, tag="9")]
167    pub tick_limit: i64,
168    /// 미체결한도수량
169    #[prost(int64, tag="10")]
170    pub unfilled_limit: i64,
171    /// 스프레드 1회 주문 한도계약수
172    #[prost(int64, tag="11")]
173    pub spread_limit_quantity_per_order: i64,
174    /// 현재 누적 매수 수량
175    #[prost(int64, tag="12")]
176    pub current_long_quantity: i64,
177    /// 현재 누적 매수 금액
178    #[prost(int64, tag="13")]
179    pub current_long_amount: i64,
180    /// 현재 누적 매도 수량 (음수로 저장)
181    #[prost(int64, tag="14")]
182    pub current_short_quantity: i64,
183    /// 현재 누적 매도 금액 (음수로 저장)
184    #[prost(int64, tag="15")]
185    pub current_short_amount: i64,
186    /// 현재 미체결 수량
187    #[prost(int64, tag="16")]
188    pub current_unfilled: i64,
189}
190#[allow(clippy::derive_partial_eq_without_eq)]
191#[derive(Clone, PartialEq, ::prost::Message)]
192pub struct LossLimitAlert {
193    #[prost(string, tag="1")]
194    pub fund_code: ::prost::alloc::string::String,
195    #[prost(int64, tag="2")]
196    pub current_loss: i64,
197    #[prost(int64, tag="3")]
198    pub loss_limit: i64,
199    #[prost(message, optional, tag="4")]
200    pub timestamp: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
201    #[prost(map="string, message", tag="5")]
202    pub snapshots: ::std::collections::HashMap<::prost::alloc::string::String, LossLimitSnapshot>,
203}
204#[allow(clippy::derive_partial_eq_without_eq)]
205#[derive(Clone, PartialEq, ::prost::Message)]
206pub struct LossLimitSnapshot {
207    #[prost(string, tag="1")]
208    pub symbol: ::prost::alloc::string::String,
209    #[prost(int64, tag="2")]
210    pub quantity: i64,
211    #[prost(double, tag="3")]
212    pub average_price: f64,
213    #[prost(double, tag="4")]
214    pub current_price: f64,
215    #[prost(int64, tag="5")]
216    pub unrealized_pnl: i64,
217}
218// ========== Request/Response Messages ==========
219
220/// GetFund 요청
221#[allow(clippy::derive_partial_eq_without_eq)]
222#[derive(Clone, PartialEq, ::prost::Message)]
223pub struct GetFundRequest {
224    /// 펀드 리소스 이름 (예: funds/KR1234567890)
225    #[prost(string, tag="1")]
226    pub fund: ::prost::alloc::string::String,
227}
228/// ListFunds 요청
229#[allow(clippy::derive_partial_eq_without_eq)]
230#[derive(Clone, PartialEq, ::prost::Message)]
231pub struct ListFundsRequest {
232    /// 페이지 크기 (optional)
233    #[prost(uint32, optional, tag="1")]
234    pub page_size: ::core::option::Option<u32>,
235    /// 페이지 토큰 (optional, for pagination)
236    #[prost(string, optional, tag="2")]
237    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
238    /// Available Sequence and Operator
239    /// * fund_code
240    ///    * `equal`, `contains`
241    /// * employee_name
242    ///    * `equal`, `contains`
243    ///
244    /// Examples
245    /// * filter=fund_code="0159"
246    /// * filter=employee_name:"홍길동"
247    #[prost(string, tag="3")]
248    pub filter: ::prost::alloc::string::String,
249}
250/// ListFunds 응답
251#[allow(clippy::derive_partial_eq_without_eq)]
252#[derive(Clone, PartialEq, ::prost::Message)]
253pub struct ListFundsResponse {
254    /// 펀드 목록
255    #[prost(message, repeated, tag="1")]
256    pub funds: ::prost::alloc::vec::Vec<Fund>,
257    /// 다음 페이지 토큰
258    #[prost(string, tag="2")]
259    pub next_page_token: ::prost::alloc::string::String,
260}
261#[allow(clippy::derive_partial_eq_without_eq)]
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct ListFundTradingSnapshotsRequest {
264    /// 펀드 리소스 이름 (예: funds/KR1234567890)
265    #[prost(string, tag="1")]
266    pub fund: ::prost::alloc::string::String,
267    /// Available Sequence and Operator
268    /// * limit_type
269    ///    * `equal`
270    ///
271    /// Examples
272    /// * filter=limit_type=Stock
273    #[prost(string, tag="2")]
274    pub filter: ::prost::alloc::string::String,
275}
276#[allow(clippy::derive_partial_eq_without_eq)]
277#[derive(Clone, PartialEq, ::prost::Message)]
278pub struct ListFundTradingSnapshotsResponse {
279    /// 펀드 한도 목록
280    #[prost(message, repeated, tag="1")]
281    pub snapshots: ::prost::alloc::vec::Vec<FundTrading>,
282    /// 다음 페이지 토큰
283    #[prost(string, tag="2")]
284    pub next_page_token: ::prost::alloc::string::String,
285}
286#[allow(clippy::derive_partial_eq_without_eq)]
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct WatchLossLimitAlertsRequest {
289    /// 펀드 리소스 이름 (예: funds/KR1234567890)
290    #[prost(string, tag="1")]
291    pub fund: ::prost::alloc::string::String,
292}
293#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
294#[repr(i32)]
295pub enum FundLimitType {
296    FundLimitUnspecified = 0,
297    Kospi200Future = 1,
298    Stock = 2,
299}
300impl FundLimitType {
301    /// String value of the enum field names used in the ProtoBuf definition.
302    ///
303    /// The values are not transformed in any way and thus are considered stable
304    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
305    pub fn as_str_name(&self) -> &'static str {
306        match self {
307            FundLimitType::FundLimitUnspecified => "FUND_LIMIT_UNSPECIFIED",
308            FundLimitType::Kospi200Future => "KOSPI_200_Future",
309            FundLimitType::Stock => "STOCK",
310        }
311    }
312    /// Creates an enum from field names used in the ProtoBuf definition.
313    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
314        match value {
315            "FUND_LIMIT_UNSPECIFIED" => Some(Self::FundLimitUnspecified),
316            "KOSPI_200_Future" => Some(Self::Kospi200Future),
317            "STOCK" => Some(Self::Stock),
318            _ => None,
319        }
320    }
321}
322include!("kdo.v1.fund.tonic.rs");
323include!("kdo.v1.fund.serde.rs");
324// @@protoc_insertion_point(module)