// @generated
// This file is @generated by prost-build.
// ============================================================================
// CREATE ORDER
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateOrderRequest {
    #[prost(string, tag="1")]
    pub trading_pair_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub order_type: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub side: ::prost::alloc::string::String,
    #[prost(string, optional, tag="4")]
    pub price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="5")]
    pub quantity: ::prost::alloc::string::String,
    #[prost(string, optional, tag="6")]
    pub trading_mode: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag="7")]
    pub slippage_tolerance_bps: ::core::option::Option<i32>,
    #[prost(bool, optional, tag="8")]
    pub use_master_balance: ::core::option::Option<bool>,
    #[prost(string, optional, tag="9")]
    pub expiration_date: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="10")]
    pub time_in_force: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="11")]
    pub margin_account_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="12")]
    pub position_side: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="13")]
    pub leverage: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, optional, tag="14")]
    pub reduce_only: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateOrderResponse {
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub message: ::prost::alloc::string::String,
    #[prost(message, optional, tag="4")]
    pub match_result: ::core::option::Option<super::super::common::orders::MatchResult>,
}
// ============================================================================
// CANCEL ORDER
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelOrderRequest {
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelOrderResponse {
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub message: ::prost::alloc::string::String,
}
// ============================================================================
// BATCH CANCEL ORDERS
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchCancelOrdersRequest {
    #[prost(string, repeated, tag="1")]
    pub order_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCancelOrdersResponse {
    #[prost(int32, tag="1")]
    pub total_requested: i32,
    #[prost(int32, tag="2")]
    pub total_cancelled: i32,
    #[prost(int32, tag="3")]
    pub total_failed: i32,
    #[prost(message, repeated, tag="4")]
    pub results: ::prost::alloc::vec::Vec<BatchCancelResult>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchCancelResult {
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub cancelled_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag="3")]
    pub error: ::core::option::Option<BatchCancelError>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchCancelError {
    #[prost(string, tag="1")]
    pub code: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub message: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchCancelAllRequest {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchCancelAllByPairRequest {
    #[prost(string, tag="1")]
    pub trading_pair_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCancelAllResponse {
    #[prost(int32, tag="1")]
    pub total_requested: i32,
    #[prost(int32, tag="2")]
    pub total_cancelled: i32,
    #[prost(int32, tag="3")]
    pub total_failed: i32,
    #[prost(message, repeated, tag="4")]
    pub results: ::prost::alloc::vec::Vec<BatchCancelResult>,
}
// ============================================================================
// BATCH CREATE ORDERS
// ============================================================================

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateOrdersRequest {
    #[prost(message, repeated, tag="1")]
    pub orders: ::prost::alloc::vec::Vec<BatchCreateOrderItem>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchCreateOrderItem {
    #[prost(string, tag="1")]
    pub trading_pair_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub order_type: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub side: ::prost::alloc::string::String,
    #[prost(string, optional, tag="4")]
    pub price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="5")]
    pub quantity: ::prost::alloc::string::String,
    #[prost(string, optional, tag="6")]
    pub trading_mode: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag="7")]
    pub slippage_tolerance_bps: ::core::option::Option<i32>,
    #[prost(bool, optional, tag="8")]
    pub use_master_balance: ::core::option::Option<bool>,
    #[prost(string, optional, tag="9")]
    pub expiration_date: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="10")]
    pub time_in_force: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="11")]
    pub margin_account_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="12")]
    pub position_side: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="13")]
    pub leverage: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, optional, tag="14")]
    pub reduce_only: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateOrdersResponse {
    #[prost(int32, tag="1")]
    pub total_requested: i32,
    #[prost(int32, tag="2")]
    pub total_succeeded: i32,
    #[prost(int32, tag="3")]
    pub total_failed: i32,
    #[prost(message, repeated, tag="4")]
    pub results: ::prost::alloc::vec::Vec<BatchCreateResult>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchCreateResult {
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="2")]
    pub match_result: ::core::option::Option<super::super::common::orders::MatchResult>,
    #[prost(message, optional, tag="3")]
    pub error: ::core::option::Option<BatchCreateError>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchCreateError {
    #[prost(string, tag="1")]
    pub code: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub message: ::prost::alloc::string::String,
}
// ============================================================================
// BATCH REPLACE ORDERS
// ============================================================================

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchReplaceOrdersRequest {
    #[prost(message, repeated, tag="1")]
    pub orders: ::prost::alloc::vec::Vec<BatchReplaceOrderItem>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchReplaceOrderItem {
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="3")]
    pub quantity: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, optional, tag="4")]
    pub use_master_balance: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchReplaceOrdersResponse {
    #[prost(int32, tag="1")]
    pub total_requested: i32,
    #[prost(int32, tag="2")]
    pub total_succeeded: i32,
    #[prost(int32, tag="3")]
    pub total_failed: i32,
    #[prost(message, repeated, tag="4")]
    pub results: ::prost::alloc::vec::Vec<BatchReplaceResult>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchReplaceResult {
    #[prost(string, tag="1")]
    pub original_order_id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub new_order_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag="3")]
    pub updated_fields: ::core::option::Option<super::super::common::orders::UpdatedFields>,
    #[prost(message, optional, tag="4")]
    pub match_result: ::core::option::Option<super::super::common::orders::MatchResult>,
    #[prost(message, optional, tag="5")]
    pub error: ::core::option::Option<BatchReplaceError>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchReplaceError {
    #[prost(string, tag="1")]
    pub code: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub message: ::prost::alloc::string::String,
}
// ============================================================================
// REPLACE ORDER
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReplaceOrderRequest {
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="3")]
    pub quantity: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, optional, tag="4")]
    pub use_master_balance: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReplaceOrderResponse {
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub message: ::prost::alloc::string::String,
    #[prost(string, optional, tag="4")]
    pub original_order_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag="5")]
    pub updated_fields: ::core::option::Option<super::super::common::orders::UpdatedFields>,
    #[prost(message, optional, tag="6")]
    pub match_result: ::core::option::Option<super::super::common::orders::MatchResult>,
}
// ============================================================================
// GET / LIST ORDERS
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetOrderRequest {
    #[prost(string, tag="1")]
    pub order_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetOrderResponse {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub trading_pair_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub order_type: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub side: ::prost::alloc::string::String,
    #[prost(string, optional, tag="5")]
    pub price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="6")]
    pub quantity: ::prost::alloc::string::String,
    #[prost(string, tag="7")]
    pub filled_quantity: ::prost::alloc::string::String,
    #[prost(string, optional, tag="8")]
    pub average_fill_price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="9")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="10")]
    pub trading_mode: ::prost::alloc::string::String,
    #[prost(string, optional, tag="11")]
    pub time_in_force: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="12")]
    pub created_at: ::prost::alloc::string::String,
    #[prost(string, optional, tag="13")]
    pub updated_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="14")]
    pub expiration_date: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="15")]
    pub application_taker_fee: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="16")]
    pub monaco_taker_fee: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="17")]
    pub monaco_maker_rebate: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="18")]
    pub total_taker_fees: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="19")]
    pub taker_total_payment: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="20")]
    pub maker_total_receipt: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="21")]
    pub margin_account_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="22")]
    pub position_side: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="23")]
    pub leverage: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, optional, tag="24")]
    pub reduce_only: ::core::option::Option<bool>,
    #[prost(string, optional, tag="25")]
    pub position_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListOrdersRequest {
    #[prost(uint32, optional, tag="1")]
    pub page: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag="2")]
    pub page_size: ::core::option::Option<u32>,
    #[prost(string, optional, tag="3")]
    pub status: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="4")]
    pub trading_pair_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub trading_mode: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="6")]
    pub margin_account_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOrdersResponse {
    #[prost(message, repeated, tag="1")]
    pub orders: ::prost::alloc::vec::Vec<GetOrderResponse>,
    #[prost(uint32, tag="2")]
    pub total: u32,
    #[prost(uint32, tag="3")]
    pub page: u32,
    #[prost(uint32, tag="4")]
    pub page_size: u32,
    #[prost(uint32, tag="5")]
    pub total_pages: u32,
}
// ============================================================================
// CONDITIONAL TP/SL ORDERS
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateConditionalOrderRequest {
    #[prost(string, tag="1")]
    pub trading_pair_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub margin_account_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub condition_type: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub trigger_price: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub trigger_source: ::prost::alloc::string::String,
    #[prost(string, tag="6")]
    pub side: ::prost::alloc::string::String,
    #[prost(string, tag="7")]
    pub position_side: ::prost::alloc::string::String,
    #[prost(string, tag="8")]
    pub order_type: ::prost::alloc::string::String,
    #[prost(string, optional, tag="9")]
    pub limit_price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="10")]
    pub quantity: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, tag="11")]
    pub reduce_only: bool,
    #[prost(string, optional, tag="12")]
    pub time_in_force: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag="13")]
    pub slippage_tolerance_bps: ::core::option::Option<i32>,
    #[prost(string, optional, tag="14")]
    pub expires_at: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateConditionalOrderResponse {
    #[prost(string, tag="1")]
    pub conditional_order_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub message: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub state: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelConditionalOrderRequest {
    #[prost(string, tag="1")]
    pub conditional_order_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelConditionalOrderResponse {
    #[prost(string, tag="1")]
    pub conditional_order_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListConditionalOrdersRequest {
    #[prost(string, optional, tag="1")]
    pub margin_account_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="2")]
    pub trading_pair_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="3")]
    pub state: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint32, optional, tag="4")]
    pub page: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag="5")]
    pub page_size: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConditionalOrder {
    #[prost(string, tag="1")]
    pub conditional_order_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub trading_pair_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub margin_account_id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="4")]
    pub position_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub linked_group_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="6")]
    pub condition_type: ::prost::alloc::string::String,
    #[prost(string, tag="7")]
    pub trigger_source: ::prost::alloc::string::String,
    #[prost(string, tag="8")]
    pub trigger_price: ::prost::alloc::string::String,
    #[prost(string, tag="9")]
    pub side: ::prost::alloc::string::String,
    #[prost(string, tag="10")]
    pub position_side: ::prost::alloc::string::String,
    #[prost(string, tag="11")]
    pub order_type: ::prost::alloc::string::String,
    #[prost(string, optional, tag="12")]
    pub limit_price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="13")]
    pub quantity: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag="14")]
    pub slippage_tolerance_bps: ::core::option::Option<i32>,
    #[prost(bool, tag="15")]
    pub reduce_only: bool,
    #[prost(string, optional, tag="16")]
    pub time_in_force: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="17")]
    pub state: ::prost::alloc::string::String,
    #[prost(string, optional, tag="18")]
    pub triggered_order_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="19")]
    pub triggered_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="20")]
    pub cancelled_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="21")]
    pub expires_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="22")]
    pub failure_reason: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="23")]
    pub created_at: ::prost::alloc::string::String,
    #[prost(string, tag="24")]
    pub updated_at: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConditionalOrdersResponse {
    #[prost(message, repeated, tag="1")]
    pub orders: ::prost::alloc::vec::Vec<ConditionalOrder>,
    #[prost(uint32, tag="2")]
    pub total: u32,
    #[prost(uint32, tag="3")]
    pub page: u32,
    #[prost(uint32, tag="4")]
    pub page_size: u32,
}
include!("monaco.api.orders.tonic.rs");
// @@protoc_insertion_point(module)