#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitOrderRequest {
#[prost(string, tag="1")]
pub fund_code: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub symbol: ::prost::alloc::string::String,
#[prost(enumeration="super::common::OrderSide", tag="3")]
pub side: i32,
#[prost(int64, tag="4")]
pub quantity: i64,
#[prost(string, tag="5")]
pub price: ::prost::alloc::string::String,
#[prost(enumeration="QuoteType", tag="6")]
pub quote_type: i32,
#[prost(bool, tag="7")]
pub is_lp: bool,
#[prost(enumeration="super::common::AmendMethodType", optional, tag="8")]
pub auto_amend_strategy: ::core::option::Option<i32>,
#[prost(enumeration="LimitPriceType", optional, tag="9")]
pub limit_price_type: ::core::option::Option<i32>,
#[prost(enumeration="super::common::OrderConditionType", optional, tag="10")]
pub order_condition: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitOrderResponse {
#[prost(uint64, tag="1")]
pub order_id: u64,
#[prost(enumeration="OrderStatus", tag="2")]
pub status: i32,
#[prost(string, tag="3")]
pub message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AmendOrderRequest {
#[prost(uint64, tag="1")]
pub original_order_id: u64,
#[prost(string, tag="3")]
pub symbol: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub price: ::prost::alloc::string::String,
#[prost(enumeration="super::common::OrderSide", tag="6")]
pub side: i32,
#[prost(bool, tag="7")]
pub is_lp: bool,
#[prost(enumeration="QuoteType", tag="8")]
pub quote_type: i32,
#[prost(string, tag="9")]
pub fund_code: ::prost::alloc::string::String,
#[prost(enumeration="super::common::OrderConditionType", optional, tag="10")]
pub order_condition: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AmendOrderResponse {
#[prost(uint64, tag="1")]
pub order_id: u64,
#[prost(uint64, tag="2")]
pub original_order_id: u64,
#[prost(enumeration="OrderStatus", tag="3")]
pub status: i32,
#[prost(string, tag="4")]
pub message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelOrderRequest {
#[prost(uint64, tag="1")]
pub original_order_id: u64,
#[prost(string, tag="3")]
pub symbol: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub fund_code: ::prost::alloc::string::String,
#[prost(enumeration="super::common::OrderSide", tag="6")]
pub side: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelOrderResponse {
#[prost(uint64, tag="1")]
pub order_id: u64,
#[prost(uint64, tag="2")]
pub original_order_id: u64,
#[prost(enumeration="OrderStatus", tag="3")]
pub status: i32,
#[prost(string, tag="4")]
pub message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAllUnfilledOrdersRequest {
#[prost(string, optional, tag="1")]
pub fund_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag="2")]
pub symbol: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration="super::common::OrderSide", optional, tag="3")]
pub side: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAllUnfilledOrdersResponse {
#[prost(message, repeated, tag="1")]
pub orders: ::prost::alloc::vec::Vec<Order>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CancelAllOrdersRequest {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelAllOrdersResponse {
#[prost(int32, tag="1")]
pub cancelled_count: i32,
#[prost(string, tag="2")]
pub message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamOrderResultsRequest {
#[prost(string, optional, tag="1")]
pub fund_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag="2")]
pub symbol: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderResult {
#[prost(uint64, tag="1")]
pub order_id: u64,
#[prost(string, tag="2")]
pub symbol: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub fund_code: ::prost::alloc::string::String,
#[prost(enumeration="super::common::OrderSide", tag="4")]
pub side: i32,
#[prost(string, tag="5")]
pub price: ::prost::alloc::string::String,
#[prost(int64, tag="6")]
pub quantity: i64,
#[prost(enumeration="OrderResultType", tag="7")]
pub result_type: i32,
#[prost(message, optional, tag="8")]
pub timestamp: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(oneof="order_result::Details", tags="10, 11, 12, 13")]
pub details: ::core::option::Option<order_result::Details>,
}
pub mod order_result {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Details {
#[prost(message, tag="10")]
Received(super::ReceivedDetails),
#[prost(message, tag="11")]
Rejected(super::RejectedDetails),
#[prost(message, tag="12")]
Filled(super::FilledDetails),
#[prost(message, tag="13")]
Cancelled(super::CancelledDetails),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReceivedDetails {
#[prost(uint64, tag="1")]
pub receive_time: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RejectedDetails {
#[prost(string, tag="1")]
pub rejection_code: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub error_message: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FilledDetails {
#[prost(string, tag="1")]
pub filled_price: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub filled_quantity: i64,
#[prost(uint64, tag="3")]
pub trade_time: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelledDetails {
#[prost(string, tag="1")]
pub cancellation_code: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub cancelled_quantity: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOrdersRequest {
#[prost(string, tag="1")]
pub filter: ::prost::alloc::string::String,
#[prost(int32, tag="2")]
pub page_size: i32,
#[prost(string, tag="3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOrdersResponse {
#[prost(message, repeated, tag="1")]
pub orders: ::prost::alloc::vec::Vec<Order>,
#[prost(string, tag="2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Order {
#[prost(string, tag="1")]
pub order_id: ::prost::alloc::string::String,
#[prost(enumeration="super::common::OrderSide", tag="2")]
pub order_side: i32,
#[prost(string, tag="3")]
pub symbol: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub price: ::prost::alloc::string::String,
#[prost(int64, tag="5")]
pub quantity: i64,
#[prost(int64, tag="6")]
pub filled_quantity: i64,
#[prost(enumeration="OrderStatus", tag="7")]
pub status: i32,
#[prost(int64, tag="8")]
pub created_at: i64,
#[prost(int64, tag="9")]
pub updated_at: i64,
#[prost(string, tag="10")]
pub fund_code: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum QuoteType {
Unspecified = 0,
Limit = 1,
Market = 2,
BestTake = 3,
BestMake = 4,
}
impl QuoteType {
pub fn as_str_name(&self) -> &'static str {
match self {
QuoteType::Unspecified => "QUOTE_TYPE_UNSPECIFIED",
QuoteType::Limit => "QUOTE_TYPE_LIMIT",
QuoteType::Market => "QUOTE_TYPE_MARKET",
QuoteType::BestTake => "QUOTE_TYPE_BEST_TAKE",
QuoteType::BestMake => "QUOTE_TYPE_BEST_MAKE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"QUOTE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"QUOTE_TYPE_LIMIT" => Some(Self::Limit),
"QUOTE_TYPE_MARKET" => Some(Self::Market),
"QUOTE_TYPE_BEST_TAKE" => Some(Self::BestTake),
"QUOTE_TYPE_BEST_MAKE" => Some(Self::BestMake),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LimitPriceType {
Unspecified = 0,
BestTake = 1,
BestTake1 = 2,
BestTake2 = 3,
BestTake3 = 4,
BestMake1 = 5,
BestMake2 = 6,
BestMake3 = 7,
}
impl LimitPriceType {
pub fn as_str_name(&self) -> &'static str {
match self {
LimitPriceType::Unspecified => "LIMIT_PRICE_TYPE_UNSPECIFIED",
LimitPriceType::BestTake => "LIMIT_PRICE_TYPE_BEST_TAKE",
LimitPriceType::BestTake1 => "LIMIT_PRICE_TYPE_BEST_TAKE_1",
LimitPriceType::BestTake2 => "LIMIT_PRICE_TYPE_BEST_TAKE_2",
LimitPriceType::BestTake3 => "LIMIT_PRICE_TYPE_BEST_TAKE_3",
LimitPriceType::BestMake1 => "LIMIT_PRICE_TYPE_BEST_MAKE_1",
LimitPriceType::BestMake2 => "LIMIT_PRICE_TYPE_BEST_MAKE_2",
LimitPriceType::BestMake3 => "LIMIT_PRICE_TYPE_BEST_MAKE_3",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LIMIT_PRICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"LIMIT_PRICE_TYPE_BEST_TAKE" => Some(Self::BestTake),
"LIMIT_PRICE_TYPE_BEST_TAKE_1" => Some(Self::BestTake1),
"LIMIT_PRICE_TYPE_BEST_TAKE_2" => Some(Self::BestTake2),
"LIMIT_PRICE_TYPE_BEST_TAKE_3" => Some(Self::BestTake3),
"LIMIT_PRICE_TYPE_BEST_MAKE_1" => Some(Self::BestMake1),
"LIMIT_PRICE_TYPE_BEST_MAKE_2" => Some(Self::BestMake2),
"LIMIT_PRICE_TYPE_BEST_MAKE_3" => Some(Self::BestMake3),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderStatus {
Unspecified = 0,
Submitted = 1,
Rejected = 2,
}
impl OrderStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
OrderStatus::Unspecified => "ORDER_STATUS_UNSPECIFIED",
OrderStatus::Submitted => "ORDER_STATUS_SUBMITTED",
OrderStatus::Rejected => "ORDER_STATUS_REJECTED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"ORDER_STATUS_SUBMITTED" => Some(Self::Submitted),
"ORDER_STATUS_REJECTED" => Some(Self::Rejected),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderResultType {
Unspecified = 0,
Received = 1,
Rejected = 2,
Filled = 3,
Cancelled = 4,
}
impl OrderResultType {
pub fn as_str_name(&self) -> &'static str {
match self {
OrderResultType::Unspecified => "ORDER_RESULT_TYPE_UNSPECIFIED",
OrderResultType::Received => "ORDER_RESULT_TYPE_RECEIVED",
OrderResultType::Rejected => "ORDER_RESULT_TYPE_REJECTED",
OrderResultType::Filled => "ORDER_RESULT_TYPE_FILLED",
OrderResultType::Cancelled => "ORDER_RESULT_TYPE_CANCELLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ORDER_RESULT_TYPE_RECEIVED" => Some(Self::Received),
"ORDER_RESULT_TYPE_REJECTED" => Some(Self::Rejected),
"ORDER_RESULT_TYPE_FILLED" => Some(Self::Filled),
"ORDER_RESULT_TYPE_CANCELLED" => Some(Self::Cancelled),
_ => None,
}
}
}
include!("kdo.v1.order.tonic.rs");
include!("kdo.v1.order.serde.rs");