1#[allow(clippy::derive_partial_eq_without_eq)]
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct SubmitOrderRequest {
8 #[prost(string, tag="1")]
10 pub fund_code: ::prost::alloc::string::String,
11 #[prost(string, tag="2")]
13 pub symbol: ::prost::alloc::string::String,
14 #[prost(enumeration="super::common::OrderSide", tag="3")]
16 pub side: i32,
17 #[prost(int64, tag="4")]
19 pub quantity: i64,
20 #[prost(string, tag="5")]
22 pub price: ::prost::alloc::string::String,
23 #[prost(enumeration="QuoteType", tag="6")]
25 pub quote_type: i32,
26 #[prost(bool, tag="7")]
28 pub is_lp: bool,
29 #[prost(enumeration="super::common::AmendMethodType", optional, tag="8")]
31 pub auto_amend_strategy: ::core::option::Option<i32>,
32 #[prost(enumeration="LimitPriceType", optional, tag="9")]
34 pub limit_price_type: ::core::option::Option<i32>,
35 #[prost(enumeration="super::common::OrderConditionType", optional, tag="10")]
37 pub order_condition: ::core::option::Option<i32>,
38 #[prost(bool, optional, tag="11")]
42 pub need_hedge: ::core::option::Option<bool>,
43}
44#[allow(clippy::derive_partial_eq_without_eq)]
45#[derive(Clone, PartialEq, ::prost::Message)]
46pub struct SubmitOrderResponse {
47 #[prost(uint64, tag="1")]
49 pub order_id: u64,
50 #[prost(enumeration="OrderStatus", tag="2")]
52 pub status: i32,
53 #[prost(string, tag="3")]
55 pub message: ::prost::alloc::string::String,
56}
57#[allow(clippy::derive_partial_eq_without_eq)]
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct AmendOrderRequest {
62 #[prost(uint64, tag="1")]
64 pub original_order_id: u64,
65 #[prost(string, tag="3")]
67 pub symbol: ::prost::alloc::string::String,
68 #[prost(string, tag="5")]
70 pub price: ::prost::alloc::string::String,
71 #[prost(enumeration="super::common::OrderSide", tag="6")]
73 pub side: i32,
74 #[prost(bool, tag="7")]
76 pub is_lp: bool,
77 #[prost(enumeration="QuoteType", tag="8")]
79 pub quote_type: i32,
80 #[prost(string, tag="9")]
82 pub fund_code: ::prost::alloc::string::String,
83 #[prost(enumeration="super::common::OrderConditionType", optional, tag="10")]
85 pub order_condition: ::core::option::Option<i32>,
86}
87#[allow(clippy::derive_partial_eq_without_eq)]
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct AmendOrderResponse {
90 #[prost(uint64, tag="1")]
92 pub order_id: u64,
93 #[prost(uint64, tag="2")]
95 pub original_order_id: u64,
96 #[prost(enumeration="OrderStatus", tag="3")]
98 pub status: i32,
99 #[prost(string, tag="4")]
101 pub message: ::prost::alloc::string::String,
102}
103#[allow(clippy::derive_partial_eq_without_eq)]
106#[derive(Clone, PartialEq, ::prost::Message)]
107pub struct CancelOrderRequest {
108 #[prost(uint64, tag="1")]
110 pub original_order_id: u64,
111 #[prost(string, tag="3")]
113 pub symbol: ::prost::alloc::string::String,
114 #[prost(string, tag="4")]
116 pub fund_code: ::prost::alloc::string::String,
117 #[prost(enumeration="super::common::OrderSide", tag="6")]
119 pub side: i32,
120}
121#[allow(clippy::derive_partial_eq_without_eq)]
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct CancelOrderResponse {
124 #[prost(uint64, tag="1")]
126 pub order_id: u64,
127 #[prost(uint64, tag="2")]
129 pub original_order_id: u64,
130 #[prost(enumeration="OrderStatus", tag="3")]
132 pub status: i32,
133 #[prost(string, tag="4")]
135 pub message: ::prost::alloc::string::String,
136}
137#[allow(clippy::derive_partial_eq_without_eq)]
140#[derive(Clone, PartialEq, ::prost::Message)]
141pub struct ListAllUnfilledOrdersRequest {
142 #[prost(string, optional, tag="1")]
144 pub fund_code: ::core::option::Option<::prost::alloc::string::String>,
145 #[prost(string, optional, tag="2")]
147 pub symbol: ::core::option::Option<::prost::alloc::string::String>,
148 #[prost(enumeration="super::common::OrderSide", optional, tag="3")]
150 pub side: ::core::option::Option<i32>,
151}
152#[allow(clippy::derive_partial_eq_without_eq)]
153#[derive(Clone, PartialEq, ::prost::Message)]
154pub struct ListAllUnfilledOrdersResponse {
155 #[prost(message, repeated, tag="1")]
157 pub orders: ::prost::alloc::vec::Vec<Order>,
158}
159#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(Clone, Copy, PartialEq, ::prost::Message)]
163pub struct CancelAllOrdersRequest {
164}
165#[allow(clippy::derive_partial_eq_without_eq)]
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct CancelAllOrdersResponse {
168 #[prost(int32, tag="1")]
170 pub cancelled_count: i32,
171 #[prost(string, tag="2")]
173 pub message: ::prost::alloc::string::String,
174}
175#[allow(clippy::derive_partial_eq_without_eq)]
178#[derive(Clone, PartialEq, ::prost::Message)]
179pub struct StreamOrderResultsRequest {
180 #[prost(string, optional, tag="1")]
182 pub fund_code: ::core::option::Option<::prost::alloc::string::String>,
183 #[prost(string, optional, tag="2")]
185 pub symbol: ::core::option::Option<::prost::alloc::string::String>,
186}
187#[allow(clippy::derive_partial_eq_without_eq)]
188#[derive(Clone, PartialEq, ::prost::Message)]
189pub struct OrderResult {
190 #[prost(uint64, tag="1")]
192 pub order_id: u64,
193 #[prost(string, tag="2")]
195 pub symbol: ::prost::alloc::string::String,
196 #[prost(string, tag="3")]
198 pub fund_code: ::prost::alloc::string::String,
199 #[prost(enumeration="super::common::OrderSide", tag="4")]
201 pub side: i32,
202 #[prost(string, tag="5")]
204 pub price: ::prost::alloc::string::String,
205 #[prost(int64, tag="6")]
207 pub quantity: i64,
208 #[prost(enumeration="OrderResultType", tag="7")]
210 pub result_type: i32,
211 #[prost(message, optional, tag="8")]
213 pub timestamp: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
214 #[prost(oneof="order_result::Details", tags="10, 11, 12, 13")]
216 pub details: ::core::option::Option<order_result::Details>,
217}
218pub mod order_result {
220 #[allow(clippy::derive_partial_eq_without_eq)]
222#[derive(Clone, PartialEq, ::prost::Oneof)]
223 pub enum Details {
224 #[prost(message, tag="10")]
225 Received(super::ReceivedDetails),
226 #[prost(message, tag="11")]
227 Rejected(super::RejectedDetails),
228 #[prost(message, tag="12")]
229 Filled(super::FilledDetails),
230 #[prost(message, tag="13")]
231 Cancelled(super::CancelledDetails),
232 }
233}
234#[allow(clippy::derive_partial_eq_without_eq)]
235#[derive(Clone, Copy, PartialEq, ::prost::Message)]
236pub struct ReceivedDetails {
237 #[prost(uint64, tag="1")]
239 pub receive_time: u64,
240}
241#[allow(clippy::derive_partial_eq_without_eq)]
242#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct RejectedDetails {
244 #[prost(string, tag="1")]
246 pub rejection_code: ::prost::alloc::string::String,
247 #[prost(string, tag="2")]
249 pub error_message: ::prost::alloc::string::String,
250}
251#[allow(clippy::derive_partial_eq_without_eq)]
252#[derive(Clone, PartialEq, ::prost::Message)]
253pub struct FilledDetails {
254 #[prost(string, tag="1")]
256 pub filled_price: ::prost::alloc::string::String,
257 #[prost(int64, tag="2")]
259 pub filled_quantity: i64,
260 #[prost(uint64, tag="3")]
262 pub trade_time: u64,
263}
264#[allow(clippy::derive_partial_eq_without_eq)]
265#[derive(Clone, PartialEq, ::prost::Message)]
266pub struct CancelledDetails {
267 #[prost(string, tag="1")]
269 pub cancellation_code: ::prost::alloc::string::String,
270 #[prost(int64, tag="2")]
272 pub cancelled_quantity: i64,
273}
274#[allow(clippy::derive_partial_eq_without_eq)]
276#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct ListOrdersRequest {
278 #[prost(string, tag="1")]
280 pub filter: ::prost::alloc::string::String,
281 #[prost(int32, tag="2")]
283 pub page_size: i32,
284 #[prost(string, tag="3")]
285 pub page_token: ::prost::alloc::string::String,
286}
287#[allow(clippy::derive_partial_eq_without_eq)]
289#[derive(Clone, PartialEq, ::prost::Message)]
290pub struct ListOrdersResponse {
291 #[prost(message, repeated, tag="1")]
293 pub orders: ::prost::alloc::vec::Vec<Order>,
294 #[prost(string, tag="2")]
296 pub next_page_token: ::prost::alloc::string::String,
297}
298#[allow(clippy::derive_partial_eq_without_eq)]
300#[derive(Clone, PartialEq, ::prost::Message)]
301pub struct Order {
302 #[prost(string, tag="1")]
304 pub order_id: ::prost::alloc::string::String,
305 #[prost(enumeration="super::common::OrderSide", tag="2")]
307 pub order_side: i32,
308 #[prost(string, tag="3")]
310 pub symbol: ::prost::alloc::string::String,
311 #[prost(string, tag="4")]
313 pub price: ::prost::alloc::string::String,
314 #[prost(int64, tag="5")]
316 pub quantity: i64,
317 #[prost(int64, tag="6")]
319 pub filled_quantity: i64,
320 #[prost(enumeration="OrderStatus", tag="7")]
322 pub status: i32,
323 #[prost(int64, tag="8")]
325 pub created_at: i64,
326 #[prost(int64, tag="9")]
328 pub updated_at: i64,
329 #[prost(string, tag="10")]
331 pub fund_code: ::prost::alloc::string::String,
332}
333#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
336#[repr(i32)]
337pub enum QuoteType {
338 Unspecified = 0,
339 Limit = 1,
341 Market = 2,
343 BestTake = 3,
345 BestMake = 4,
347}
348impl QuoteType {
349 pub fn as_str_name(&self) -> &'static str {
354 match self {
355 QuoteType::Unspecified => "QUOTE_TYPE_UNSPECIFIED",
356 QuoteType::Limit => "QUOTE_TYPE_LIMIT",
357 QuoteType::Market => "QUOTE_TYPE_MARKET",
358 QuoteType::BestTake => "QUOTE_TYPE_BEST_TAKE",
359 QuoteType::BestMake => "QUOTE_TYPE_BEST_MAKE",
360 }
361 }
362 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
364 match value {
365 "QUOTE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
366 "QUOTE_TYPE_LIMIT" => Some(Self::Limit),
367 "QUOTE_TYPE_MARKET" => Some(Self::Market),
368 "QUOTE_TYPE_BEST_TAKE" => Some(Self::BestTake),
369 "QUOTE_TYPE_BEST_MAKE" => Some(Self::BestMake),
370 _ => None,
371 }
372 }
373}
374#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
376#[repr(i32)]
377pub enum LimitPriceType {
378 Unspecified = 0,
380 BestTake = 1,
382 BestTakePlus1 = 2,
384 BestTakePlus2 = 3,
386 BestTakePlus3 = 4,
388 BestMakeMinus1 = 5,
390 BestMakeMinus2 = 6,
392 BestMakeMinus3 = 7,
394}
395impl LimitPriceType {
396 pub fn as_str_name(&self) -> &'static str {
401 match self {
402 LimitPriceType::Unspecified => "LIMIT_PRICE_TYPE_UNSPECIFIED",
403 LimitPriceType::BestTake => "LIMIT_PRICE_TYPE_BEST_TAKE",
404 LimitPriceType::BestTakePlus1 => "LIMIT_PRICE_TYPE_BEST_TAKE_PLUS_1",
405 LimitPriceType::BestTakePlus2 => "LIMIT_PRICE_TYPE_BEST_TAKE_PLUS_2",
406 LimitPriceType::BestTakePlus3 => "LIMIT_PRICE_TYPE_BEST_TAKE_PLUS_3",
407 LimitPriceType::BestMakeMinus1 => "LIMIT_PRICE_TYPE_BEST_MAKE_MINUS_1",
408 LimitPriceType::BestMakeMinus2 => "LIMIT_PRICE_TYPE_BEST_MAKE_MINUS_2",
409 LimitPriceType::BestMakeMinus3 => "LIMIT_PRICE_TYPE_BEST_MAKE_MINUS_3",
410 }
411 }
412 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
414 match value {
415 "LIMIT_PRICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
416 "LIMIT_PRICE_TYPE_BEST_TAKE" => Some(Self::BestTake),
417 "LIMIT_PRICE_TYPE_BEST_TAKE_PLUS_1" => Some(Self::BestTakePlus1),
418 "LIMIT_PRICE_TYPE_BEST_TAKE_PLUS_2" => Some(Self::BestTakePlus2),
419 "LIMIT_PRICE_TYPE_BEST_TAKE_PLUS_3" => Some(Self::BestTakePlus3),
420 "LIMIT_PRICE_TYPE_BEST_MAKE_MINUS_1" => Some(Self::BestMakeMinus1),
421 "LIMIT_PRICE_TYPE_BEST_MAKE_MINUS_2" => Some(Self::BestMakeMinus2),
422 "LIMIT_PRICE_TYPE_BEST_MAKE_MINUS_3" => Some(Self::BestMakeMinus3),
423 _ => None,
424 }
425 }
426}
427#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
428#[repr(i32)]
429pub enum OrderStatus {
430 Unspecified = 0,
431 Submitted = 1,
433 Rejected = 2,
435}
436impl OrderStatus {
437 pub fn as_str_name(&self) -> &'static str {
442 match self {
443 OrderStatus::Unspecified => "ORDER_STATUS_UNSPECIFIED",
444 OrderStatus::Submitted => "ORDER_STATUS_SUBMITTED",
445 OrderStatus::Rejected => "ORDER_STATUS_REJECTED",
446 }
447 }
448 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
450 match value {
451 "ORDER_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
452 "ORDER_STATUS_SUBMITTED" => Some(Self::Submitted),
453 "ORDER_STATUS_REJECTED" => Some(Self::Rejected),
454 _ => None,
455 }
456 }
457}
458#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
459#[repr(i32)]
460pub enum OrderResultType {
461 Unspecified = 0,
462 Received = 1,
464 Rejected = 2,
466 Filled = 3,
468 Cancelled = 4,
470}
471impl OrderResultType {
472 pub fn as_str_name(&self) -> &'static str {
477 match self {
478 OrderResultType::Unspecified => "ORDER_RESULT_TYPE_UNSPECIFIED",
479 OrderResultType::Received => "ORDER_RESULT_TYPE_RECEIVED",
480 OrderResultType::Rejected => "ORDER_RESULT_TYPE_REJECTED",
481 OrderResultType::Filled => "ORDER_RESULT_TYPE_FILLED",
482 OrderResultType::Cancelled => "ORDER_RESULT_TYPE_CANCELLED",
483 }
484 }
485 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
487 match value {
488 "ORDER_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
489 "ORDER_RESULT_TYPE_RECEIVED" => Some(Self::Received),
490 "ORDER_RESULT_TYPE_REJECTED" => Some(Self::Rejected),
491 "ORDER_RESULT_TYPE_FILLED" => Some(Self::Filled),
492 "ORDER_RESULT_TYPE_CANCELLED" => Some(Self::Cancelled),
493 _ => None,
494 }
495 }
496}
497include!("kdo.v1.order.tonic.rs");
498include!("kdo.v1.order.serde.rs");
499