#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeadLagV2 {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(int32, tag="2")]
pub id: i32,
#[prost(string, tag="3")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub futures_isin: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub etf_isin: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub futures_fund_code: ::prost::alloc::string::String,
#[prost(string, tag="7")]
pub etf_fund_code: ::prost::alloc::string::String,
#[prost(message, optional, tag="8")]
pub trigger_config: ::core::option::Option<LeadLagV2TriggerConfig>,
#[prost(bool, tag="9")]
pub is_active: bool,
#[prost(message, optional, tag="10")]
pub create_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag="11")]
pub update_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LeadLagV2TriggerConfig {
#[prost(int64, tag="1")]
pub buy_adjustment: i64,
#[prost(int64, tag="2")]
pub sell_adjustment: i64,
#[prost(uint64, tag="3")]
pub verify_wait_us: u64,
#[prost(uint64, tag="4")]
pub cooldown_ms: u64,
#[prost(int64, tag="5")]
pub max_bid_position: i64,
#[prost(int64, tag="6")]
pub max_ask_position: i64,
#[prost(int64, tag="7")]
pub etf_order_quantity: i64,
#[prost(int64, tag="8")]
pub futures_order_quantity: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLeadLagV2Request {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLeadLagV2sRequest {
#[prost(int32, optional, tag="1")]
pub page_size: ::core::option::Option<i32>,
#[prost(string, optional, tag="2")]
pub page_token: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag="3")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLeadLagV2sResponse {
#[prost(message, repeated, tag="1")]
pub lead_lag_v2s: ::prost::alloc::vec::Vec<LeadLagV2>,
#[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 CreateLeadLagV2Request {
#[prost(message, optional, tag="1")]
pub lead_lag_v2: ::core::option::Option<LeadLagV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateLeadLagV2Request {
#[prost(message, optional, tag="1")]
pub lead_lag_v2: ::core::option::Option<LeadLagV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteLeadLagV2Request {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetLeadLagV2ActiveRequest {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
#[prost(bool, tag="2")]
pub is_active: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartLeadLagV2Request {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartLeadLagV2Response {
#[prost(enumeration="LeadLagV2State", tag="1")]
pub state: 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 StopLeadLagV2Request {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopLeadLagV2Response {
#[prost(enumeration="LeadLagV2State", tag="1")]
pub state: 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 GetLeadLagV2ExecutionSummaryRequest {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
#[prost(int32, optional, tag="2")]
pub start_date: ::core::option::Option<i32>,
#[prost(int32, optional, tag="3")]
pub end_date: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LeadLagV2ExecutionSummaryResponse {
#[prost(message, optional, tag="1")]
pub futures: ::core::option::Option<LeadLagV2LegExecutionSummary>,
#[prost(message, optional, tag="2")]
pub etf: ::core::option::Option<LeadLagV2LegExecutionSummary>,
#[prost(double, optional, tag="3")]
pub spread: ::core::option::Option<f64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LeadLagV2LegExecutionSummary {
#[prost(int64, tag="1")]
pub sell_filled_qty: i64,
#[prost(int64, tag="2")]
pub buy_filled_qty: i64,
#[prost(double, optional, tag="3")]
pub sell_avg_price: ::core::option::Option<f64>,
#[prost(double, optional, tag="4")]
pub buy_avg_price: ::core::option::Option<f64>,
#[prost(int64, tag="5")]
pub net_qty: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLeadLagV2StatusRequest {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamLeadLagV2StatusRequest {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeadLagV2StatusUpdate {
#[prost(int32, tag="1")]
pub lead_lag_v2_id: i32,
#[prost(enumeration="LeadLagV2State", optional, tag="2")]
pub state: ::core::option::Option<i32>,
#[prost(int64, optional, tag="3")]
pub futures_position: ::core::option::Option<i64>,
#[prost(uint64, optional, tag="4")]
pub total_trades: ::core::option::Option<u64>,
#[prost(double, optional, tag="5")]
pub last_futures_price: ::core::option::Option<f64>,
#[prost(message, optional, tag="6")]
pub last_signal: ::core::option::Option<LeadLagV2SignalInfo>,
#[prost(message, optional, tag="7")]
pub spread_info: ::core::option::Option<LeadLagV2SpreadInfo>,
#[prost(uint64, optional, tag="8")]
pub latency_us: ::core::option::Option<u64>,
#[prost(uint64, tag="9")]
pub timestamp_us: u64,
#[prost(int64, optional, tag="10")]
pub etf_position: ::core::option::Option<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeadLagV2SignalInfo {
#[prost(string, tag="1")]
pub direction: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub spread: i64,
#[prost(string, tag="3")]
pub futures_side: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub etf_side: ::prost::alloc::string::String,
#[prost(double, tag="5")]
pub futures_price: f64,
#[prost(double, tag="6")]
pub etf_price: f64,
#[prost(int64, tag="7")]
pub futures_qty: i64,
#[prost(int64, tag="8")]
pub etf_qty: i64,
#[prost(string, tag="9")]
pub etf_fok_status: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LeadLagV2SpreadInfo {
#[prost(double, optional, tag="1")]
pub etf_bid1: ::core::option::Option<f64>,
#[prost(double, optional, tag="2")]
pub etf_ask1: ::core::option::Option<f64>,
#[prost(double, optional, tag="3")]
pub futures_bid1: ::core::option::Option<f64>,
#[prost(double, optional, tag="4")]
pub futures_ask1: ::core::option::Option<f64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeadLagV2TradeRecord {
#[prost(int64, tag="1")]
pub id: i64,
#[prost(string, tag="2")]
pub lead_lag_v2: ::prost::alloc::string::String,
#[prost(int64, tag="3")]
pub trade_number: i64,
#[prost(string, tag="4")]
pub direction: ::prost::alloc::string::String,
#[prost(int64, tag="5")]
pub spread: i64,
#[prost(string, tag="6")]
pub futures_side: ::prost::alloc::string::String,
#[prost(string, tag="7")]
pub etf_side: ::prost::alloc::string::String,
#[prost(double, tag="8")]
pub futures_price: f64,
#[prost(double, tag="9")]
pub etf_price: f64,
#[prost(int64, tag="10")]
pub futures_qty: i64,
#[prost(int64, tag="11")]
pub etf_qty: i64,
#[prost(int64, tag="12")]
pub futures_position_after: i64,
#[prost(uint64, tag="13")]
pub latency_us: u64,
#[prost(int32, tag="14")]
pub date: i32,
#[prost(message, optional, tag="15")]
pub created_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(int64, tag="16")]
pub send_order_time: i64,
#[prost(int64, tag="17")]
pub trigger_exchange_time: i64,
#[prost(int64, tag="18")]
pub futures_filled_time: i64,
#[prost(int64, tag="19")]
pub etf_filled_time: i64,
#[prost(double, tag="20")]
pub futures_trigger_price: f64,
#[prost(double, tag="21")]
pub etf_trigger_price: f64,
#[prost(string, tag="22")]
pub etf_fok_status: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLeadLagV2TradesRequest {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
#[prost(int32, optional, tag="2")]
pub page_size: ::core::option::Option<i32>,
#[prost(string, optional, tag="3")]
pub page_token: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag="4")]
pub filter: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub order_by: ::prost::alloc::string::String,
#[prost(int32, optional, tag="6")]
pub start_date: ::core::option::Option<i32>,
#[prost(int32, optional, tag="7")]
pub end_date: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLeadLagV2TradesResponse {
#[prost(message, repeated, tag="1")]
pub trades: ::prost::alloc::vec::Vec<LeadLagV2TradeRecord>,
#[prost(string, tag="2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(int32, tag="3")]
pub total_count: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLeadLagV2TradeRequest {
#[prost(string, tag="1")]
pub lead_lag_v2: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub trade_id: i64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LeadLagV2State {
Unspecified = 0,
Idle = 1,
Monitoring = 2,
Triggered = 3,
Error = 4,
}
impl LeadLagV2State {
pub fn as_str_name(&self) -> &'static str {
match self {
LeadLagV2State::Unspecified => "LEAD_LAG_V2_STATE_UNSPECIFIED",
LeadLagV2State::Idle => "LEAD_LAG_V2_STATE_IDLE",
LeadLagV2State::Monitoring => "LEAD_LAG_V2_STATE_MONITORING",
LeadLagV2State::Triggered => "LEAD_LAG_V2_STATE_TRIGGERED",
LeadLagV2State::Error => "LEAD_LAG_V2_STATE_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LEAD_LAG_V2_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"LEAD_LAG_V2_STATE_IDLE" => Some(Self::Idle),
"LEAD_LAG_V2_STATE_MONITORING" => Some(Self::Monitoring),
"LEAD_LAG_V2_STATE_TRIGGERED" => Some(Self::Triggered),
"LEAD_LAG_V2_STATE_ERROR" => Some(Self::Error),
_ => None,
}
}
}
include!("kdo.v1.lead_lag_v2.tonic.rs");
include!("kdo.v1.lead_lag_v2.serde.rs");