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    #[prost(message, optional, tag="21")]
63    pub pnl: ::core::option::Option<FundPnL>,
64    /// 펀드 익스포저 정보
65    #[prost(message, optional, tag="22")]
66    pub positions: ::core::option::Option<FundPosition>,
67}
68/// 펀드 손익(PnL) 관리
69#[allow(clippy::derive_partial_eq_without_eq)]
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct FundPnL {
72    /// 종목별 포지션 PnL 목록
73    #[prost(message, repeated, tag="1")]
74    pub symbols: ::prost::alloc::vec::Vec<SymbolPnL>,
75    /// 일일 손익
76    #[prost(int64, tag="2")]
77    pub daily_pnl: i64,
78}
79/// 종목별 포지션 PnL
80#[allow(clippy::derive_partial_eq_without_eq)]
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct SymbolPnL {
83    /// 종목 코드
84    #[prost(string, tag="1")]
85    pub symbol: ::prost::alloc::string::String,
86    /// 평균 매입가
87    #[prost(double, tag="2")]
88    pub average_buy_price: f64,
89    /// 보유 수량
90    #[prost(int64, tag="3")]
91    pub quantity: i64,
92    /// 실현 손익
93    #[prost(int64, tag="4")]
94    pub realized_pnl: i64,
95    /// 거래 비용
96    #[prost(int64, tag="5")]
97    pub trading_cost: i64,
98}
99/// 펀드 익스포저(Exposure) 관리
100#[allow(clippy::derive_partial_eq_without_eq)]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct FundPosition {
103    /// 종목별 포지션 수량 목록
104    #[prost(map="string, int64", tag="1")]
105    pub symbols: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
106}
107/// 종목별 포지션 익스포저
108#[allow(clippy::derive_partial_eq_without_eq)]
109#[derive(Clone, PartialEq, ::prost::Message)]
110pub struct PositionExposure {
111    /// 종목 코드
112    #[prost(string, tag="1")]
113    pub symbol: ::prost::alloc::string::String,
114    /// 보유 수량
115    #[prost(int64, tag="2")]
116    pub quantity: i64,
117    /// 마지막 업데이트 시각 (Unix timestamp micros)
118    #[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    ///
127    #[prost(enumeration="FundLimitType", tag="2")]
128    pub limit_type: i32,
129    /// 매수한도수량
130    #[prost(int64, tag="3")]
131    pub long_limit_quantity: i64,
132    /// 매수한도금액
133    #[prost(int64, tag="4")]
134    pub long_limit_amount: i64,
135    /// 매도한도수량
136    #[prost(int64, tag="5")]
137    pub short_limit_quantity: i64,
138    /// 매도한도금액
139    #[prost(int64, tag="6")]
140    pub short_limit_amount: i64,
141    /// 1회 주문 한도계약수
142    #[prost(int64, tag="7")]
143    pub limit_quantity_per_order: i64,
144    /// 1회 주문 한도금액
145    #[prost(int64, tag="8")]
146    pub limit_amount_per_order: i64,
147    /// 1회 주문 한도틱
148    #[prost(int64, tag="9")]
149    pub tick_limit: i64,
150    /// 미체결한도수량
151    #[prost(int64, tag="10")]
152    pub unfilled_limit: i64,
153    /// 스프레드 1회 주문 한도계약수
154    #[prost(int64, tag="11")]
155    pub spread_limit_quantity_per_order: i64,
156    /// 현재 누적 매수 수량
157    #[prost(int64, tag="12")]
158    pub current_long_quantity: i64,
159    /// 현재 누적 매수 금액
160    #[prost(int64, tag="13")]
161    pub current_long_amount: i64,
162    /// 현재 누적 매도 수량 (음수로 저장)
163    #[prost(int64, tag="14")]
164    pub current_short_quantity: i64,
165    /// 현재 누적 매도 금액 (음수로 저장)
166    #[prost(int64, tag="15")]
167    pub current_short_amount: i64,
168    /// 현재 미체결 수량
169    #[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// ========== Request/Response Messages ==========
201
202/// GetFund 요청
203#[allow(clippy::derive_partial_eq_without_eq)]
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct GetFundRequest {
206    /// 펀드 리소스 이름 (예: funds/KR1234567890)
207    #[prost(string, tag="1")]
208    pub fund: ::prost::alloc::string::String,
209}
210/// ListFunds 요청
211#[allow(clippy::derive_partial_eq_without_eq)]
212#[derive(Clone, PartialEq, ::prost::Message)]
213pub struct ListFundsRequest {
214    /// 페이지 크기 (optional)
215    #[prost(uint32, optional, tag="1")]
216    pub page_size: ::core::option::Option<u32>,
217    /// 페이지 토큰 (optional, for pagination)
218    #[prost(string, optional, tag="2")]
219    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
220    /// Available Sequence and Operator
221    /// * fund_code
222    ///    * `equal`, `contains`
223    /// * employee_name
224    ///    * `equal`, `contains`
225    ///
226    /// Examples
227    /// * filter=fund_code="0159"
228    /// * filter=employee_name:"홍길동"
229    #[prost(string, tag="3")]
230    pub filter: ::prost::alloc::string::String,
231}
232/// ListFunds 응답
233#[allow(clippy::derive_partial_eq_without_eq)]
234#[derive(Clone, PartialEq, ::prost::Message)]
235pub struct ListFundsResponse {
236    /// 펀드 목록
237    #[prost(message, repeated, tag="1")]
238    pub funds: ::prost::alloc::vec::Vec<Fund>,
239    /// 다음 페이지 토큰
240    #[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    /// 펀드 리소스 이름 (예: funds/KR1234567890)
247    #[prost(string, tag="1")]
248    pub fund: ::prost::alloc::string::String,
249    /// Available Sequence and Operator
250    /// * limit_type
251    ///    * `equal`
252    ///
253    /// Examples
254    /// * filter=limit_type=Stock
255    #[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    /// 펀드 한도 목록
262    #[prost(message, repeated, tag="1")]
263    pub fund_limits: ::prost::alloc::vec::Vec<FundLimit>,
264    /// 다음 페이지 토큰
265    #[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    /// 펀드 리소스 이름 (예: funds/KR1234567890)
272    #[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    /// String value of the enum field names used in the ProtoBuf definition.
284    ///
285    /// The values are not transformed in any way and thus are considered stable
286    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
287    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    /// Creates an enum from field names used in the ProtoBuf definition.
295    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// @@protoc_insertion_point(module)