#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeadLag {
#[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<LeadLagTriggerConfig>,
#[prost(bool, tag="9")]
pub is_active: bool,
#[prost(message, optional, tag="12")]
pub create_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag="13")]
pub update_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(bool, tag="14")]
pub is_etf_inverse: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LeadLagTriggerConfig {
#[prost(int64, tag="1")]
pub tick_threshold: i64,
#[prost(uint64, tag="2")]
pub window_us: u64,
#[prost(uint64, tag="3")]
pub cooldown_ms: u64,
#[prost(int64, tag="4")]
pub max_bid_position: i64,
#[prost(int64, tag="5")]
pub max_ask_position: i64,
#[prost(int64, tag="6")]
pub etf_hedge_quantity: i64,
#[prost(int64, tag="7")]
pub futures_order_quantity: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLeadLagRequest {
#[prost(string, tag="1")]
pub lead_lag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLeadLagsRequest {
#[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 ListLeadLagsResponse {
#[prost(message, repeated, tag="1")]
pub lead_lags: ::prost::alloc::vec::Vec<LeadLag>,
#[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 CreateLeadLagRequest {
#[prost(message, optional, tag="1")]
pub lead_lag: ::core::option::Option<LeadLag>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateLeadLagRequest {
#[prost(message, optional, tag="1")]
pub lead_lag: ::core::option::Option<LeadLag>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteLeadLagRequest {
#[prost(string, tag="1")]
pub lead_lag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetLeadLagActiveRequest {
#[prost(string, tag="1")]
pub lead_lag: ::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 StartLeadLagRequest {
#[prost(string, tag="1")]
pub lead_lag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartLeadLagResponse {
#[prost(enumeration="LeadLagState", 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 StopLeadLagRequest {
#[prost(string, tag="1")]
pub lead_lag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopLeadLagResponse {
#[prost(enumeration="LeadLagState", 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 GetLeadLagExecutionSummaryRequest {
#[prost(string, tag="1")]
pub lead_lag: ::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 LeadLagExecutionSummaryResponse {
#[prost(message, optional, tag="1")]
pub futures: ::core::option::Option<LeadLagLegExecutionSummary>,
#[prost(message, optional, tag="2")]
pub etf: ::core::option::Option<LeadLagLegExecutionSummary>,
#[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 LeadLagLegExecutionSummary {
#[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 GetLeadLagStatusRequest {
#[prost(string, tag="1")]
pub lead_lag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamLeadLagStatusRequest {
#[prost(string, tag="1")]
pub lead_lag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeadLagStatusUpdate {
#[prost(int32, tag="1")]
pub lead_lag_id: i32,
#[prost(enumeration="LeadLagState", 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<LeadLagSignalInfo>,
#[prost(message, optional, tag="7")]
pub price_buffer: ::core::option::Option<LeadLagPriceBufferInfo>,
#[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 LeadLagSignalInfo {
#[prost(string, tag="1")]
pub direction: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub tick_change: 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,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LeadLagPriceBufferInfo {
#[prost(double, optional, tag="2")]
pub window_ask_low: ::core::option::Option<f64>,
#[prost(double, optional, tag="3")]
pub window_bid_high: ::core::option::Option<f64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLeadLagTradeContextRequest {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeadLagTradeContext {
#[prost(message, repeated, tag="1")]
pub futures_ticks: ::prost::alloc::vec::Vec<LeadLagPriceTick>,
#[prost(message, repeated, tag="2")]
pub etf_ticks: ::prost::alloc::vec::Vec<LeadLagPriceTick>,
#[prost(message, optional, tag="4")]
pub signal: ::core::option::Option<LeadLagSignalInfo>,
#[prost(double, tag="5")]
pub futures_price_at_trigger: f64,
#[prost(double, tag="6")]
pub etf_price_at_trigger: f64,
#[prost(double, tag="7")]
pub futures_price_change_pct: f64,
#[prost(double, tag="8")]
pub etf_price_change_pct: f64,
#[prost(message, optional, tag="9")]
pub trigger_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeadLagPriceTick {
#[prost(double, tag="2")]
pub price: f64,
#[prost(int64, tag="3")]
pub quantity: i64,
#[prost(string, tag="4")]
pub side: ::prost::alloc::string::String,
#[prost(message, optional, tag="5")]
pub time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeadLagTradeRecord {
#[prost(int64, tag="1")]
pub id: i64,
#[prost(string, tag="2")]
pub lead_lag: ::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 tick_change: 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="15")]
pub date: i32,
#[prost(message, optional, tag="16")]
pub created_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(int64, tag="17")]
pub send_order_time: i64,
#[prost(int64, tag="18")]
pub trigger_exchange_time: i64,
#[prost(int64, tag="19")]
pub futures_filled_time: i64,
#[prost(int64, tag="20")]
pub etf_filled_time: i64,
#[prost(double, tag="21")]
pub futures_trigger_price: f64,
#[prost(double, tag="22")]
pub etf_trigger_price: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLeadLagTradesRequest {
#[prost(string, tag="1")]
pub lead_lag: ::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 ListLeadLagTradesResponse {
#[prost(message, repeated, tag="1")]
pub trades: ::prost::alloc::vec::Vec<LeadLagTradeRecord>,
#[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 GetLeadLagTradeRequest {
#[prost(string, tag="1")]
pub lead_lag: ::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 LeadLagState {
Unspecified = 0,
Idle = 1,
Monitoring = 2,
Triggered = 3,
Error = 4,
}
impl LeadLagState {
pub fn as_str_name(&self) -> &'static str {
match self {
LeadLagState::Unspecified => "LEAD_LAG_STATE_UNSPECIFIED",
LeadLagState::Idle => "LEAD_LAG_STATE_IDLE",
LeadLagState::Monitoring => "LEAD_LAG_STATE_MONITORING",
LeadLagState::Triggered => "LEAD_LAG_STATE_TRIGGERED",
LeadLagState::Error => "LEAD_LAG_STATE_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LEAD_LAG_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"LEAD_LAG_STATE_IDLE" => Some(Self::Idle),
"LEAD_LAG_STATE_MONITORING" => Some(Self::Monitoring),
"LEAD_LAG_STATE_TRIGGERED" => Some(Self::Triggered),
"LEAD_LAG_STATE_ERROR" => Some(Self::Error),
_ => None,
}
}
}
include!("kdo.v1.lead_lag.tonic.rs");
include!("kdo.v1.lead_lag.serde.rs");