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(int64, tag="2")]
101    pub quantity: i64,
102    /// 평균 진입가
103    #[prost(double, tag="3")]
104    pub average_entry_price: f64,
105    /// 현재가
106    #[prost(int64, tag="4")]
107    pub current_price: i64,
108    /// 미실현 손익
109    #[prost(int64, tag="5")]
110    pub unrealized_pnl: i64,
111    /// 실현 손익
112    #[prost(int64, tag="6")]
113    pub realized_pnl: i64,
114    /// 거래 비용
115    #[prost(int64, tag="7")]
116    pub trading_cost: i64,
117}
118/// 펀드 익스포저(Exposure) 관리
119#[allow(clippy::derive_partial_eq_without_eq)]
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct FundExposure {
122    /// 전체 익스포저
123    #[prost(int64, tag="1")]
124    pub total_exposure: i64,
125    /// 종목별 포지션 수량 목록
126    #[prost(message, repeated, tag="2")]
127    pub symbols: ::prost::alloc::vec::Vec<SymbolExposure>,
128}
129#[allow(clippy::derive_partial_eq_without_eq)]
130#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct SymbolExposure {
132    /// 종목 코드
133    #[prost(string, tag="1")]
134    pub symbol: ::prost::alloc::string::String,
135    /// 보유 수량
136    #[prost(int64, tag="2")]
137    pub quantity: i64,
138    /// 현재가
139    #[prost(int64, tag="3")]
140    pub current_price: i64,
141    /// 익스포저
142    #[prost(int64, tag="4")]
143    pub exposure: i64,
144}
145#[allow(clippy::derive_partial_eq_without_eq)]
146#[derive(Clone, PartialEq, ::prost::Message)]
147pub struct FundLimit {
148    #[prost(string, tag="1")]
149    pub fund: ::prost::alloc::string::String,
150    ///
151    #[prost(enumeration="FundLimitType", tag="2")]
152    pub limit_type: i32,
153    /// 매수한도수량
154    #[prost(int64, tag="3")]
155    pub long_limit_quantity: i64,
156    /// 매수한도금액
157    #[prost(int64, tag="4")]
158    pub long_limit_amount: i64,
159    /// 매도한도수량
160    #[prost(int64, tag="5")]
161    pub short_limit_quantity: i64,
162    /// 매도한도금액
163    #[prost(int64, tag="6")]
164    pub short_limit_amount: i64,
165    /// 1회 주문 한도계약수
166    #[prost(int64, tag="7")]
167    pub limit_quantity_per_order: i64,
168    /// 1회 주문 한도금액
169    #[prost(int64, tag="8")]
170    pub limit_amount_per_order: i64,
171    /// 1회 주문 한도틱
172    #[prost(int64, tag="9")]
173    pub tick_limit: i64,
174    /// 미체결한도수량
175    #[prost(int64, tag="10")]
176    pub unfilled_limit: i64,
177    /// 스프레드 1회 주문 한도계약수
178    #[prost(int64, tag="11")]
179    pub spread_limit_quantity_per_order: i64,
180    /// 현재 누적 매수 수량
181    #[prost(int64, tag="12")]
182    pub current_long_quantity: i64,
183    /// 현재 누적 매수 금액
184    #[prost(int64, tag="13")]
185    pub current_long_amount: i64,
186    /// 현재 누적 매도 수량 (음수로 저장)
187    #[prost(int64, tag="14")]
188    pub current_short_quantity: i64,
189    /// 현재 누적 매도 금액 (음수로 저장)
190    #[prost(int64, tag="15")]
191    pub current_short_amount: i64,
192    /// 현재 미체결 수량
193    #[prost(int64, tag="16")]
194    pub current_unfilled: i64,
195}
196#[allow(clippy::derive_partial_eq_without_eq)]
197#[derive(Clone, PartialEq, ::prost::Message)]
198pub struct LossLimitAlert {
199    #[prost(string, tag="1")]
200    pub fund_code: ::prost::alloc::string::String,
201    #[prost(int64, tag="2")]
202    pub current_loss: i64,
203    #[prost(int64, tag="3")]
204    pub loss_limit: i64,
205    #[prost(message, optional, tag="4")]
206    pub timestamp: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
207    #[prost(map="string, message", tag="5")]
208    pub snapshots: ::std::collections::HashMap<::prost::alloc::string::String, LossLimitSnapshot>,
209}
210#[allow(clippy::derive_partial_eq_without_eq)]
211#[derive(Clone, PartialEq, ::prost::Message)]
212pub struct LossLimitSnapshot {
213    #[prost(string, tag="1")]
214    pub symbol: ::prost::alloc::string::String,
215    #[prost(int64, tag="2")]
216    pub quantity: i64,
217    #[prost(double, tag="3")]
218    pub average_price: f64,
219    #[prost(double, tag="4")]
220    pub current_price: f64,
221    #[prost(int64, tag="5")]
222    pub unrealized_pnl: i64,
223}
224// ========== Request/Response Messages ==========
225
226/// GetFund 요청
227#[allow(clippy::derive_partial_eq_without_eq)]
228#[derive(Clone, PartialEq, ::prost::Message)]
229pub struct GetFundRequest {
230    /// 펀드 리소스 이름 (예: funds/KR1234567890)
231    #[prost(string, tag="1")]
232    pub fund: ::prost::alloc::string::String,
233}
234/// ListFunds 요청
235#[allow(clippy::derive_partial_eq_without_eq)]
236#[derive(Clone, PartialEq, ::prost::Message)]
237pub struct ListFundsRequest {
238    /// 페이지 크기 (optional)
239    #[prost(uint32, optional, tag="1")]
240    pub page_size: ::core::option::Option<u32>,
241    /// 페이지 토큰 (optional, for pagination)
242    #[prost(string, optional, tag="2")]
243    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
244    /// Available Sequence and Operator
245    /// * fund_code
246    ///    * `equal`, `contains`
247    /// * employee_name
248    ///    * `equal`, `contains`
249    ///
250    /// Examples
251    /// * filter=fund_code="0159"
252    /// * filter=employee_name:"홍길동"
253    #[prost(string, tag="3")]
254    pub filter: ::prost::alloc::string::String,
255}
256/// ListFunds 응답
257#[allow(clippy::derive_partial_eq_without_eq)]
258#[derive(Clone, PartialEq, ::prost::Message)]
259pub struct ListFundsResponse {
260    /// 펀드 목록
261    #[prost(message, repeated, tag="1")]
262    pub funds: ::prost::alloc::vec::Vec<Fund>,
263    /// 다음 페이지 토큰
264    #[prost(string, tag="2")]
265    pub next_page_token: ::prost::alloc::string::String,
266}
267#[allow(clippy::derive_partial_eq_without_eq)]
268#[derive(Clone, PartialEq, ::prost::Message)]
269pub struct ListFundTradingSnapshotsRequest {
270    /// 펀드 리소스 이름 (예: funds/KR1234567890)
271    #[prost(string, tag="1")]
272    pub fund: ::prost::alloc::string::String,
273    /// Available Sequence and Operator
274    /// * limit_type
275    ///    * `equal`
276    ///
277    /// Examples
278    /// * filter=limit_type=Stock
279    #[prost(string, tag="2")]
280    pub filter: ::prost::alloc::string::String,
281}
282#[allow(clippy::derive_partial_eq_without_eq)]
283#[derive(Clone, PartialEq, ::prost::Message)]
284pub struct ListFundTradingSnapshotsResponse {
285    /// 펀드 한도 목록
286    #[prost(message, repeated, tag="1")]
287    pub snapshots: ::prost::alloc::vec::Vec<FundTrading>,
288    /// 다음 페이지 토큰
289    #[prost(string, tag="2")]
290    pub next_page_token: ::prost::alloc::string::String,
291}
292#[allow(clippy::derive_partial_eq_without_eq)]
293#[derive(Clone, PartialEq, ::prost::Message)]
294pub struct WatchLossLimitAlertsRequest {
295    /// 펀드 리소스 이름 (예: funds/KR1234567890)
296    #[prost(string, tag="1")]
297    pub fund: ::prost::alloc::string::String,
298}
299#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
300#[repr(i32)]
301pub enum FundLimitType {
302    FundLimitUnspecified = 0,
303    Kospi200Future = 1,
304    Stock = 2,
305}
306impl FundLimitType {
307    /// String value of the enum field names used in the ProtoBuf definition.
308    ///
309    /// The values are not transformed in any way and thus are considered stable
310    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
311    pub fn as_str_name(&self) -> &'static str {
312        match self {
313            FundLimitType::FundLimitUnspecified => "FUND_LIMIT_UNSPECIFIED",
314            FundLimitType::Kospi200Future => "KOSPI_200_Future",
315            FundLimitType::Stock => "STOCK",
316        }
317    }
318    /// Creates an enum from field names used in the ProtoBuf definition.
319    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
320        match value {
321            "FUND_LIMIT_UNSPECIFIED" => Some(Self::FundLimitUnspecified),
322            "KOSPI_200_Future" => Some(Self::Kospi200Future),
323            "STOCK" => Some(Self::Stock),
324            _ => None,
325        }
326    }
327}
328include!("kdo.v1.fund.tonic.rs");
329include!("kdo.v1.fund.serde.rs");
330// @@protoc_insertion_point(module)