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// ========== Request/Response Messages ==========
173
174/// GetFund 요청
175#[allow(clippy::derive_partial_eq_without_eq)]
176#[derive(Clone, PartialEq, ::prost::Message)]
177pub struct GetFundRequest {
178    /// 펀드 리소스 이름 (예: funds/KR1234567890)
179    #[prost(string, tag="1")]
180    pub fund: ::prost::alloc::string::String,
181}
182/// ListFunds 요청
183#[allow(clippy::derive_partial_eq_without_eq)]
184#[derive(Clone, PartialEq, ::prost::Message)]
185pub struct ListFundsRequest {
186    /// 페이지 크기 (optional)
187    #[prost(uint32, optional, tag="1")]
188    pub page_size: ::core::option::Option<u32>,
189    /// 페이지 토큰 (optional, for pagination)
190    #[prost(string, optional, tag="2")]
191    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
192    /// Available Sequence and Operator
193    /// * fund_code
194    ///    * `equal`, `contains`
195    /// * employee_name
196    ///    * `equal`, `contains`
197    ///
198    /// Examples
199    /// * filter=fund_code="0159"
200    /// * filter=employee_name:"홍길동"
201    #[prost(string, tag="3")]
202    pub filter: ::prost::alloc::string::String,
203}
204/// ListFunds 응답
205#[allow(clippy::derive_partial_eq_without_eq)]
206#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct ListFundsResponse {
208    /// 펀드 목록
209    #[prost(message, repeated, tag="1")]
210    pub funds: ::prost::alloc::vec::Vec<Fund>,
211    /// 다음 페이지 토큰
212    #[prost(string, tag="2")]
213    pub next_page_token: ::prost::alloc::string::String,
214}
215#[allow(clippy::derive_partial_eq_without_eq)]
216#[derive(Clone, PartialEq, ::prost::Message)]
217pub struct ListFundLimitsRequest {
218    /// 펀드 리소스 이름 (예: funds/KR1234567890)
219    #[prost(string, tag="1")]
220    pub fund: ::prost::alloc::string::String,
221    /// Available Sequence and Operator
222    /// * limit_type
223    ///    * `equal`
224    ///
225    /// Examples
226    /// * filter=limit_type=Stock
227    #[prost(string, tag="2")]
228    pub filter: ::prost::alloc::string::String,
229}
230#[allow(clippy::derive_partial_eq_without_eq)]
231#[derive(Clone, PartialEq, ::prost::Message)]
232pub struct ListFundLimitsResponse {
233    /// 펀드 한도 목록
234    #[prost(message, repeated, tag="1")]
235    pub fund_limits: ::prost::alloc::vec::Vec<FundLimit>,
236    /// 다음 페이지 토큰
237    #[prost(string, tag="2")]
238    pub next_page_token: ::prost::alloc::string::String,
239}
240#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
241#[repr(i32)]
242pub enum FundLimitType {
243    FundLimitUnspecified = 0,
244    Kospi200Future = 1,
245    Stock = 2,
246}
247impl FundLimitType {
248    /// String value of the enum field names used in the ProtoBuf definition.
249    ///
250    /// The values are not transformed in any way and thus are considered stable
251    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
252    pub fn as_str_name(&self) -> &'static str {
253        match self {
254            FundLimitType::FundLimitUnspecified => "FUND_LIMIT_UNSPECIFIED",
255            FundLimitType::Kospi200Future => "KOSPI_200_Future",
256            FundLimitType::Stock => "STOCK",
257        }
258    }
259    /// Creates an enum from field names used in the ProtoBuf definition.
260    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
261        match value {
262            "FUND_LIMIT_UNSPECIFIED" => Some(Self::FundLimitUnspecified),
263            "KOSPI_200_Future" => Some(Self::Kospi200Future),
264            "STOCK" => Some(Self::Stock),
265            _ => None,
266        }
267    }
268}
269include!("kdo.v1.fund.tonic.rs");
270include!("kdo.v1.fund.serde.rs");
271// @@protoc_insertion_point(module)