// @generated
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Position {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    /// Margin account UUID for the isolated bucket that owns this position.
    #[prost(string, tag="2")]
    pub margin_account_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub trading_pair_id: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub side: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub size: ::prost::alloc::string::String,
    #[prost(string, tag="6")]
    pub entry_price: ::prost::alloc::string::String,
    #[prost(string, tag="7")]
    pub mark_price: ::prost::alloc::string::String,
    #[prost(string, optional, tag="8")]
    pub index_price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="9")]
    pub unrealized_pnl: ::prost::alloc::string::String,
    #[prost(string, tag="10")]
    pub realized_pnl: ::prost::alloc::string::String,
    /// Current isolated collateral for this position's margin-account bucket.
    #[prost(string, tag="11")]
    pub isolated_margin: ::prost::alloc::string::String,
    #[prost(string, optional, tag="12")]
    pub leverage: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="13")]
    pub maintenance_margin_required: ::prost::alloc::string::String,
    #[prost(string, optional, tag="14")]
    pub initial_margin_required: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="15")]
    pub liquidation_price: ::prost::alloc::string::String,
    #[prost(string, tag="16")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="17")]
    pub updated_at: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListPositionsRequest {
    /// Optional isolated bucket filter.
    #[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 status: ::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, ::prost::Message)]
pub struct ListPositionsResponse {
    #[prost(message, repeated, tag="1")]
    pub positions: ::prost::alloc::vec::Vec<Position>,
    #[prost(uint32, tag="2")]
    pub total: u32,
    #[prost(uint32, tag="3")]
    pub page: u32,
    #[prost(uint32, tag="4")]
    pub page_size: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPositionRequest {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPositionResponse {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    /// Margin account UUID for the isolated bucket that owns this position.
    #[prost(string, tag="2")]
    pub margin_account_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub trading_pair_id: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub side: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub size: ::prost::alloc::string::String,
    #[prost(string, tag="6")]
    pub entry_price: ::prost::alloc::string::String,
    #[prost(string, tag="7")]
    pub mark_price: ::prost::alloc::string::String,
    #[prost(string, optional, tag="8")]
    pub index_price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="9")]
    pub unrealized_pnl: ::prost::alloc::string::String,
    #[prost(string, tag="10")]
    pub realized_pnl: ::prost::alloc::string::String,
    /// Current isolated collateral for this position's margin-account bucket.
    #[prost(string, tag="11")]
    pub isolated_margin: ::prost::alloc::string::String,
    #[prost(string, optional, tag="12")]
    pub leverage: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="13")]
    pub maintenance_margin_required: ::prost::alloc::string::String,
    #[prost(string, optional, tag="14")]
    pub initial_margin_required: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="15")]
    pub liquidation_price: ::prost::alloc::string::String,
    #[prost(string, tag="16")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="17")]
    pub updated_at: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClosePositionRequest {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub close_type: ::prost::alloc::string::String,
    #[prost(string, optional, tag="3")]
    pub limit_price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag="4")]
    pub slippage_tolerance_bps: ::core::option::Option<i32>,
    #[prost(string, optional, tag="5")]
    pub quantity: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClosePositionResponse {
    #[prost(string, tag="1")]
    pub close_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 submitted_quantity: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPositionRiskRequest {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPositionRiskResponse {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub mark_price: ::prost::alloc::string::String,
    #[prost(string, optional, tag="3")]
    pub index_price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="4")]
    pub unrealized_pnl: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub liquidation_price: ::prost::alloc::string::String,
    #[prost(string, tag="6")]
    pub margin_ratio: ::prost::alloc::string::String,
    #[prost(string, tag="7")]
    pub maintenance_margin_required: ::prost::alloc::string::String,
    #[prost(string, optional, tag="8")]
    pub initial_margin_required: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="9")]
    pub updated_at: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddPositionMarginRequest {
    /// Position UUID for the isolated bucket being adjusted.
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub amount: ::prost::alloc::string::String,
    /// Collateral asset to move into the isolated bucket. USDC is the current v1 path.
    #[prost(string, tag="3")]
    pub asset: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddPositionMarginResponse {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    /// Margin account UUID for the isolated bucket that was adjusted.
    #[prost(string, tag="2")]
    pub margin_account_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub new_isolated_margin: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReducePositionMarginRequest {
    /// Position UUID for the isolated bucket being adjusted.
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub amount: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReducePositionMarginResponse {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    /// Margin account UUID for the isolated bucket that was adjusted.
    #[prost(string, tag="2")]
    pub margin_account_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub new_isolated_margin: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PositionHistoryEvent {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub position_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub margin_account_id: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub trading_pair_id: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub action: ::prost::alloc::string::String,
    #[prost(string, optional, tag="6")]
    pub size_change: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="7")]
    pub price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="8")]
    pub realized_pnl: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="9")]
    pub fees_paid: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="10")]
    pub collateral_change: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="11")]
    pub order_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="12")]
    pub created_at: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListPositionHistoryRequest {
    #[prost(string, optional, tag="1")]
    pub position_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="2")]
    pub margin_account_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="3")]
    pub trading_pair_id: ::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, ::prost::Message)]
pub struct ListPositionHistoryResponse {
    #[prost(message, repeated, tag="1")]
    pub events: ::prost::alloc::vec::Vec<PositionHistoryEvent>,
    #[prost(uint32, tag="2")]
    pub total: u32,
    #[prost(uint32, tag="3")]
    pub page: u32,
    #[prost(uint32, tag="4")]
    pub page_size: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TpSlLeg {
    #[prost(string, tag="1")]
    pub trigger_price: ::prost::alloc::string::String,
    /// MARKET or LIMIT
    #[prost(string, tag="2")]
    pub order_type: ::prost::alloc::string::String,
    #[prost(string, optional, tag="3")]
    pub limit_price: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="4")]
    pub quantity: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub time_in_force: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag="6")]
    pub slippage_tolerance_bps: ::core::option::Option<i32>,
    #[prost(string, optional, tag="7")]
    pub expires_at: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AttachPositionTpSlRequest {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="2")]
    pub take_profit: ::core::option::Option<TpSlLeg>,
    #[prost(message, optional, tag="3")]
    pub stop_loss: ::core::option::Option<TpSlLeg>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AttachPositionTpSlResponse {
    #[prost(string, tag="1")]
    pub position_id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub take_profit_order_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="3")]
    pub stop_loss_order_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="4")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub message: ::prost::alloc::string::String,
}
include!("monaco.api.positions.tonic.rs");
// @@protoc_insertion_point(module)