ids_apis/
kdo.v1.lp.rs

1// @generated
2// This file is @generated by prost-build.
3/// ETF LP 설정
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct EtfLp {
7    /// ETF 심볼
8    #[prost(string, tag="1")]
9    pub symbol: ::prost::alloc::string::String,
10    /// Fund
11    #[prost(string, tag="2")]
12    pub fund_code: ::prost::alloc::string::String,
13    /// Offset (호가 스프레드 조정, 원 단위, i64)
14    #[prost(int64, tag="4")]
15    pub bid_offset: i64,
16    /// Offset (호가 스프레드 조정, 원 단위, i64)
17    #[prost(int64, tag="5")]
18    pub ask_offset: i64,
19    /// Basis 스프레드 (원 단위, i64)
20    #[prost(int64, tag="6")]
21    pub basis: i64,
22    /// 주문 수량 (i64)
23    #[prost(int64, tag="7")]
24    pub quantity: i64,
25    /// 호가 깊이 (양방향 레벨 수)
26    #[prost(uint32, tag="8")]
27    pub depth: u32,
28    /// ETF tick 크기 (원 단위, i64)
29    #[prost(int64, tag="9")]
30    pub tick_size: i64,
31}
32// ========== ETF LP Status Messages ==========
33
34/// ETF LP 상태
35#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct EtfLpStatus {
38    /// LP 상태
39    #[prost(enumeration="EtfLpState", tag="1")]
40    pub state: i32,
41    /// 시작 시간 (Unix timestamp, seconds)
42    #[prost(int64, tag="2")]
43    pub start_time: i64,
44    /// 주문 통계
45    #[prost(message, optional, tag="3")]
46    pub order_stats: ::core::option::Option<OrderStats>,
47    /// Order Limiter 상태
48    #[prost(message, optional, tag="4")]
49    pub order_limit: ::core::option::Option<OrderLimitStatus>,
50    /// 가격 정보
51    #[prost(message, optional, tag="5")]
52    pub pricing: ::core::option::Option<LpPricing>,
53}
54/// 주문 통계
55#[allow(clippy::derive_partial_eq_without_eq)]
56#[derive(Clone, Copy, PartialEq, ::prost::Message)]
57pub struct OrderStats {
58    /// 총 전송 주문 수
59    #[prost(uint64, tag="1")]
60    pub total_orders_sent: u64,
61    /// 접수된 주문 수
62    #[prost(uint64, tag="2")]
63    pub orders_accepted: u64,
64    /// 거부된 주문 수
65    #[prost(uint64, tag="3")]
66    pub orders_rejected: u64,
67    /// 체결된 주문 수
68    #[prost(uint64, tag="4")]
69    pub orders_filled: u64,
70    /// 총 체결 수량
71    #[prost(int64, tag="5")]
72    pub total_filled_quantity: i64,
73    /// 일일 체결 수량
74    #[prost(int64, tag="6")]
75    pub daily_filled_quantity: i64,
76}
77/// Order Limiter 상태
78#[allow(clippy::derive_partial_eq_without_eq)]
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct OrderLimitStatus {
81    /// 일일 누적 체결 수량 (i64)
82    #[prost(int64, tag="1")]
83    pub daily_filled_quantity: i64,
84    /// 일일 누적 체결 수량 한도 (i64)
85    #[prost(int64, tag="2")]
86    pub daily_cumulative_limit: i64,
87    /// 시간 프레임별 주문 개수 현황
88    #[prost(message, repeated, tag="3")]
89    pub time_frame_status: ::prost::alloc::vec::Vec<TimeFrameStatus>,
90    /// 일일 사용률 (%)
91    #[prost(double, tag="4")]
92    pub daily_usage_percent: f64,
93}
94/// 시간 프레임별 상태
95#[allow(clippy::derive_partial_eq_without_eq)]
96#[derive(Clone, Copy, PartialEq, ::prost::Message)]
97pub struct TimeFrameStatus {
98    /// 시간 윈도우 (초)
99    #[prost(uint64, tag="1")]
100    pub window_seconds: u64,
101    /// 현재 윈도우 내 주문 개수
102    #[prost(uint32, tag="2")]
103    pub current_count: u32,
104    /// 최대 주문 개수
105    #[prost(uint32, tag="3")]
106    pub max_orders: u32,
107    /// 사용률 (%)
108    #[prost(double, tag="4")]
109    pub usage_percent: f64,
110}
111/// LP 가격 정보
112#[allow(clippy::derive_partial_eq_without_eq)]
113#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct LpPricing {
115    /// ETF 가격 (원 단위, i64)
116    #[prost(string, tag="1")]
117    pub etf_price: ::prost::alloc::string::String,
118    /// 선물 가격 (원 단위, i64)
119    #[prost(string, tag="2")]
120    pub future_price: ::prost::alloc::string::String,
121    /// ETF NAV (원 단위, i64)
122    #[prost(string, tag="3")]
123    pub etf_nav: ::prost::alloc::string::String,
124}
125/// ========== Request/Response Messages ==========
126/// GetEtfLp
127#[allow(clippy::derive_partial_eq_without_eq)]
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct GetEtfLpRequest {
130    #[prost(string, tag="1")]
131    pub etf: ::prost::alloc::string::String,
132    #[prost(string, tag="2")]
133    pub fund: ::prost::alloc::string::String,
134}
135/// ListEtfLps
136#[allow(clippy::derive_partial_eq_without_eq)]
137#[derive(Clone, PartialEq, ::prost::Message)]
138pub struct ListEtfLpsRequest {
139    /// 페이지 크기 (optional)
140    #[prost(uint32, optional, tag="1")]
141    pub page_size: ::core::option::Option<u32>,
142    /// 페이지 토큰 (optional, for pagination)
143    #[prost(string, optional, tag="2")]
144    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
145    /// Available Sequence and Operator
146    /// * etf_symbol
147    ///    * `equal`, `contains`
148    /// * fund_code
149    ///    * `equal`, `contains`
150    ///
151    /// Examples
152    /// * filter=etf_symbol:"005930"
153    /// * filter=fund_code="0159"
154    #[prost(string, tag="3")]
155    pub filter: ::prost::alloc::string::String,
156}
157#[allow(clippy::derive_partial_eq_without_eq)]
158#[derive(Clone, PartialEq, ::prost::Message)]
159pub struct ListEtfLpsResponse {
160    /// ETF 목록
161    #[prost(message, repeated, tag="1")]
162    pub etf_lps: ::prost::alloc::vec::Vec<EtfLp>,
163    /// 다음 페이지 토큰
164    #[prost(string, tag="2")]
165    pub next_page_token: ::prost::alloc::string::String,
166}
167/// UpdateEtfLp
168#[allow(clippy::derive_partial_eq_without_eq)]
169#[derive(Clone, PartialEq, ::prost::Message)]
170pub struct UpdateEtfLpRequest {
171    #[prost(message, optional, tag="1")]
172    pub lp: ::core::option::Option<EtfLp>,
173    #[prost(message, optional, tag="2")]
174    pub update_mask: ::core::option::Option<super::super::super::google::protobuf::FieldMask>,
175}
176/// GetEtfLpStatus
177#[allow(clippy::derive_partial_eq_without_eq)]
178#[derive(Clone, PartialEq, ::prost::Message)]
179pub struct GetEtfLpStatusRequest {
180    #[prost(string, tag="1")]
181    pub etf: ::prost::alloc::string::String,
182    #[prost(string, tag="2")]
183    pub fund: ::prost::alloc::string::String,
184}
185/// StreamEtfLpStatus
186#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct StreamEtfLpStatusRequest {
189    #[prost(string, tag="1")]
190    pub etf: ::prost::alloc::string::String,
191    #[prost(string, tag="2")]
192    pub fund: ::prost::alloc::string::String,
193    /// 업데이트 간격 (초, optional, default: 1)
194    #[prost(uint32, optional, tag="3")]
195    pub update_interval_seconds: ::core::option::Option<u32>,
196}
197/// ETF LP 시작 요청
198#[allow(clippy::derive_partial_eq_without_eq)]
199#[derive(Clone, PartialEq, ::prost::Message)]
200pub struct StartEtfLpRequest {
201    #[prost(string, tag="1")]
202    pub etf: ::prost::alloc::string::String,
203    #[prost(string, tag="2")]
204    pub fund: ::prost::alloc::string::String,
205}
206/// ETF LP 시작 응답
207#[allow(clippy::derive_partial_eq_without_eq)]
208#[derive(Clone, PartialEq, ::prost::Message)]
209pub struct StartEtfLpResponse {
210    /// LP 상태
211    #[prost(message, optional, tag="1")]
212    pub status: ::core::option::Option<EtfLpStatus>,
213    /// 메시지
214    #[prost(string, tag="2")]
215    pub message: ::prost::alloc::string::String,
216}
217/// ETF LP 중지 요청
218#[allow(clippy::derive_partial_eq_without_eq)]
219#[derive(Clone, PartialEq, ::prost::Message)]
220pub struct StopEtfLpRequest {
221    #[prost(string, tag="1")]
222    pub etf: ::prost::alloc::string::String,
223    #[prost(string, tag="2")]
224    pub fund: ::prost::alloc::string::String,
225}
226/// ETF LP 중지 응답
227#[allow(clippy::derive_partial_eq_without_eq)]
228#[derive(Clone, PartialEq, ::prost::Message)]
229pub struct StopEtfLpResponse {
230    /// LP 상태
231    #[prost(message, optional, tag="1")]
232    pub status: ::core::option::Option<EtfLpStatus>,
233    /// 메시지
234    #[prost(string, tag="2")]
235    pub message: ::prost::alloc::string::String,
236}
237/// StreamEtfErrors 요청
238#[allow(clippy::derive_partial_eq_without_eq)]
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct StreamEtfErrorsRequest {
241    #[prost(string, tag="1")]
242    pub etf: ::prost::alloc::string::String,
243    #[prost(string, tag="2")]
244    pub fund: ::prost::alloc::string::String,
245}
246/// ETF LP 에러 이벤트
247#[allow(clippy::derive_partial_eq_without_eq)]
248#[derive(Clone, PartialEq, ::prost::Message)]
249pub struct EtfLpError {
250    /// ETF 심볼
251    #[prost(string, tag="1")]
252    pub symbol: ::prost::alloc::string::String,
253    /// 스레드 타입
254    #[prost(enumeration="ThreadType", tag="2")]
255    pub thread_type: i32,
256    /// 에러 타입
257    #[prost(enumeration="ErrorType", tag="3")]
258    pub error_type: i32,
259    /// 에러 메시지
260    #[prost(string, tag="4")]
261    pub error_message: ::prost::alloc::string::String,
262    /// 에러 발생 시간
263    #[prost(message, optional, tag="5")]
264    pub timestamp: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
265    /// 에러 레벨
266    #[prost(enumeration="ErrorLevel", tag="6")]
267    pub error_level: i32,
268}
269/// 주문 업데이트 스트리밍 요청
270#[allow(clippy::derive_partial_eq_without_eq)]
271#[derive(Clone, PartialEq, ::prost::Message)]
272pub struct GetUserOrderBookRequest {
273    #[prost(string, tag="1")]
274    pub etf: ::prost::alloc::string::String,
275    #[prost(string, tag="2")]
276    pub fund: ::prost::alloc::string::String,
277}
278/// 주문 업데이트 정보
279#[allow(clippy::derive_partial_eq_without_eq)]
280#[derive(Clone, PartialEq, ::prost::Message)]
281pub struct UserOrderbookData {
282    /// 매수 호가 (10단계, AIP-144)
283    #[prost(string, repeated, tag="1")]
284    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
285    /// 매도 호가 (10단계)
286    #[prost(string, repeated, tag="2")]
287    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
288    /// 매수 수량 (10단계)
289    #[prost(int64, repeated, tag="3")]
290    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
291    /// 매도 수량 (10단계)
292    #[prost(int64, repeated, tag="4")]
293    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
294}
295/// 복제 방법
296#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
297#[repr(i32)]
298pub enum ReplicationMethod {
299    Unspecified = 0,
300    Physical = 1,
301    Synthetic = 2,
302    FuturesBased = 3,
303}
304impl ReplicationMethod {
305    /// String value of the enum field names used in the ProtoBuf definition.
306    ///
307    /// The values are not transformed in any way and thus are considered stable
308    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
309    pub fn as_str_name(&self) -> &'static str {
310        match self {
311            ReplicationMethod::Unspecified => "REPLICATION_METHOD_UNSPECIFIED",
312            ReplicationMethod::Physical => "REPLICATION_METHOD_PHYSICAL",
313            ReplicationMethod::Synthetic => "REPLICATION_METHOD_SYNTHETIC",
314            ReplicationMethod::FuturesBased => "REPLICATION_METHOD_FUTURES_BASED",
315        }
316    }
317    /// Creates an enum from field names used in the ProtoBuf definition.
318    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
319        match value {
320            "REPLICATION_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
321            "REPLICATION_METHOD_PHYSICAL" => Some(Self::Physical),
322            "REPLICATION_METHOD_SYNTHETIC" => Some(Self::Synthetic),
323            "REPLICATION_METHOD_FUTURES_BASED" => Some(Self::FuturesBased),
324            _ => None,
325        }
326    }
327}
328/// ETF LP 상태 enum
329#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
330#[repr(i32)]
331pub enum EtfLpState {
332    Unspecified = 0,
333    Idle = 1,
334    Running = 2,
335    Stopping = 3,
336    Error = 4,
337}
338impl EtfLpState {
339    /// String value of the enum field names used in the ProtoBuf definition.
340    ///
341    /// The values are not transformed in any way and thus are considered stable
342    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
343    pub fn as_str_name(&self) -> &'static str {
344        match self {
345            EtfLpState::Unspecified => "ETF_LP_STATE_UNSPECIFIED",
346            EtfLpState::Idle => "ETF_LP_STATE_IDLE",
347            EtfLpState::Running => "ETF_LP_STATE_RUNNING",
348            EtfLpState::Stopping => "ETF_LP_STATE_STOPPING",
349            EtfLpState::Error => "ETF_LP_STATE_ERROR",
350        }
351    }
352    /// Creates an enum from field names used in the ProtoBuf definition.
353    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
354        match value {
355            "ETF_LP_STATE_UNSPECIFIED" => Some(Self::Unspecified),
356            "ETF_LP_STATE_IDLE" => Some(Self::Idle),
357            "ETF_LP_STATE_RUNNING" => Some(Self::Running),
358            "ETF_LP_STATE_STOPPING" => Some(Self::Stopping),
359            "ETF_LP_STATE_ERROR" => Some(Self::Error),
360            _ => None,
361        }
362    }
363}
364/// 스레드 타입
365#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
366#[repr(i32)]
367pub enum ThreadType {
368    Unspecified = 0,
369    Quote = 1,
370    Hedge = 2,
371}
372impl ThreadType {
373    /// String value of the enum field names used in the ProtoBuf definition.
374    ///
375    /// The values are not transformed in any way and thus are considered stable
376    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
377    pub fn as_str_name(&self) -> &'static str {
378        match self {
379            ThreadType::Unspecified => "THREAD_TYPE_UNSPECIFIED",
380            ThreadType::Quote => "THREAD_TYPE_QUOTE",
381            ThreadType::Hedge => "THREAD_TYPE_HEDGE",
382        }
383    }
384    /// Creates an enum from field names used in the ProtoBuf definition.
385    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
386        match value {
387            "THREAD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
388            "THREAD_TYPE_QUOTE" => Some(Self::Quote),
389            "THREAD_TYPE_HEDGE" => Some(Self::Hedge),
390            _ => None,
391        }
392    }
393}
394/// 에러 타입
395#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
396#[repr(i32)]
397pub enum ErrorType {
398    Unspecified = 0,
399    /// 초기화 실패
400    Initialization = 1,
401    /// 가격 업데이트 실패
402    PriceUpdate = 2,
403    /// 주문 제출 실패
404    OrderSubmit = 3,
405    /// 주문 처리 실패
406    OrderProcessing = 4,
407    /// NAV 계산 실패
408    NavCalculation = 5,
409    /// 오더북 업데이트 실패
410    OrderBookUpdate = 6,
411    /// 주문 한도 초과
412    LimitExceeded = 7,
413    /// 시스템 에러
414    SystemError = 8,
415    /// 시장 세션 관련 에러
416    MarketSession = 9,
417}
418impl ErrorType {
419    /// String value of the enum field names used in the ProtoBuf definition.
420    ///
421    /// The values are not transformed in any way and thus are considered stable
422    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
423    pub fn as_str_name(&self) -> &'static str {
424        match self {
425            ErrorType::Unspecified => "ERROR_TYPE_UNSPECIFIED",
426            ErrorType::Initialization => "ERROR_TYPE_INITIALIZATION",
427            ErrorType::PriceUpdate => "ERROR_TYPE_PRICE_UPDATE",
428            ErrorType::OrderSubmit => "ERROR_TYPE_ORDER_SUBMIT",
429            ErrorType::OrderProcessing => "ERROR_TYPE_ORDER_PROCESSING",
430            ErrorType::NavCalculation => "ERROR_TYPE_NAV_CALCULATION",
431            ErrorType::OrderBookUpdate => "ERROR_TYPE_ORDER_BOOK_UPDATE",
432            ErrorType::LimitExceeded => "ERROR_TYPE_LIMIT_EXCEEDED",
433            ErrorType::SystemError => "ERROR_TYPE_SYSTEM_ERROR",
434            ErrorType::MarketSession => "ERROR_TYPE_MARKET_SESSION",
435        }
436    }
437    /// Creates an enum from field names used in the ProtoBuf definition.
438    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
439        match value {
440            "ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
441            "ERROR_TYPE_INITIALIZATION" => Some(Self::Initialization),
442            "ERROR_TYPE_PRICE_UPDATE" => Some(Self::PriceUpdate),
443            "ERROR_TYPE_ORDER_SUBMIT" => Some(Self::OrderSubmit),
444            "ERROR_TYPE_ORDER_PROCESSING" => Some(Self::OrderProcessing),
445            "ERROR_TYPE_NAV_CALCULATION" => Some(Self::NavCalculation),
446            "ERROR_TYPE_ORDER_BOOK_UPDATE" => Some(Self::OrderBookUpdate),
447            "ERROR_TYPE_LIMIT_EXCEEDED" => Some(Self::LimitExceeded),
448            "ERROR_TYPE_SYSTEM_ERROR" => Some(Self::SystemError),
449            "ERROR_TYPE_MARKET_SESSION" => Some(Self::MarketSession),
450            _ => None,
451        }
452    }
453}
454/// 에러 레벨
455#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
456#[repr(i32)]
457pub enum ErrorLevel {
458    Unspecified = 0,
459    /// 디버그 정보
460    Debug = 1,
461    /// 정보성 메시지
462    Info = 2,
463    /// 경고
464    Warning = 3,
465    /// 에러
466    Error = 4,
467    /// 치명적 에러
468    Critical = 5,
469}
470impl ErrorLevel {
471    /// String value of the enum field names used in the ProtoBuf definition.
472    ///
473    /// The values are not transformed in any way and thus are considered stable
474    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
475    pub fn as_str_name(&self) -> &'static str {
476        match self {
477            ErrorLevel::Unspecified => "ERROR_LEVEL_UNSPECIFIED",
478            ErrorLevel::Debug => "ERROR_LEVEL_DEBUG",
479            ErrorLevel::Info => "ERROR_LEVEL_INFO",
480            ErrorLevel::Warning => "ERROR_LEVEL_WARNING",
481            ErrorLevel::Error => "ERROR_LEVEL_ERROR",
482            ErrorLevel::Critical => "ERROR_LEVEL_CRITICAL",
483        }
484    }
485    /// Creates an enum from field names used in the ProtoBuf definition.
486    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
487        match value {
488            "ERROR_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
489            "ERROR_LEVEL_DEBUG" => Some(Self::Debug),
490            "ERROR_LEVEL_INFO" => Some(Self::Info),
491            "ERROR_LEVEL_WARNING" => Some(Self::Warning),
492            "ERROR_LEVEL_ERROR" => Some(Self::Error),
493            "ERROR_LEVEL_CRITICAL" => Some(Self::Critical),
494            _ => None,
495        }
496    }
497}
498include!("kdo.v1.lp.tonic.rs");
499include!("kdo.v1.lp.serde.rs");
500// @@protoc_insertion_point(module)