1#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct EtfOrderbookData {
7 #[prost(string, repeated, tag="1")]
9 pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10 #[prost(string, repeated, tag="2")]
12 pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
13 #[prost(int64, repeated, tag="3")]
15 pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
16 #[prost(int64, repeated, tag="4")]
18 pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
19 #[prost(int64, repeated, tag="5")]
21 pub lp_bid_quantities: ::prost::alloc::vec::Vec<i64>,
22 #[prost(int64, repeated, tag="6")]
24 pub lp_ask_quantities: ::prost::alloc::vec::Vec<i64>,
25 #[prost(string, tag="7")]
27 pub mid_price: ::prost::alloc::string::String,
28 #[prost(int64, tag="8")]
30 pub mid_ask_quantity: i64,
31 #[prost(int64, tag="9")]
33 pub mid_bid_quantity: i64,
34 #[prost(int64, tag="10")]
36 pub ask_quote_total_quantity: i64,
37 #[prost(int64, tag="11")]
39 pub bid_quote_total_quantity: i64,
40 #[prost(string, tag="12")]
42 pub est_price: ::prost::alloc::string::String,
43 #[prost(int64, tag="13")]
45 pub est_volume: i64,
46 #[prost(enumeration="SessionId", tag="14")]
48 pub session_id: i32,
49}
50#[allow(clippy::derive_partial_eq_without_eq)]
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct FuturesOrderbookData {
54 #[prost(string, repeated, tag="1")]
56 pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
57 #[prost(string, repeated, tag="2")]
59 pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
60 #[prost(int64, repeated, tag="3")]
62 pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
63 #[prost(int64, repeated, tag="4")]
65 pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
66 #[prost(int64, repeated, tag="5")]
68 pub bid_counts: ::prost::alloc::vec::Vec<i64>,
69 #[prost(int64, repeated, tag="6")]
71 pub ask_counts: ::prost::alloc::vec::Vec<i64>,
72 #[prost(int64, tag="7")]
74 pub ask_quote_total_quantity: i64,
75 #[prost(int64, tag="8")]
77 pub bid_quote_total_quantity: i64,
78 #[prost(string, tag="9")]
80 pub mid_price: ::prost::alloc::string::String,
81 #[prost(string, tag="10")]
83 pub est_price: ::prost::alloc::string::String,
84 #[prost(int64, tag="11")]
86 pub est_volume: i64,
87 #[prost(enumeration="SessionId", tag="12")]
89 pub session_id: i32,
90}
91#[allow(clippy::derive_partial_eq_without_eq)]
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct Order {
95 #[prost(string, tag="1")]
97 pub order_id: ::prost::alloc::string::String,
98 #[prost(enumeration="OrderType", tag="2")]
100 pub order_type: i32,
101 #[prost(string, tag="3")]
103 pub symbol: ::prost::alloc::string::String,
104 #[prost(string, tag="4")]
106 pub price: ::prost::alloc::string::String,
107 #[prost(int64, tag="5")]
109 pub quantity: i64,
110 #[prost(int64, tag="6")]
112 pub filled_quantity: i64,
113 #[prost(enumeration="OrderStatus", tag="7")]
115 pub status: i32,
116 #[prost(int64, tag="8")]
118 pub created_at: i64,
119 #[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 #[prost(string, tag="10")]
132 pub theory_nav: ::prost::alloc::string::String,
133 #[prost(string, tag="11")]
135 pub krx_nav: ::prost::alloc::string::String,
136}
137#[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#[allow(clippy::derive_partial_eq_without_eq)]
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct StreamFuturesOrderbookRequest {
150 #[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#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct PlaceOrderRequest {
164 #[prost(enumeration="OrderType", tag="1")]
166 pub order_type: i32,
167 #[prost(string, tag="2")]
169 pub symbol: ::prost::alloc::string::String,
170 #[prost(string, tag="3")]
172 pub price: ::prost::alloc::string::String,
173 #[prost(int64, tag="4")]
175 pub quantity: i64,
176}
177#[allow(clippy::derive_partial_eq_without_eq)]
179#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct PlaceOrderResponse {
181 #[prost(message, optional, tag="1")]
183 pub order: ::core::option::Option<Order>,
184}
185#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct CancelOrderRequest {
189 #[prost(string, tag="1")]
191 pub order_id: ::prost::alloc::string::String,
192}
193#[allow(clippy::derive_partial_eq_without_eq)]
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct CancelOrderResponse {
197 #[prost(message, optional, tag="1")]
199 pub order: ::core::option::Option<Order>,
200}
201#[allow(clippy::derive_partial_eq_without_eq)]
203#[derive(Clone, PartialEq, ::prost::Message)]
204pub struct CancelAllOrdersRequest {
205 #[prost(string, tag="1")]
207 pub symbol: ::prost::alloc::string::String,
208}
209#[allow(clippy::derive_partial_eq_without_eq)]
211#[derive(Clone, PartialEq, ::prost::Message)]
212pub struct CancelAllOrdersResponse {
213 #[prost(int32, tag="1")]
215 pub cancelled_count: i32,
216 #[prost(message, repeated, tag="2")]
218 pub cancelled_orders: ::prost::alloc::vec::Vec<Order>,
219}
220#[allow(clippy::derive_partial_eq_without_eq)]
222#[derive(Clone, PartialEq, ::prost::Message)]
223pub struct ListOrdersRequest {
224 #[prost(string, tag="1")]
226 pub filter: ::prost::alloc::string::String,
227 #[prost(int32, tag="2")]
229 pub page_size: i32,
230 #[prost(string, tag="3")]
231 pub page_token: ::prost::alloc::string::String,
232}
233#[allow(clippy::derive_partial_eq_without_eq)]
235#[derive(Clone, PartialEq, ::prost::Message)]
236pub struct ListOrdersResponse {
237 #[prost(message, repeated, tag="1")]
239 pub orders: ::prost::alloc::vec::Vec<Order>,
240 #[prost(string, tag="2")]
242 pub next_page_token: ::prost::alloc::string::String,
243}
244#[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#[allow(clippy::derive_partial_eq_without_eq)]
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct UserOrderbookData {
257 #[prost(string, repeated, tag="1")]
259 pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
260 #[prost(string, repeated, tag="2")]
262 pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
263 #[prost(int64, repeated, tag="3")]
265 pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
266 #[prost(int64, repeated, tag="4")]
268 pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
269}
270#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
272#[repr(i32)]
273pub enum SessionId {
274 Unspecified = 0,
276 Previous = 1,
278 Connected = 2,
280 OpeningOnePrice = 3,
282 OnePrice = 4,
284 ClosingOnePrice = 5,
286 ViOnePrice = 6,
288 ViOpeningOnePrice = 7,
290 ViClosingOnePrice = 8,
292 UnitTrade = 9,
294 PostMarket = 10,
296 AuctionBid = 11,
298 AuctionAsk = 12,
300 Suspended = 13,
302 Shutdown = 14,
304 Closed = 15,
306 Etc = 16,
308}
309impl SessionId {
310 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
361#[repr(i32)]
362pub enum OrderType {
363 Unspecified = 0,
365 Buy = 1,
367 Sell = 2,
369}
370impl OrderType {
371 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
394#[repr(i32)]
395pub enum OrderStatus {
396 Unspecified = 0,
398 Pending = 1,
400 PartialFilled = 2,
402 Filled = 3,
404 Cancelled = 4,
406 Rejected = 5,
408}
409impl OrderStatus {
410 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 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