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 exposure: ::core::option::Option<FundExposure>,
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 positions: ::prost::alloc::vec::Vec<PositionPnL>,
75    /// 일일 손익
76    #[prost(int64, tag="2")]
77    pub daily_pnl: i64,
78    /// 마지막 업데이트 시각 (Unix timestamp micros)
79    #[prost(int64, tag="3")]
80    pub last_updated_at: i64,
81}
82/// 종목별 포지션 PnL
83#[allow(clippy::derive_partial_eq_without_eq)]
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct PositionPnL {
86    /// 종목 코드
87    #[prost(string, tag="1")]
88    pub symbol: ::prost::alloc::string::String,
89    /// 평균 매입가
90    #[prost(double, tag="2")]
91    pub average_buy_price: f64,
92    /// 보유 수량
93    #[prost(int64, tag="3")]
94    pub quantity: i64,
95    /// 실현 손익
96    #[prost(int64, tag="4")]
97    pub realized_pnl: i64,
98    /// 거래 비용
99    #[prost(int64, tag="5")]
100    pub trading_cost: i64,
101    /// 마지막 업데이트 시각 (Unix timestamp micros)
102    #[prost(int64, tag="6")]
103    pub last_updated_at: i64,
104}
105/// 펀드 익스포저(Exposure) 관리
106#[allow(clippy::derive_partial_eq_without_eq)]
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct FundExposure {
109    /// 종목별 포지션 수량 목록
110    #[prost(message, repeated, tag="1")]
111    pub positions: ::prost::alloc::vec::Vec<PositionExposure>,
112    /// 마지막 업데이트 시각 (Unix timestamp micros)
113    #[prost(int64, tag="2")]
114    pub last_updated_at: i64,
115}
116/// 종목별 포지션 익스포저
117#[allow(clippy::derive_partial_eq_without_eq)]
118#[derive(Clone, PartialEq, ::prost::Message)]
119pub struct PositionExposure {
120    /// 종목 코드
121    #[prost(string, tag="1")]
122    pub symbol: ::prost::alloc::string::String,
123    /// 보유 수량
124    #[prost(int64, tag="2")]
125    pub quantity: i64,
126    /// 마지막 업데이트 시각 (Unix timestamp micros)
127    #[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    ///
136    #[prost(enumeration="FundLimitType", tag="2")]
137    pub limit_type: i32,
138    /// 매수한도수량
139    #[prost(int64, tag="3")]
140    pub long_limit_quantity: i64,
141    /// 매수한도금액
142    #[prost(int64, tag="4")]
143    pub long_limit_amount: i64,
144    /// 매도한도수량
145    #[prost(int64, tag="5")]
146    pub short_limit_quantity: i64,
147    /// 매도한도금액
148    #[prost(int64, tag="6")]
149    pub short_limit_amount: i64,
150    /// 1회 주문 한도계약수
151    #[prost(int64, tag="7")]
152    pub limit_quantity_per_order: i64,
153    /// 1회 주문 한도금액
154    #[prost(int64, tag="8")]
155    pub limit_amount_per_order: i64,
156    /// 1회 주문 한도틱
157    #[prost(int64, tag="9")]
158    pub tick_limit: i64,
159    /// 미체결한도수량
160    #[prost(int64, tag="10")]
161    pub unfilled_limit: i64,
162    /// 스프레드 1회 주문 한도계약수
163    #[prost(int64, tag="11")]
164    pub spread_limit_quantity_per_order: i64,
165    /// 현재 누적 매수 수량
166    #[prost(int64, tag="12")]
167    pub current_long_quantity: i64,
168    /// 현재 누적 매수 금액
169    #[prost(int64, tag="13")]
170    pub current_long_amount: i64,
171    /// 현재 누적 매도 수량 (음수로 저장)
172    #[prost(int64, tag="14")]
173    pub current_short_quantity: i64,
174    /// 현재 누적 매도 금액 (음수로 저장)
175    #[prost(int64, tag="15")]
176    pub current_short_amount: i64,
177    /// 현재 미체결 수량
178    #[prost(int64, tag="16")]
179    pub current_unfilled: i64,
180}
181// ========== Request/Response Messages ==========
182
183/// GetFund 요청
184#[allow(clippy::derive_partial_eq_without_eq)]
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct GetFundRequest {
187    /// 펀드 리소스 이름 (예: funds/KR1234567890)
188    #[prost(string, tag="1")]
189    pub fund: ::prost::alloc::string::String,
190}
191/// ListFunds 요청
192#[allow(clippy::derive_partial_eq_without_eq)]
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct ListFundsRequest {
195    /// 페이지 크기 (optional)
196    #[prost(uint32, optional, tag="1")]
197    pub page_size: ::core::option::Option<u32>,
198    /// 페이지 토큰 (optional, for pagination)
199    #[prost(string, optional, tag="2")]
200    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
201    /// Available Sequence and Operator
202    /// * fund_code
203    ///    * `equal`, `contains`
204    /// * employee_name
205    ///    * `equal`, `contains`
206    ///
207    /// Examples
208    /// * filter=fund_code="0159"
209    /// * filter=employee_name:"홍길동"
210    #[prost(string, tag="3")]
211    pub filter: ::prost::alloc::string::String,
212}
213/// ListFunds 응답
214#[allow(clippy::derive_partial_eq_without_eq)]
215#[derive(Clone, PartialEq, ::prost::Message)]
216pub struct ListFundsResponse {
217    /// 펀드 목록
218    #[prost(message, repeated, tag="1")]
219    pub funds: ::prost::alloc::vec::Vec<Fund>,
220    /// 다음 페이지 토큰
221    #[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    /// 펀드 리소스 이름 (예: funds/KR1234567890)
228    #[prost(string, tag="1")]
229    pub fund: ::prost::alloc::string::String,
230    /// Available Sequence and Operator
231    /// * limit_type
232    ///    * `equal`
233    ///
234    /// Examples
235    /// * filter=limit_type=Stock
236    #[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    /// 펀드 한도 목록
243    #[prost(message, repeated, tag="1")]
244    pub fund_limits: ::prost::alloc::vec::Vec<FundLimit>,
245    /// 다음 페이지 토큰
246    #[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    /// String value of the enum field names used in the ProtoBuf definition.
258    ///
259    /// The values are not transformed in any way and thus are considered stable
260    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
261    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    /// Creates an enum from field names used in the ProtoBuf definition.
269    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// @@protoc_insertion_point(module)