Skip to main content

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    /// ETF LP 여부
62    #[prost(bool, tag="22")]
63    pub etf_lp: bool,
64    /// 프로그램매매 구분 (nullable)
65    #[prost(enumeration="ProgramTradingType", optional, tag="23")]
66    pub program_trading_type: ::core::option::Option<i32>,
67}
68#[allow(clippy::derive_partial_eq_without_eq)]
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct FundLimit {
71    #[prost(string, tag="1")]
72    pub fund: ::prost::alloc::string::String,
73    ///
74    #[prost(enumeration="FundLimitType", tag="2")]
75    pub limit_type: i32,
76    /// 매수한도수량
77    #[prost(int64, tag="3")]
78    pub long_limit_quantity: i64,
79    /// 매수한도금액
80    #[prost(int64, tag="4")]
81    pub long_limit_amount: i64,
82    /// 매도한도수량
83    #[prost(int64, tag="5")]
84    pub short_limit_quantity: i64,
85    /// 매도한도금액
86    #[prost(int64, tag="6")]
87    pub short_limit_amount: i64,
88    /// 1회 주문 한도계약수
89    #[prost(int64, tag="7")]
90    pub limit_quantity_per_order: i64,
91    /// 1회 주문 한도금액
92    #[prost(int64, tag="8")]
93    pub limit_amount_per_order: i64,
94    /// 1회 주문 한도틱
95    #[prost(int64, tag="9")]
96    pub tick_limit: i64,
97    /// 미체결한도수량
98    #[prost(int64, tag="10")]
99    pub unfilled_limit: i64,
100    /// 스프레드 1회 주문 한도계약수
101    #[prost(int64, tag="11")]
102    pub spread_limit_quantity_per_order: i64,
103    /// 종목별 한도 상태 (런타임 추적)
104    #[prost(map="string, message", tag="17")]
105    pub symbol_states: ::std::collections::HashMap<::prost::alloc::string::String, SymbolLimitState>,
106}
107/// 종목별 한도 상태
108#[allow(clippy::derive_partial_eq_without_eq)]
109#[derive(Clone, Copy, PartialEq, ::prost::Message)]
110pub struct SymbolLimitState {
111    /// 현재 매수 수량
112    #[prost(int64, tag="1")]
113    pub current_long_quantity: i64,
114    /// 현재 매도 수량
115    #[prost(int64, tag="2")]
116    pub current_short_quantity: i64,
117    /// 현재 미체결 수량
118    #[prost(int64, tag="3")]
119    pub current_unfilled_quantity: i64,
120    /// 매수 미체결 수량
121    #[prost(int64, tag="4")]
122    pub current_unfilled_long_quantity: i64,
123    /// 매수 미체결 금액
124    #[prost(int64, tag="5")]
125    pub current_unfilled_long_amount: i64,
126    /// 매도 미체결 수량
127    #[prost(int64, tag="6")]
128    pub current_unfilled_short_quantity: i64,
129    /// 매도 미체결 금액
130    #[prost(int64, tag="7")]
131    pub current_unfilled_short_amount: i64,
132}
133// ========== Request/Response Messages ==========
134
135/// GetFund 요청
136#[allow(clippy::derive_partial_eq_without_eq)]
137#[derive(Clone, PartialEq, ::prost::Message)]
138pub struct GetFundRequest {
139    /// 펀드 리소스 이름 (예: funds/KR1234567890)
140    #[prost(string, tag="1")]
141    pub fund: ::prost::alloc::string::String,
142}
143/// GetFundLimit 요청
144#[allow(clippy::derive_partial_eq_without_eq)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct GetFundLimitRequest {
147    /// 펀드 리소스 이름 (예: funds/0159)
148    #[prost(string, tag="1")]
149    pub fund: ::prost::alloc::string::String,
150}
151/// GetFundLimit 응답
152#[allow(clippy::derive_partial_eq_without_eq)]
153#[derive(Clone, PartialEq, ::prost::Message)]
154pub struct GetFundLimitResponse {
155    /// 펀드별 종목별 한도정보
156    #[prost(map="string, message", tag="1")]
157    pub fund_limits: ::std::collections::HashMap<::prost::alloc::string::String, FundLimit>,
158}
159/// UpdateFundLimit 요청
160#[allow(clippy::derive_partial_eq_without_eq)]
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct UpdateFundLimitRequest {
163    /// 펀드 리소스 이름 (예: funds/0159)
164    #[prost(string, tag="1")]
165    pub fund: ::prost::alloc::string::String,
166    /// 종목 심볼
167    #[prost(string, tag="2")]
168    pub symbol: ::prost::alloc::string::String,
169    /// 수정할 한도 정보
170    #[prost(message, optional, tag="3")]
171    pub fund_limit: ::core::option::Option<FundLimit>,
172}
173/// ListFunds 요청
174#[allow(clippy::derive_partial_eq_without_eq)]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct ListFundsRequest {
177    /// 페이지 크기 (optional)
178    #[prost(uint32, optional, tag="1")]
179    pub page_size: ::core::option::Option<u32>,
180    /// 페이지 토큰 (optional, for pagination)
181    #[prost(string, optional, tag="2")]
182    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
183    /// Available Sequence and Operator
184    /// * fund_code
185    ///    * `equal`, `contains`
186    /// * employee_name
187    ///    * `equal`, `contains`
188    /// * name
189    ///    * `equal`, `contains`
190    ///
191    /// Examples
192    /// * filter=fund_code="0159"
193    /// * filter=fund_code:"015"
194    /// * filter=employee_name:"홍길동"
195    #[prost(string, tag="3")]
196    pub filter: ::prost::alloc::string::String,
197}
198/// ListFunds 응답
199#[allow(clippy::derive_partial_eq_without_eq)]
200#[derive(Clone, PartialEq, ::prost::Message)]
201pub struct ListFundsResponse {
202    /// 펀드 목록
203    #[prost(message, repeated, tag="1")]
204    pub funds: ::prost::alloc::vec::Vec<Fund>,
205    /// 다음 페이지 토큰
206    #[prost(string, tag="2")]
207    pub next_page_token: ::prost::alloc::string::String,
208}
209#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
210#[repr(i32)]
211pub enum FundLimitType {
212    FundLimitUnspecified = 0,
213    Kospi200Future = 1,
214    Stock = 2,
215}
216impl FundLimitType {
217    /// String value of the enum field names used in the ProtoBuf definition.
218    ///
219    /// The values are not transformed in any way and thus are considered stable
220    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
221    pub fn as_str_name(&self) -> &'static str {
222        match self {
223            FundLimitType::FundLimitUnspecified => "FUND_LIMIT_UNSPECIFIED",
224            FundLimitType::Kospi200Future => "KOSPI_200_Future",
225            FundLimitType::Stock => "STOCK",
226        }
227    }
228    /// Creates an enum from field names used in the ProtoBuf definition.
229    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
230        match value {
231            "FUND_LIMIT_UNSPECIFIED" => Some(Self::FundLimitUnspecified),
232            "KOSPI_200_Future" => Some(Self::Kospi200Future),
233            "STOCK" => Some(Self::Stock),
234            _ => None,
235        }
236    }
237}
238/// 프로그램매매 구분코드
239#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
240#[repr(i32)]
241pub enum ProgramTradingType {
242    Unspecified = 0,
243    /// 지수차익거래
244    IndexArbitrage = 1,
245    /// 주식차익거래
246    StockArbitrage = 2,
247    /// ETF LP 헷지거래
248    EtfLpHedge = 3,
249}
250impl ProgramTradingType {
251    /// String value of the enum field names used in the ProtoBuf definition.
252    ///
253    /// The values are not transformed in any way and thus are considered stable
254    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
255    pub fn as_str_name(&self) -> &'static str {
256        match self {
257            ProgramTradingType::Unspecified => "PROGRAM_TRADING_TYPE_UNSPECIFIED",
258            ProgramTradingType::IndexArbitrage => "INDEX_ARBITRAGE",
259            ProgramTradingType::StockArbitrage => "STOCK_ARBITRAGE",
260            ProgramTradingType::EtfLpHedge => "ETF_LP_HEDGE",
261        }
262    }
263    /// Creates an enum from field names used in the ProtoBuf definition.
264    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
265        match value {
266            "PROGRAM_TRADING_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
267            "INDEX_ARBITRAGE" => Some(Self::IndexArbitrage),
268            "STOCK_ARBITRAGE" => Some(Self::StockArbitrage),
269            "ETF_LP_HEDGE" => Some(Self::EtfLpHedge),
270            _ => None,
271        }
272    }
273}
274include!("kdo.v1.fund.tonic.rs");
275include!("kdo.v1.fund.serde.rs");
276// @@protoc_insertion_point(module)