ids-apis 1.0.275

IDS APIs in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
// @generated
// This file is @generated by prost-build.
// ============================================================================
// Request / Response
// ============================================================================

/// 마켓 피드 구독 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeMarketFeedRequest {
    /// 구독 대상 ISIN 코드 목록 (예: \["KR7252670005", "KR4A01630008"\])
    #[prost(string, repeated, tag="1")]
    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 스트리밍 시작 시각 (해당 시각 이후 데이터만 전송)
    #[prost(message, optional, tag="2")]
    pub start_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 수신할 데이터 타입 필터 (비어있으면 전체)
    #[prost(enumeration="MarketDataType", repeated, tag="3")]
    pub data_types: ::prost::alloc::vec::Vec<i32>,
}
/// 서버 상태 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketFeedStatus {
    /// 활성 구독 스트림 수
    #[prost(int32, tag="1")]
    pub active_streams: i32,
    /// 서버 시작 이후 전송된 총 이벤트 수
    #[prost(int64, tag="2")]
    pub total_events_sent: i64,
    /// 로드된 TXT 파일 경로 목록
    #[prost(string, repeated, tag="3")]
    pub loaded_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 서버 시작 시각
    #[prost(message, optional, tag="4")]
    pub server_start_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
// ============================================================================
// Streaming Event
// ============================================================================

/// 스트리밍되는 마켓 피드 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketFeedEvent {
    /// ISIN 코드 (12자리, 예: "KR7252670005")
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 거래소 시각 (마이크로초 정밀도)
    #[prost(message, optional, tag="2")]
    pub exchange_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 파일 원본 시퀀스 번호
    #[prost(int64, tag="3")]
    pub sequence_number: i64,
    /// 원본 메시지 타입 (예: "B703S", "B601F", "G701F")
    #[prost(string, tag="4")]
    pub message_type: ::prost::alloc::string::String,
    /// 마켓 세션 상태
    #[prost(enumeration="SessionId", tag="5")]
    pub session_id: i32,
    /// 파싱된 데이터 본문
    #[prost(oneof="market_feed_event::Data", tags="10, 11, 12, 13, 14")]
    pub data: ::core::option::Option<market_feed_event::Data>,
}
/// Nested message and enum types in `MarketFeedEvent`.
pub mod market_feed_event {
    /// 파싱된 데이터 본문
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Data {
        /// ETF 호가 (B703S)
        #[prost(message, tag="10")]
        EtfOrderbook(super::EtfOrderbook),
        /// 선물 호가 (B601F, G701F)
        #[prost(message, tag="11")]
        FuturesOrderbook(super::FuturesOrderbook),
        /// 주식 호가 (B601S, B601Q)
        #[prost(message, tag="12")]
        StockOrderbook(super::StockOrderbook),
        /// 체결 (A301S, A303S)
        #[prost(message, tag="13")]
        Trade(super::Trade),
        /// NAV (BV03S)
        #[prost(message, tag="14")]
        Nav(super::Nav),
    }
}
// ============================================================================
// Data Messages
// ============================================================================

/// ETF 호가 (B703S) - 10단계, LP 수량 포함
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfOrderbook {
    /// 매도 호가 (10단계)
    #[prost(string, repeated, tag="1")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 호가 (10단계)
    #[prost(string, repeated, tag="2")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 수량 (10단계)
    #[prost(int64, repeated, tag="3")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매수 수량 (10단계)
    #[prost(int64, repeated, tag="4")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// LP 매도 수량 (10단계)
    #[prost(int64, repeated, tag="5")]
    pub lp_ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// LP 매수 수량 (10단계)
    #[prost(int64, repeated, tag="6")]
    pub lp_bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 중간 호가
    #[prost(string, tag="7")]
    pub mid_price: ::prost::alloc::string::String,
    /// 중간 매도 수량
    #[prost(int64, tag="8")]
    pub mid_ask_quantity: i64,
    /// 중간 매수 수량
    #[prost(int64, tag="9")]
    pub mid_bid_quantity: i64,
    /// 총 매도 호가 수량
    #[prost(int64, tag="10")]
    pub total_ask_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="11")]
    pub total_bid_quantity: i64,
    /// 예상 체결가
    #[prost(string, tag="12")]
    pub est_price: ::prost::alloc::string::String,
    /// 예상 체결량
    #[prost(int64, tag="13")]
    pub est_volume: i64,
}
/// 선물 호가 (B601F, G701F 등) - 5단계
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesOrderbook {
    /// 매도 호가 (5단계)
    #[prost(string, repeated, tag="1")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 호가 (5단계)
    #[prost(string, repeated, tag="2")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 수량 (5단계)
    #[prost(int64, repeated, tag="3")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매수 수량 (5단계)
    #[prost(int64, repeated, tag="4")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 주문 수 (5단계)
    #[prost(int64, repeated, tag="5")]
    pub ask_counts: ::prost::alloc::vec::Vec<i64>,
    /// 매수 주문 수 (5단계)
    #[prost(int64, repeated, tag="6")]
    pub bid_counts: ::prost::alloc::vec::Vec<i64>,
    /// 총 매도 호가 수량
    #[prost(int64, tag="7")]
    pub total_ask_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="8")]
    pub total_bid_quantity: i64,
    /// 중간 가격
    #[prost(string, tag="9")]
    pub mid_price: ::prost::alloc::string::String,
    /// 예상 체결가
    #[prost(string, tag="10")]
    pub est_price: ::prost::alloc::string::String,
    /// 예상 체결량
    #[prost(int64, tag="11")]
    pub est_volume: i64,
}
/// 주식 호가 (B601S, B601Q) - 10단계
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StockOrderbook {
    /// 매도 호가 (10단계)
    #[prost(string, repeated, tag="1")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 호가 (10단계)
    #[prost(string, repeated, tag="2")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 수량 (10단계)
    #[prost(int64, repeated, tag="3")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매수 수량 (10단계)
    #[prost(int64, repeated, tag="4")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 중간 호가
    #[prost(string, tag="5")]
    pub mid_price: ::prost::alloc::string::String,
    /// 중간 매도 수량
    #[prost(int64, tag="6")]
    pub mid_ask_quantity: i64,
    /// 중간 매수 수량
    #[prost(int64, tag="7")]
    pub mid_bid_quantity: i64,
    /// 총 매도 호가 수량
    #[prost(int64, tag="8")]
    pub total_ask_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="9")]
    pub total_bid_quantity: i64,
    /// 예상 체결가
    #[prost(string, tag="10")]
    pub est_price: ::prost::alloc::string::String,
    /// 예상 체결량
    #[prost(int64, tag="11")]
    pub est_volume: i64,
}
/// 체결 (A301S, A301Q, A303S)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Trade {
    /// 체결 가격
    #[prost(string, tag="1")]
    pub price: ::prost::alloc::string::String,
    /// 체결 수량
    #[prost(int64, tag="2")]
    pub quantity: i64,
    /// 매수/매도 방향
    #[prost(enumeration="OrderSide", tag="3")]
    pub side: i32,
    /// 누적 거래량
    #[prost(int64, tag="4")]
    pub cumulative_volume: i64,
    /// 누적 거래대금
    #[prost(string, tag="5")]
    pub cumulative_value: ::prost::alloc::string::String,
}
/// NAV (BV03S, BW03S, L503S)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Nav {
    /// 직전 NAV
    #[prost(string, tag="1")]
    pub prev_nav: ::prost::alloc::string::String,
    /// 현재 NAV
    #[prost(string, tag="2")]
    pub current_nav: ::prost::alloc::string::String,
}
// ============================================================================
// Enums
// ============================================================================

/// 매수/매도 구분
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderSide {
    Unspecified = 0,
    /// 매수
    Bid = 1,
    /// 매도
    Ask = 2,
}
impl OrderSide {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            OrderSide::Unspecified => "ORDER_SIDE_UNSPECIFIED",
            OrderSide::Bid => "ORDER_SIDE_BID",
            OrderSide::Ask => "ORDER_SIDE_ASK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ORDER_SIDE_UNSPECIFIED" => Some(Self::Unspecified),
            "ORDER_SIDE_BID" => Some(Self::Bid),
            "ORDER_SIDE_ASK" => Some(Self::Ask),
            _ => None,
        }
    }
}
/// 세션 ID (장 상태)
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SessionId {
    Unspecified = 0,
    /// 장개시전
    Previous = 1,
    /// 시가단일가
    OpeningAuction = 2,
    /// 단일가
    OnePrice = 3,
    /// 종가단일가
    ClosingAuction = 4,
    /// 접속 (정규장)
    Continuous = 5,
    /// VI장중단일가
    ViAuction = 6,
    /// VI시가단일가
    ViOpeningAuction = 7,
    /// VI종가단일가
    ViClosingAuction = 8,
    /// 장종료후호가접수
    PostMarket = 9,
    /// 경매매수호가 접수
    AuctionBid = 10,
    /// 경매매도호가 접수
    AuctionAsk = 11,
    /// 단위매매
    UnitTrade = 12,
    /// 거래정지
    Suspended = 13,
    /// SHUTDOWN
    Shutdown = 14,
    /// 장마감
    Closed = 15,
}
impl SessionId {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            SessionId::Unspecified => "SESSION_ID_UNSPECIFIED",
            SessionId::Previous => "SESSION_ID_PREVIOUS",
            SessionId::OpeningAuction => "SESSION_ID_OPENING_AUCTION",
            SessionId::OnePrice => "SESSION_ID_ONE_PRICE",
            SessionId::ClosingAuction => "SESSION_ID_CLOSING_AUCTION",
            SessionId::Continuous => "SESSION_ID_CONTINUOUS",
            SessionId::ViAuction => "SESSION_ID_VI_AUCTION",
            SessionId::ViOpeningAuction => "SESSION_ID_VI_OPENING_AUCTION",
            SessionId::ViClosingAuction => "SESSION_ID_VI_CLOSING_AUCTION",
            SessionId::PostMarket => "SESSION_ID_POST_MARKET",
            SessionId::AuctionBid => "SESSION_ID_AUCTION_BID",
            SessionId::AuctionAsk => "SESSION_ID_AUCTION_ASK",
            SessionId::UnitTrade => "SESSION_ID_UNIT_TRADE",
            SessionId::Suspended => "SESSION_ID_SUSPENDED",
            SessionId::Shutdown => "SESSION_ID_SHUTDOWN",
            SessionId::Closed => "SESSION_ID_CLOSED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SESSION_ID_UNSPECIFIED" => Some(Self::Unspecified),
            "SESSION_ID_PREVIOUS" => Some(Self::Previous),
            "SESSION_ID_OPENING_AUCTION" => Some(Self::OpeningAuction),
            "SESSION_ID_ONE_PRICE" => Some(Self::OnePrice),
            "SESSION_ID_CLOSING_AUCTION" => Some(Self::ClosingAuction),
            "SESSION_ID_CONTINUOUS" => Some(Self::Continuous),
            "SESSION_ID_VI_AUCTION" => Some(Self::ViAuction),
            "SESSION_ID_VI_OPENING_AUCTION" => Some(Self::ViOpeningAuction),
            "SESSION_ID_VI_CLOSING_AUCTION" => Some(Self::ViClosingAuction),
            "SESSION_ID_POST_MARKET" => Some(Self::PostMarket),
            "SESSION_ID_AUCTION_BID" => Some(Self::AuctionBid),
            "SESSION_ID_AUCTION_ASK" => Some(Self::AuctionAsk),
            "SESSION_ID_UNIT_TRADE" => Some(Self::UnitTrade),
            "SESSION_ID_SUSPENDED" => Some(Self::Suspended),
            "SESSION_ID_SHUTDOWN" => Some(Self::Shutdown),
            "SESSION_ID_CLOSED" => Some(Self::Closed),
            _ => None,
        }
    }
}
/// 마켓 데이터 타입 필터
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MarketDataType {
    Unspecified = 0,
    /// ETF 호가 (B703S)
    EtfOrderbook = 1,
    /// 선물 호가 (B601F, G701F 등)
    FuturesOrderbook = 2,
    /// 주식 호가 (B601S, B601Q)
    StockOrderbook = 3,
    /// 체결 (A301S, A301Q, A303S)
    Trade = 4,
    /// NAV (BV03S, BW03S, L503S)
    Nav = 5,
}
impl MarketDataType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            MarketDataType::Unspecified => "MARKET_DATA_TYPE_UNSPECIFIED",
            MarketDataType::EtfOrderbook => "MARKET_DATA_TYPE_ETF_ORDERBOOK",
            MarketDataType::FuturesOrderbook => "MARKET_DATA_TYPE_FUTURES_ORDERBOOK",
            MarketDataType::StockOrderbook => "MARKET_DATA_TYPE_STOCK_ORDERBOOK",
            MarketDataType::Trade => "MARKET_DATA_TYPE_TRADE",
            MarketDataType::Nav => "MARKET_DATA_TYPE_NAV",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "MARKET_DATA_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "MARKET_DATA_TYPE_ETF_ORDERBOOK" => Some(Self::EtfOrderbook),
            "MARKET_DATA_TYPE_FUTURES_ORDERBOOK" => Some(Self::FuturesOrderbook),
            "MARKET_DATA_TYPE_STOCK_ORDERBOOK" => Some(Self::StockOrderbook),
            "MARKET_DATA_TYPE_TRADE" => Some(Self::Trade),
            "MARKET_DATA_TYPE_NAV" => Some(Self::Nav),
            _ => None,
        }
    }
}
include!("market.v1.feed.tonic.rs");
include!("market.v1.feed.serde.rs");
// @@protoc_insertion_point(module)