#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2 {
#[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(int32, tag="4")]
pub portfolio_id: i32,
#[prost(message, optional, tag="5")]
pub base: ::core::option::Option<PairV2Entry>,
#[prost(message, optional, tag="6")]
pub counter: ::core::option::Option<PairV2Entry>,
#[prost(message, optional, tag="7")]
pub spread: ::core::option::Option<PairV2SpreadType>,
#[prost(double, tag="8")]
pub target_spread: f64,
#[prost(uint64, tag="9")]
pub cooldown_ms: u64,
#[prost(double, tag="10")]
pub amend_threshold: f64,
#[prost(message, optional, tag="11")]
pub nav: ::core::option::Option<PairV2Nav>,
#[prost(int64, tag="12")]
pub max_base_quantity: i64,
#[prost(enumeration="PairV2Status", tag="13")]
pub status: i32,
#[prost(message, optional, tag="14")]
pub create_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag="15")]
pub update_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2Entry {
#[prost(string, tag="1")]
pub symbol: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub fund_code: ::prost::alloc::string::String,
#[prost(enumeration="super::common::OrderSide", tag="3")]
pub side: i32,
#[prost(int64, tag="4")]
pub quantity: i64,
#[prost(enumeration="super::common::RelativePriceSource", tag="5")]
pub price_source: i32,
#[prost(enumeration="super::hedge::OrderTpCode", tag="6")]
pub tp_code: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairV2SpreadType {
#[prost(oneof="pair_v2_spread_type::Kind", tags="1, 2")]
pub kind: ::core::option::Option<pair_v2_spread_type::Kind>,
}
pub mod pair_v2_spread_type {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag="1")]
Scaled(super::PairV2ScaledSpread),
#[prost(message, tag="2")]
Nav(super::PairV2NavSpread),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairV2ScaledSpread {
#[prost(double, tag="1")]
pub k: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairV2NavSpread {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairV2Nav {
#[prost(enumeration="super::common::EtfNavKind", tag="1")]
pub nav_kind: i32,
#[prost(int64, tag="2")]
pub basis: i64,
#[prost(bool, tag="3")]
pub dynamic_basis: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPairV2Request {
#[prost(string, tag="1")]
pub pair_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairV2sRequest {
#[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 ListPairV2sResponse {
#[prost(message, repeated, tag="1")]
pub pair_v2s: ::prost::alloc::vec::Vec<PairV2>,
#[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 CreatePairV2Request {
#[prost(message, optional, tag="1")]
pub pair_v2: ::core::option::Option<PairV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePairV2Request {
#[prost(message, optional, tag="1")]
pub pair_v2: ::core::option::Option<PairV2>,
#[prost(message, optional, tag="2")]
pub update_mask: ::core::option::Option<super::super::super::google::protobuf::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePairV2Request {
#[prost(string, tag="1")]
pub pair_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivatePairV2Request {
#[prost(string, tag="1")]
pub pair_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PausePairV2Request {
#[prost(string, tag="1")]
pub pair_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2ExecutionLog {
#[prost(int32, tag="1")]
pub pair_id: i32,
#[prost(enumeration="PairV2ExecutionOutcome", tag="2")]
pub outcome: i32,
#[prost(double, tag="3")]
pub spread: f64,
#[prost(double, tag="4")]
pub target_spread: f64,
#[prost(uint64, optional, tag="5")]
pub base_order_id: ::core::option::Option<u64>,
#[prost(uint64, optional, tag="6")]
pub counter_order_id: ::core::option::Option<u64>,
#[prost(int64, tag="7")]
pub base_price: i64,
#[prost(int64, tag="8")]
pub counter_price: i64,
#[prost(int64, tag="9")]
pub base_qty: i64,
#[prost(int64, tag="10")]
pub counter_qty: i64,
#[prost(int64, tag="11")]
pub trigger_to_base_submit_us: i64,
#[prost(int64, tag="12")]
pub trigger_to_counter_submit_us: i64,
#[prost(message, optional, tag="13")]
pub dispatched_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(string, optional, tag="14")]
pub detail: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairV2ExecutionLogsRequest {
#[prost(string, tag="1")]
pub pair_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(enumeration="PairV2ExecutionOutcome", tag="4")]
pub outcome: i32,
#[prost(message, optional, tag="5")]
pub dispatched_from: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag="6")]
pub dispatched_to: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairV2ExecutionLogsResponse {
#[prost(message, repeated, tag="1")]
pub execution_logs: ::prost::alloc::vec::Vec<PairV2ExecutionLog>,
#[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 StreamPairV2StatusRequest {
#[prost(string, tag="1")]
pub pair_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2StatusUpdate {
#[prost(string, tag="1")]
pub pair_v2: ::prost::alloc::string::String,
#[prost(enumeration="PairV2RuntimePhase", tag="2")]
pub phase: i32,
#[prost(message, optional, tag="3")]
pub updated_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairV2Status {
Unspecified = 0,
Active = 1,
Paused = 2,
Archived = 3,
}
impl PairV2Status {
pub fn as_str_name(&self) -> &'static str {
match self {
PairV2Status::Unspecified => "PAIR_V2_STATUS_UNSPECIFIED",
PairV2Status::Active => "PAIR_V2_STATUS_ACTIVE",
PairV2Status::Paused => "PAIR_V2_STATUS_PAUSED",
PairV2Status::Archived => "PAIR_V2_STATUS_ARCHIVED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PAIR_V2_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"PAIR_V2_STATUS_ACTIVE" => Some(Self::Active),
"PAIR_V2_STATUS_PAUSED" => Some(Self::Paused),
"PAIR_V2_STATUS_ARCHIVED" => Some(Self::Archived),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairV2RuntimePhase {
Unspecified = 0,
Idle = 1,
Tracking = 2,
Paused = 3,
}
impl PairV2RuntimePhase {
pub fn as_str_name(&self) -> &'static str {
match self {
PairV2RuntimePhase::Unspecified => "PAIR_V2_RUNTIME_PHASE_UNSPECIFIED",
PairV2RuntimePhase::Idle => "PAIR_V2_RUNTIME_PHASE_IDLE",
PairV2RuntimePhase::Tracking => "PAIR_V2_RUNTIME_PHASE_TRACKING",
PairV2RuntimePhase::Paused => "PAIR_V2_RUNTIME_PHASE_PAUSED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PAIR_V2_RUNTIME_PHASE_UNSPECIFIED" => Some(Self::Unspecified),
"PAIR_V2_RUNTIME_PHASE_IDLE" => Some(Self::Idle),
"PAIR_V2_RUNTIME_PHASE_TRACKING" => Some(Self::Tracking),
"PAIR_V2_RUNTIME_PHASE_PAUSED" => Some(Self::Paused),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairV2ExecutionOutcome {
Unspecified = 0,
Submitted = 1,
SkippedCooldown = 2,
SkippedMaxQuantity = 3,
SkippedPriceUnavailable = 4,
PartialFailure = 5,
Failed = 6,
}
impl PairV2ExecutionOutcome {
pub fn as_str_name(&self) -> &'static str {
match self {
PairV2ExecutionOutcome::Unspecified => "PAIR_V2_EXECUTION_OUTCOME_UNSPECIFIED",
PairV2ExecutionOutcome::Submitted => "PAIR_V2_EXECUTION_OUTCOME_SUBMITTED",
PairV2ExecutionOutcome::SkippedCooldown => "PAIR_V2_EXECUTION_OUTCOME_SKIPPED_COOLDOWN",
PairV2ExecutionOutcome::SkippedMaxQuantity => "PAIR_V2_EXECUTION_OUTCOME_SKIPPED_MAX_QUANTITY",
PairV2ExecutionOutcome::SkippedPriceUnavailable => "PAIR_V2_EXECUTION_OUTCOME_SKIPPED_PRICE_UNAVAILABLE",
PairV2ExecutionOutcome::PartialFailure => "PAIR_V2_EXECUTION_OUTCOME_PARTIAL_FAILURE",
PairV2ExecutionOutcome::Failed => "PAIR_V2_EXECUTION_OUTCOME_FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PAIR_V2_EXECUTION_OUTCOME_UNSPECIFIED" => Some(Self::Unspecified),
"PAIR_V2_EXECUTION_OUTCOME_SUBMITTED" => Some(Self::Submitted),
"PAIR_V2_EXECUTION_OUTCOME_SKIPPED_COOLDOWN" => Some(Self::SkippedCooldown),
"PAIR_V2_EXECUTION_OUTCOME_SKIPPED_MAX_QUANTITY" => Some(Self::SkippedMaxQuantity),
"PAIR_V2_EXECUTION_OUTCOME_SKIPPED_PRICE_UNAVAILABLE" => Some(Self::SkippedPriceUnavailable),
"PAIR_V2_EXECUTION_OUTCOME_PARTIAL_FAILURE" => Some(Self::PartialFailure),
"PAIR_V2_EXECUTION_OUTCOME_FAILED" => Some(Self::Failed),
_ => None,
}
}
}
include!("kdo.v1.pair_v2.tonic.rs");
include!("kdo.v1.pair_v2.serde.rs");