ids_apis/
kdo.v1.market.rs

1// @generated
2// This file is @generated by prost-build.
3/// ETF 주문장 데이터
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct EtfOrderbookData {
7    /// 매수 호가 (10단계, AIP-144)
8    #[prost(string, repeated, tag="1")]
9    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10    /// 매도 호가 (10단계)
11    #[prost(string, repeated, tag="2")]
12    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
13    /// 매수 수량 (10단계)
14    #[prost(int64, repeated, tag="3")]
15    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
16    /// 매도 수량 (10단계)
17    #[prost(int64, repeated, tag="4")]
18    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
19    /// LP 매수 수량 (10단계)
20    #[prost(int64, repeated, tag="5")]
21    pub lp_bid_quantities: ::prost::alloc::vec::Vec<i64>,
22    /// LP 매도 수량 (10단계)
23    #[prost(int64, repeated, tag="6")]
24    pub lp_ask_quantities: ::prost::alloc::vec::Vec<i64>,
25    /// 중간 호가
26    #[prost(string, tag="7")]
27    pub mid_price: ::prost::alloc::string::String,
28    /// 중간 매도 수량
29    #[prost(int64, tag="8")]
30    pub mid_ask_quantity: i64,
31    /// 중간 매수 수량
32    #[prost(int64, tag="9")]
33    pub mid_bid_quantity: i64,
34    /// 총 매도 호가 수량
35    #[prost(int64, tag="10")]
36    pub ask_quote_total_quantity: i64,
37    /// 총 매수 호가 수량
38    #[prost(int64, tag="11")]
39    pub bid_quote_total_quantity: i64,
40    /// 예상 가격
41    #[prost(string, tag="12")]
42    pub est_price: ::prost::alloc::string::String,
43    /// 예상 거래량
44    #[prost(int64, tag="13")]
45    pub est_volume: i64,
46    /// 세션 ID
47    #[prost(enumeration="SessionId", tag="14")]
48    pub session_id: i32,
49}
50/// 선물 주문장 데이터
51#[allow(clippy::derive_partial_eq_without_eq)]
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct FuturesOrderbookData {
54    /// 매수 호가 (5단계, AIP-144)
55    #[prost(string, repeated, tag="1")]
56    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
57    /// 매도 호가 (5단계)
58    #[prost(string, repeated, tag="2")]
59    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
60    /// 매수 수량 (5단계)
61    #[prost(int64, repeated, tag="3")]
62    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
63    /// 매도 수량 (5단계)
64    #[prost(int64, repeated, tag="4")]
65    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
66    /// 매수 주문 수 (5단계)
67    #[prost(int64, repeated, tag="5")]
68    pub bid_counts: ::prost::alloc::vec::Vec<i64>,
69    /// 매도 주문 수 (5단계)
70    #[prost(int64, repeated, tag="6")]
71    pub ask_counts: ::prost::alloc::vec::Vec<i64>,
72    /// 총 매도 호가 수량
73    #[prost(int64, tag="7")]
74    pub ask_quote_total_quantity: i64,
75    /// 총 매수 호가 수량
76    #[prost(int64, tag="8")]
77    pub bid_quote_total_quantity: i64,
78    /// 중간 가격
79    #[prost(string, tag="9")]
80    pub mid_price: ::prost::alloc::string::String,
81    /// 예상 가격
82    #[prost(string, tag="10")]
83    pub est_price: ::prost::alloc::string::String,
84    /// 예상 거래량
85    #[prost(int64, tag="11")]
86    pub est_volume: i64,
87    /// 세션 ID
88    #[prost(enumeration="SessionId", tag="12")]
89    pub session_id: i32,
90}
91/// 주문 정보
92#[allow(clippy::derive_partial_eq_without_eq)]
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct Order {
95    /// 주문 ID
96    #[prost(string, tag="1")]
97    pub order_id: ::prost::alloc::string::String,
98    /// 주문 타입
99    #[prost(enumeration="OrderType", tag="2")]
100    pub order_type: i32,
101    /// 상품 (예: etfs/A069500)
102    #[prost(string, tag="3")]
103    pub symbol: ::prost::alloc::string::String,
104    /// 주문 가격
105    #[prost(string, tag="4")]
106    pub price: ::prost::alloc::string::String,
107    /// 주문 수량
108    #[prost(int64, tag="5")]
109    pub quantity: i64,
110    /// 체결 수량
111    #[prost(int64, tag="6")]
112    pub filled_quantity: i64,
113    /// 주문 상태
114    #[prost(enumeration="OrderStatus", tag="7")]
115    pub status: i32,
116    /// 주문 시간 (Unix timestamp)
117    #[prost(int64, tag="8")]
118    pub created_at: i64,
119    /// 업데이트 시간 (Unix timestamp)
120    #[prost(int64, tag="9")]
121    pub updated_at: i64,
122}
123#[allow(clippy::derive_partial_eq_without_eq)]
124#[derive(Clone, PartialEq, ::prost::Message)]
125pub struct EtfNav {
126    #[prost(string, tag="1")]
127    pub name: ::prost::alloc::string::String,
128    #[prost(string, tag="2")]
129    pub etf_symbol: ::prost::alloc::string::String,
130    /// 순자산가치 (원 단위, string)
131    #[prost(string, tag="10")]
132    pub theory_nav: ::prost::alloc::string::String,
133    /// 전일 대비 (string)
134    #[prost(string, tag="11")]
135    pub krx_nav: ::prost::alloc::string::String,
136}
137// ========== Request/Response Messages ==========
138
139/// ETF 주문장 스트리밍 요청
140#[allow(clippy::derive_partial_eq_without_eq)]
141#[derive(Clone, PartialEq, ::prost::Message)]
142pub struct StreamEtfOrderbookRequest {
143    #[prost(string, tag="1")]
144    pub etf: ::prost::alloc::string::String,
145}
146/// 선물 주문장 스트리밍 요청
147#[allow(clippy::derive_partial_eq_without_eq)]
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct StreamFuturesOrderbookRequest {
150    /// 리소스 이름 (예: futures/K101W9000)
151    #[prost(string, tag="1")]
152    pub future: ::prost::alloc::string::String,
153}
154#[allow(clippy::derive_partial_eq_without_eq)]
155#[derive(Clone, PartialEq, ::prost::Message)]
156pub struct StreamEtfNavRequest {
157    #[prost(string, tag="1")]
158    pub etf: ::prost::alloc::string::String,
159}
160/// 주문 접수 요청
161#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct PlaceOrderRequest {
164    /// 주문 타입
165    #[prost(enumeration="OrderType", tag="1")]
166    pub order_type: i32,
167    /// 상품 (예: etfs/A069500)
168    #[prost(string, tag="2")]
169    pub symbol: ::prost::alloc::string::String,
170    /// 주문 가격
171    #[prost(string, tag="3")]
172    pub price: ::prost::alloc::string::String,
173    /// 주문 수량
174    #[prost(int64, tag="4")]
175    pub quantity: i64,
176}
177/// 주문 접수 응답
178#[allow(clippy::derive_partial_eq_without_eq)]
179#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct PlaceOrderResponse {
181    /// 생성된 주문 정보
182    #[prost(message, optional, tag="1")]
183    pub order: ::core::option::Option<Order>,
184}
185/// 주문 취소 요청
186#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct CancelOrderRequest {
189    /// 취소할 주문 ID
190    #[prost(string, tag="1")]
191    pub order_id: ::prost::alloc::string::String,
192}
193/// 주문 취소 응답
194#[allow(clippy::derive_partial_eq_without_eq)]
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct CancelOrderResponse {
197    /// 취소된 주문 정보
198    #[prost(message, optional, tag="1")]
199    pub order: ::core::option::Option<Order>,
200}
201/// 모든 주문 취소 요청
202#[allow(clippy::derive_partial_eq_without_eq)]
203#[derive(Clone, PartialEq, ::prost::Message)]
204pub struct CancelAllOrdersRequest {
205    /// 선택적: 특정 상품의 주문만 취소
206    #[prost(string, tag="1")]
207    pub symbol: ::prost::alloc::string::String,
208}
209/// 모든 주문 취소 응답
210#[allow(clippy::derive_partial_eq_without_eq)]
211#[derive(Clone, PartialEq, ::prost::Message)]
212pub struct CancelAllOrdersResponse {
213    /// 취소된 주문 수
214    #[prost(int32, tag="1")]
215    pub cancelled_count: i32,
216    /// 취소된 주문 목록
217    #[prost(message, repeated, tag="2")]
218    pub cancelled_orders: ::prost::alloc::vec::Vec<Order>,
219}
220/// 주문 목록 조회 요청
221#[allow(clippy::derive_partial_eq_without_eq)]
222#[derive(Clone, PartialEq, ::prost::Message)]
223pub struct ListOrdersRequest {
224    /// 필터링 조건 (선택적, AIP-160)
225    #[prost(string, tag="1")]
226    pub filter: ::prost::alloc::string::String,
227    /// 페이징 (AIP-158)
228    #[prost(int32, tag="2")]
229    pub page_size: i32,
230    #[prost(string, tag="3")]
231    pub page_token: ::prost::alloc::string::String,
232}
233/// 주문 목록 조회 응답
234#[allow(clippy::derive_partial_eq_without_eq)]
235#[derive(Clone, PartialEq, ::prost::Message)]
236pub struct ListOrdersResponse {
237    /// 주문 목록
238    #[prost(message, repeated, tag="1")]
239    pub orders: ::prost::alloc::vec::Vec<Order>,
240    /// 다음 페이지 토큰 (AIP-158)
241    #[prost(string, tag="2")]
242    pub next_page_token: ::prost::alloc::string::String,
243}
244/// 주문 업데이트 스트리밍 요청
245#[allow(clippy::derive_partial_eq_without_eq)]
246#[derive(Clone, PartialEq, ::prost::Message)]
247pub struct GetUserOrderBookRequest {
248    #[prost(string, tag="1")]
249    pub etf: ::prost::alloc::string::String,
250    #[prost(string, tag="2")]
251    pub fund: ::prost::alloc::string::String,
252}
253/// 주문 업데이트 정보
254#[allow(clippy::derive_partial_eq_without_eq)]
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct UserOrderbookData {
257    /// 매수 호가 (10단계, AIP-144)
258    #[prost(string, repeated, tag="1")]
259    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
260    /// 매도 호가 (10단계)
261    #[prost(string, repeated, tag="2")]
262    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
263    /// 매수 수량 (10단계)
264    #[prost(int64, repeated, tag="3")]
265    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
266    /// 매도 수량 (10단계)
267    #[prost(int64, repeated, tag="4")]
268    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
269}
270/// 세션 ID 열거형 (AIP-126)
271#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
272#[repr(i32)]
273pub enum SessionId {
274    /// 기본값
275    Unspecified = 0,
276    /// 장개시전
277    Previous = 1,
278    /// 연결됨
279    Connected = 2,
280    /// 시가단일가
281    OpeningOnePrice = 3,
282    /// 단일가
283    OnePrice = 4,
284    /// 종가단일가
285    ClosingOnePrice = 5,
286    /// VI장중단일가
287    ViOnePrice = 6,
288    /// VI시가단일가
289    ViOpeningOnePrice = 7,
290    /// VI종가단일가
291    ViClosingOnePrice = 8,
292    /// 단위매매
293    UnitTrade = 9,
294    /// 장종료후호가접수
295    PostMarket = 10,
296    /// 경매매수호가 접수 세션
297    AuctionBid = 11,
298    /// 경매매도호가 접수 세션
299    AuctionAsk = 12,
300    /// 거래정지
301    Suspended = 13,
302    /// 셧다운
303    Shutdown = 14,
304    /// 장마감
305    Closed = 15,
306    /// 기타
307    Etc = 16,
308}
309impl SessionId {
310    /// String value of the enum field names used in the ProtoBuf definition.
311    ///
312    /// The values are not transformed in any way and thus are considered stable
313    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
314    pub fn as_str_name(&self) -> &'static str {
315        match self {
316            SessionId::Unspecified => "SESSION_ID_UNSPECIFIED",
317            SessionId::Previous => "PREVIOUS",
318            SessionId::Connected => "CONNECTED",
319            SessionId::OpeningOnePrice => "OPENING_ONE_PRICE",
320            SessionId::OnePrice => "ONE_PRICE",
321            SessionId::ClosingOnePrice => "CLOSING_ONE_PRICE",
322            SessionId::ViOnePrice => "VI_ONE_PRICE",
323            SessionId::ViOpeningOnePrice => "VI_OPENING_ONE_PRICE",
324            SessionId::ViClosingOnePrice => "VI_CLOSING_ONE_PRICE",
325            SessionId::UnitTrade => "UNIT_TRADE",
326            SessionId::PostMarket => "POST_MARKET",
327            SessionId::AuctionBid => "AUCTION_BID",
328            SessionId::AuctionAsk => "AUCTION_ASK",
329            SessionId::Suspended => "SUSPENDED",
330            SessionId::Shutdown => "SHUTDOWN",
331            SessionId::Closed => "CLOSED",
332            SessionId::Etc => "ETC",
333        }
334    }
335    /// Creates an enum from field names used in the ProtoBuf definition.
336    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
337        match value {
338            "SESSION_ID_UNSPECIFIED" => Some(Self::Unspecified),
339            "PREVIOUS" => Some(Self::Previous),
340            "CONNECTED" => Some(Self::Connected),
341            "OPENING_ONE_PRICE" => Some(Self::OpeningOnePrice),
342            "ONE_PRICE" => Some(Self::OnePrice),
343            "CLOSING_ONE_PRICE" => Some(Self::ClosingOnePrice),
344            "VI_ONE_PRICE" => Some(Self::ViOnePrice),
345            "VI_OPENING_ONE_PRICE" => Some(Self::ViOpeningOnePrice),
346            "VI_CLOSING_ONE_PRICE" => Some(Self::ViClosingOnePrice),
347            "UNIT_TRADE" => Some(Self::UnitTrade),
348            "POST_MARKET" => Some(Self::PostMarket),
349            "AUCTION_BID" => Some(Self::AuctionBid),
350            "AUCTION_ASK" => Some(Self::AuctionAsk),
351            "SUSPENDED" => Some(Self::Suspended),
352            "SHUTDOWN" => Some(Self::Shutdown),
353            "CLOSED" => Some(Self::Closed),
354            "ETC" => Some(Self::Etc),
355            _ => None,
356        }
357    }
358}
359/// 주문 타입 열거형
360#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
361#[repr(i32)]
362pub enum OrderType {
363    /// 기본값
364    Unspecified = 0,
365    /// 매수
366    Buy = 1,
367    /// 매도
368    Sell = 2,
369}
370impl OrderType {
371    /// String value of the enum field names used in the ProtoBuf definition.
372    ///
373    /// The values are not transformed in any way and thus are considered stable
374    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
375    pub fn as_str_name(&self) -> &'static str {
376        match self {
377            OrderType::Unspecified => "ORDER_TYPE_UNSPECIFIED",
378            OrderType::Buy => "BUY",
379            OrderType::Sell => "SELL",
380        }
381    }
382    /// Creates an enum from field names used in the ProtoBuf definition.
383    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
384        match value {
385            "ORDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
386            "BUY" => Some(Self::Buy),
387            "SELL" => Some(Self::Sell),
388            _ => None,
389        }
390    }
391}
392/// 주문 상태 열거형
393#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
394#[repr(i32)]
395pub enum OrderStatus {
396    /// 기본값
397    Unspecified = 0,
398    /// 대기중
399    Pending = 1,
400    /// 부분체결
401    PartialFilled = 2,
402    /// 체결완료
403    Filled = 3,
404    /// 취소됨
405    Cancelled = 4,
406    /// 거부됨
407    Rejected = 5,
408}
409impl OrderStatus {
410    /// String value of the enum field names used in the ProtoBuf definition.
411    ///
412    /// The values are not transformed in any way and thus are considered stable
413    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
414    pub fn as_str_name(&self) -> &'static str {
415        match self {
416            OrderStatus::Unspecified => "ORDER_STATUS_UNSPECIFIED",
417            OrderStatus::Pending => "PENDING",
418            OrderStatus::PartialFilled => "PARTIAL_FILLED",
419            OrderStatus::Filled => "FILLED",
420            OrderStatus::Cancelled => "CANCELLED",
421            OrderStatus::Rejected => "REJECTED",
422        }
423    }
424    /// Creates an enum from field names used in the ProtoBuf definition.
425    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
426        match value {
427            "ORDER_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
428            "PENDING" => Some(Self::Pending),
429            "PARTIAL_FILLED" => Some(Self::PartialFilled),
430            "FILLED" => Some(Self::Filled),
431            "CANCELLED" => Some(Self::Cancelled),
432            "REJECTED" => Some(Self::Rejected),
433            _ => None,
434        }
435    }
436}
437include!("kdo.v1.market.tonic.rs");
438include!("kdo.v1.market.serde.rs");
439// @@protoc_insertion_point(module)