#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoPayloadType {
ProtoMessage = 5,
ErrorRes = 50,
HeartbeatEvent = 51,
}
impl ProtoPayloadType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::ProtoMessage => "PROTO_MESSAGE",
Self::ErrorRes => "ERROR_RES",
Self::HeartbeatEvent => "HEARTBEAT_EVENT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PROTO_MESSAGE" => Some(Self::ProtoMessage),
"ERROR_RES" => Some(Self::ErrorRes),
"HEARTBEAT_EVENT" => Some(Self::HeartbeatEvent),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoErrorCode {
UnknownError = 1,
UnsupportedMessage = 2,
InvalidRequest = 3,
TimeoutError = 5,
EntityNotFound = 6,
CantRouteRequest = 7,
FrameTooLong = 8,
MarketClosed = 9,
ConcurrentModification = 10,
BlockedPayloadType = 11,
}
impl ProtoErrorCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::UnknownError => "UNKNOWN_ERROR",
Self::UnsupportedMessage => "UNSUPPORTED_MESSAGE",
Self::InvalidRequest => "INVALID_REQUEST",
Self::TimeoutError => "TIMEOUT_ERROR",
Self::EntityNotFound => "ENTITY_NOT_FOUND",
Self::CantRouteRequest => "CANT_ROUTE_REQUEST",
Self::FrameTooLong => "FRAME_TOO_LONG",
Self::MarketClosed => "MARKET_CLOSED",
Self::ConcurrentModification => "CONCURRENT_MODIFICATION",
Self::BlockedPayloadType => "BLOCKED_PAYLOAD_TYPE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN_ERROR" => Some(Self::UnknownError),
"UNSUPPORTED_MESSAGE" => Some(Self::UnsupportedMessage),
"INVALID_REQUEST" => Some(Self::InvalidRequest),
"TIMEOUT_ERROR" => Some(Self::TimeoutError),
"ENTITY_NOT_FOUND" => Some(Self::EntityNotFound),
"CANT_ROUTE_REQUEST" => Some(Self::CantRouteRequest),
"FRAME_TOO_LONG" => Some(Self::FrameTooLong),
"MARKET_CLOSED" => Some(Self::MarketClosed),
"CONCURRENT_MODIFICATION" => Some(Self::ConcurrentModification),
"BLOCKED_PAYLOAD_TYPE" => Some(Self::BlockedPayloadType),
_ => None,
}
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoMessage {
#[prost(uint32, required, tag = "1")]
pub payload_type: u32,
#[prost(bytes = "vec", optional, tag = "2")]
pub payload: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
#[prost(string, optional, tag = "3")]
pub client_msg_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoErrorRes {
#[prost(enumeration = "ProtoPayloadType", optional, tag = "1", default = "ErrorRes")]
pub payload_type: ::core::option::Option<i32>,
#[prost(string, required, tag = "2")]
pub error_code: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint64, optional, tag = "4")]
pub maintenance_end_timestamp: ::core::option::Option<u64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoHeartbeatEvent {
#[prost(
enumeration = "ProtoPayloadType",
optional,
tag = "1",
default = "HeartbeatEvent"
)]
pub payload_type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaAsset {
#[prost(int64, required, tag = "1")]
pub asset_id: i64,
#[prost(string, required, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub display_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "4")]
pub digits: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaSymbol {
#[prost(int64, required, tag = "1")]
pub symbol_id: i64,
#[prost(int32, required, tag = "2")]
pub digits: i32,
#[prost(int32, required, tag = "3")]
pub pip_position: i32,
#[prost(bool, optional, tag = "4")]
pub enable_short_selling: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "5")]
pub guaranteed_stop_loss: ::core::option::Option<bool>,
#[prost(enumeration = "ProtoOaDayOfWeek", optional, tag = "6", default = "Monday")]
pub swap_rollover3_days: ::core::option::Option<i32>,
#[prost(double, optional, tag = "7")]
pub swap_long: ::core::option::Option<f64>,
#[prost(double, optional, tag = "8")]
pub swap_short: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "9")]
pub max_volume: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "10")]
pub min_volume: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "11")]
pub step_volume: ::core::option::Option<i64>,
#[prost(uint64, optional, tag = "12")]
pub max_exposure: ::core::option::Option<u64>,
#[prost(message, repeated, tag = "13")]
pub schedule: ::prost::alloc::vec::Vec<ProtoOaInterval>,
#[deprecated]
#[prost(int64, optional, tag = "14")]
pub commission: ::core::option::Option<i64>,
#[prost(
enumeration = "ProtoOaCommissionType",
optional,
tag = "15",
default = "UsdPerMillionUsd"
)]
pub commission_type: ::core::option::Option<i32>,
#[prost(uint32, optional, tag = "16")]
pub sl_distance: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "17")]
pub tp_distance: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "18")]
pub gsl_distance: ::core::option::Option<u32>,
#[prost(int64, optional, tag = "19")]
pub gsl_charge: ::core::option::Option<i64>,
#[prost(
enumeration = "ProtoOaSymbolDistanceType",
optional,
tag = "20",
default = "SymbolDistanceInPoints"
)]
pub distance_set_in: ::core::option::Option<i32>,
#[deprecated]
#[prost(int64, optional, tag = "21")]
pub min_commission: ::core::option::Option<i64>,
#[prost(
enumeration = "ProtoOaMinCommissionType",
optional,
tag = "22",
default = "Currency"
)]
pub min_commission_type: ::core::option::Option<i32>,
#[prost(string, optional, tag = "23", default = "USD")]
pub min_commission_asset: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "24")]
pub rollover_commission: ::core::option::Option<i64>,
#[prost(int32, optional, tag = "25")]
pub skip_rollover_days: ::core::option::Option<i32>,
#[prost(string, optional, tag = "26")]
pub schedule_time_zone: ::core::option::Option<::prost::alloc::string::String>,
#[prost(
enumeration = "ProtoOaTradingMode",
optional,
tag = "27",
default = "Enabled"
)]
pub trading_mode: ::core::option::Option<i32>,
#[prost(enumeration = "ProtoOaDayOfWeek", optional, tag = "28", default = "Monday")]
pub rollover_commission3_days: ::core::option::Option<i32>,
#[prost(
enumeration = "ProtoOaSwapCalculationType",
optional,
tag = "29",
default = "Pips"
)]
pub swap_calculation_type: ::core::option::Option<i32>,
#[prost(int64, optional, tag = "30")]
pub lot_size: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "31")]
pub precise_trading_commission_rate: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "32")]
pub precise_min_commission: ::core::option::Option<i64>,
#[prost(message, repeated, tag = "33")]
pub holiday: ::prost::alloc::vec::Vec<ProtoOaHoliday>,
#[prost(int32, optional, tag = "34")]
pub pnl_conversion_fee_rate: ::core::option::Option<i32>,
#[prost(int64, optional, tag = "35")]
pub leverage_id: ::core::option::Option<i64>,
#[prost(int32, optional, tag = "36")]
pub swap_period: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "37")]
pub swap_time: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "38")]
pub skip_swap_periods: ::core::option::Option<i32>,
#[prost(bool, optional, tag = "39")]
pub charge_swap_at_weekends: ::core::option::Option<bool>,
#[prost(string, optional, tag = "40")]
pub measurement_units: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaLightSymbol {
#[prost(int64, required, tag = "1")]
pub symbol_id: i64,
#[prost(string, optional, tag = "2")]
pub symbol_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "3")]
pub enabled: ::core::option::Option<bool>,
#[prost(int64, optional, tag = "4")]
pub base_asset_id: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "5")]
pub quote_asset_id: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "6")]
pub symbol_category_id: ::core::option::Option<i64>,
#[prost(string, optional, tag = "7")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(double, optional, tag = "8")]
pub sorting_number: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaArchivedSymbol {
#[prost(int64, required, tag = "1")]
pub symbol_id: i64,
#[prost(string, required, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(int64, required, tag = "3")]
pub utc_last_update_timestamp: i64,
#[prost(string, optional, tag = "4")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaSymbolCategory {
#[prost(int64, required, tag = "1")]
pub id: i64,
#[prost(int64, required, tag = "2")]
pub asset_class_id: i64,
#[prost(string, required, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(double, optional, tag = "4")]
pub sorting_number: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaInterval {
#[prost(uint32, required, tag = "3")]
pub start_second: u32,
#[prost(uint32, required, tag = "4")]
pub end_second: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaTrader {
#[prost(int64, required, tag = "1")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "2")]
pub balance: i64,
#[prost(int64, optional, tag = "3")]
pub balance_version: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "4")]
pub manager_bonus: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "5")]
pub ib_bonus: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "6")]
pub non_withdrawable_bonus: ::core::option::Option<i64>,
#[prost(
enumeration = "ProtoOaAccessRights",
optional,
tag = "7",
default = "FullAccess"
)]
pub access_rights: ::core::option::Option<i32>,
#[prost(int64, required, tag = "8")]
pub deposit_asset_id: i64,
#[prost(bool, optional, tag = "9")]
pub swap_free: ::core::option::Option<bool>,
#[prost(uint32, optional, tag = "10")]
pub leverage_in_cents: ::core::option::Option<u32>,
#[prost(enumeration = "ProtoOaTotalMarginCalculationType", optional, tag = "11")]
pub total_margin_calculation_type: ::core::option::Option<i32>,
#[prost(uint32, optional, tag = "12")]
pub max_leverage: ::core::option::Option<u32>,
#[deprecated]
#[prost(bool, optional, tag = "13")]
pub french_risk: ::core::option::Option<bool>,
#[prost(int64, optional, tag = "14")]
pub trader_login: ::core::option::Option<i64>,
#[prost(
enumeration = "ProtoOaAccountType",
optional,
tag = "15",
default = "Hedged"
)]
pub account_type: ::core::option::Option<i32>,
#[prost(string, optional, tag = "16")]
pub broker_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "17")]
pub registration_timestamp: ::core::option::Option<i64>,
#[prost(bool, optional, tag = "18")]
pub is_limited_risk: ::core::option::Option<bool>,
#[prost(
enumeration = "ProtoOaLimitedRiskMarginCalculationStrategy",
optional,
tag = "19",
default = "AccordingToLeverage"
)]
pub limited_risk_margin_calculation_strategy: ::core::option::Option<i32>,
#[prost(uint32, optional, tag = "20")]
pub money_digits: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "21")]
pub fair_stop_out: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaPosition {
#[prost(int64, required, tag = "1")]
pub position_id: i64,
#[prost(message, required, tag = "2")]
pub trade_data: ProtoOaTradeData,
#[prost(enumeration = "ProtoOaPositionStatus", required, tag = "3")]
pub position_status: i32,
#[prost(int64, required, tag = "4")]
pub swap: i64,
#[prost(double, optional, tag = "5")]
pub price: ::core::option::Option<f64>,
#[prost(double, optional, tag = "6")]
pub stop_loss: ::core::option::Option<f64>,
#[prost(double, optional, tag = "7")]
pub take_profit: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "8")]
pub utc_last_update_timestamp: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "9")]
pub commission: ::core::option::Option<i64>,
#[prost(double, optional, tag = "10")]
pub margin_rate: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "11")]
pub mirroring_commission: ::core::option::Option<i64>,
#[prost(bool, optional, tag = "12")]
pub guaranteed_stop_loss: ::core::option::Option<bool>,
#[prost(uint64, optional, tag = "13")]
pub used_margin: ::core::option::Option<u64>,
#[prost(
enumeration = "ProtoOaOrderTriggerMethod",
optional,
tag = "14",
default = "Trade"
)]
pub stop_loss_trigger_method: ::core::option::Option<i32>,
#[prost(uint32, optional, tag = "15")]
pub money_digits: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "16")]
pub trailing_stop_loss: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaTradeData {
#[prost(int64, required, tag = "1")]
pub symbol_id: i64,
#[prost(int64, required, tag = "2")]
pub volume: i64,
#[prost(enumeration = "ProtoOaTradeSide", required, tag = "3")]
pub trade_side: i32,
#[prost(int64, optional, tag = "4")]
pub open_timestamp: ::core::option::Option<i64>,
#[prost(string, optional, tag = "5")]
pub label: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "6")]
pub guaranteed_stop_loss: ::core::option::Option<bool>,
#[prost(string, optional, tag = "7")]
pub comment: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "8")]
pub measurement_units: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint64, optional, tag = "9")]
pub close_timestamp: ::core::option::Option<u64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaOrder {
#[prost(int64, required, tag = "1")]
pub order_id: i64,
#[prost(message, required, tag = "2")]
pub trade_data: ProtoOaTradeData,
#[prost(enumeration = "ProtoOaOrderType", required, tag = "3")]
pub order_type: i32,
#[prost(enumeration = "ProtoOaOrderStatus", required, tag = "4")]
pub order_status: i32,
#[prost(int64, optional, tag = "6")]
pub expiration_timestamp: ::core::option::Option<i64>,
#[prost(double, optional, tag = "7")]
pub execution_price: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "8")]
pub executed_volume: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "9")]
pub utc_last_update_timestamp: ::core::option::Option<i64>,
#[prost(double, optional, tag = "10")]
pub base_slippage_price: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "11")]
pub slippage_in_points: ::core::option::Option<i64>,
#[prost(bool, optional, tag = "12")]
pub closing_order: ::core::option::Option<bool>,
#[prost(double, optional, tag = "13")]
pub limit_price: ::core::option::Option<f64>,
#[prost(double, optional, tag = "14")]
pub stop_price: ::core::option::Option<f64>,
#[prost(double, optional, tag = "15")]
pub stop_loss: ::core::option::Option<f64>,
#[prost(double, optional, tag = "16")]
pub take_profit: ::core::option::Option<f64>,
#[prost(string, optional, tag = "17")]
pub client_order_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(
enumeration = "ProtoOaTimeInForce",
optional,
tag = "18",
default = "ImmediateOrCancel"
)]
pub time_in_force: ::core::option::Option<i32>,
#[prost(int64, optional, tag = "19")]
pub position_id: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "20")]
pub relative_stop_loss: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "21")]
pub relative_take_profit: ::core::option::Option<i64>,
#[prost(bool, optional, tag = "22")]
pub is_stop_out: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "23")]
pub trailing_stop_loss: ::core::option::Option<bool>,
#[prost(
enumeration = "ProtoOaOrderTriggerMethod",
optional,
tag = "24",
default = "Trade"
)]
pub stop_trigger_method: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaBonusDepositWithdraw {
#[prost(enumeration = "ProtoOaChangeBonusType", required, tag = "1")]
pub operation_type: i32,
#[prost(int64, required, tag = "2")]
pub bonus_history_id: i64,
#[prost(int64, required, tag = "3")]
pub manager_bonus: i64,
#[prost(int64, required, tag = "4")]
pub manager_delta: i64,
#[prost(int64, required, tag = "5")]
pub ib_bonus: i64,
#[prost(int64, required, tag = "6")]
pub ib_delta: i64,
#[prost(int64, required, tag = "7")]
pub change_bonus_timestamp: i64,
#[prost(string, optional, tag = "8")]
pub external_note: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "9")]
pub introducing_broker_id: ::core::option::Option<i64>,
#[prost(uint32, optional, tag = "10")]
pub money_digits: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaDepositWithdraw {
#[prost(enumeration = "ProtoOaChangeBalanceType", required, tag = "1")]
pub operation_type: i32,
#[prost(int64, required, tag = "2")]
pub balance_history_id: i64,
#[prost(int64, required, tag = "3")]
pub balance: i64,
#[prost(int64, required, tag = "4")]
pub delta: i64,
#[prost(int64, required, tag = "5")]
pub change_balance_timestamp: i64,
#[prost(string, optional, tag = "6")]
pub external_note: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "7")]
pub balance_version: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "8")]
pub equity: ::core::option::Option<i64>,
#[prost(uint32, optional, tag = "9")]
pub money_digits: ::core::option::Option<u32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaDeal {
#[prost(int64, required, tag = "1")]
pub deal_id: i64,
#[prost(int64, required, tag = "2")]
pub order_id: i64,
#[prost(int64, required, tag = "3")]
pub position_id: i64,
#[prost(int64, required, tag = "4")]
pub volume: i64,
#[prost(int64, required, tag = "5")]
pub filled_volume: i64,
#[prost(int64, required, tag = "6")]
pub symbol_id: i64,
#[prost(int64, required, tag = "7")]
pub create_timestamp: i64,
#[prost(int64, required, tag = "8")]
pub execution_timestamp: i64,
#[prost(int64, optional, tag = "9")]
pub utc_last_update_timestamp: ::core::option::Option<i64>,
#[prost(double, optional, tag = "10")]
pub execution_price: ::core::option::Option<f64>,
#[prost(enumeration = "ProtoOaTradeSide", required, tag = "11")]
pub trade_side: i32,
#[prost(enumeration = "ProtoOaDealStatus", required, tag = "12")]
pub deal_status: i32,
#[prost(double, optional, tag = "13")]
pub margin_rate: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "14")]
pub commission: ::core::option::Option<i64>,
#[prost(double, optional, tag = "15")]
pub base_to_usd_conversion_rate: ::core::option::Option<f64>,
#[prost(message, optional, tag = "16")]
pub close_position_detail: ::core::option::Option<ProtoOaClosePositionDetail>,
#[prost(uint32, optional, tag = "17")]
pub money_digits: ::core::option::Option<u32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaDealOffset {
#[prost(int64, required, tag = "1")]
pub deal_id: i64,
#[prost(int64, required, tag = "2")]
pub volume: i64,
#[prost(int64, optional, tag = "3")]
pub execution_timestamp: ::core::option::Option<i64>,
#[prost(double, optional, tag = "4")]
pub execution_price: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaClosePositionDetail {
#[prost(double, required, tag = "1")]
pub entry_price: f64,
#[prost(int64, required, tag = "2")]
pub gross_profit: i64,
#[prost(int64, required, tag = "3")]
pub swap: i64,
#[prost(int64, required, tag = "4")]
pub commission: i64,
#[prost(int64, required, tag = "5")]
pub balance: i64,
#[prost(double, optional, tag = "6")]
pub quote_to_deposit_conversion_rate: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "7")]
pub closed_volume: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "8")]
pub balance_version: ::core::option::Option<i64>,
#[prost(uint32, optional, tag = "9")]
pub money_digits: ::core::option::Option<u32>,
#[prost(int64, optional, tag = "10")]
pub pnl_conversion_fee: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaTrendbar {
#[prost(int64, required, tag = "3")]
pub volume: i64,
#[prost(enumeration = "ProtoOaTrendbarPeriod", optional, tag = "4", default = "M1")]
pub period: ::core::option::Option<i32>,
#[prost(int64, optional, tag = "5")]
pub low: ::core::option::Option<i64>,
#[prost(uint64, optional, tag = "6")]
pub delta_open: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "7")]
pub delta_close: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "8")]
pub delta_high: ::core::option::Option<u64>,
#[prost(uint32, optional, tag = "9")]
pub utc_timestamp_in_minutes: ::core::option::Option<u32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaExpectedMargin {
#[prost(int64, required, tag = "1")]
pub volume: i64,
#[prost(int64, required, tag = "2")]
pub buy_margin: i64,
#[prost(int64, required, tag = "3")]
pub sell_margin: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaTickData {
#[prost(int64, required, tag = "1")]
pub timestamp: i64,
#[prost(int64, required, tag = "2")]
pub tick: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaCtidProfile {
#[prost(int64, required, tag = "1")]
pub user_id: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaCtidTraderAccount {
#[prost(uint64, required, tag = "1")]
pub ctid_trader_account_id: u64,
#[prost(bool, optional, tag = "2")]
pub is_live: ::core::option::Option<bool>,
#[prost(int64, optional, tag = "3")]
pub trader_login: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "4")]
pub last_closing_deal_timestamp: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "5")]
pub last_balance_update_timestamp: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaAssetClass {
#[prost(int64, optional, tag = "1")]
pub id: ::core::option::Option<i64>,
#[prost(string, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(double, optional, tag = "3")]
pub sorting_number: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaDepthQuote {
#[prost(uint64, required, tag = "1")]
pub id: u64,
#[prost(uint64, required, tag = "3")]
pub size: u64,
#[prost(uint64, optional, tag = "4")]
pub bid: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "5")]
pub ask: ::core::option::Option<u64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaMarginCall {
#[prost(enumeration = "ProtoOaNotificationType", required, tag = "1")]
pub margin_call_type: i32,
#[prost(double, required, tag = "2")]
pub margin_level_threshold: f64,
#[prost(int64, optional, tag = "3")]
pub utc_last_update_timestamp: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaHoliday {
#[prost(int64, required, tag = "1")]
pub holiday_id: i64,
#[prost(string, required, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, required, tag = "4")]
pub schedule_time_zone: ::prost::alloc::string::String,
#[prost(int64, required, tag = "5")]
pub holiday_date: i64,
#[prost(bool, required, tag = "6")]
pub is_recurring: bool,
#[prost(int32, optional, tag = "7")]
pub start_second: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "8")]
pub end_second: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaDynamicLeverage {
#[prost(int64, required, tag = "1")]
pub leverage_id: i64,
#[prost(message, repeated, tag = "2")]
pub tiers: ::prost::alloc::vec::Vec<ProtoOaDynamicLeverageTier>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaDynamicLeverageTier {
#[prost(int64, required, tag = "1")]
pub volume: i64,
#[prost(int32, required, tag = "2")]
pub leverage: i32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaPositionUnrealizedPnL {
#[prost(int64, required, tag = "1")]
pub position_id: i64,
#[prost(int64, required, tag = "2")]
pub gross_unrealized_pn_l: i64,
#[prost(int64, required, tag = "3")]
pub net_unrealized_pn_l: i64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaPayloadType {
ProtoOaApplicationAuthReq = 2100,
ProtoOaApplicationAuthRes = 2101,
ProtoOaAccountAuthReq = 2102,
ProtoOaAccountAuthRes = 2103,
ProtoOaVersionReq = 2104,
ProtoOaVersionRes = 2105,
ProtoOaNewOrderReq = 2106,
ProtoOaTrailingSlChangedEvent = 2107,
ProtoOaCancelOrderReq = 2108,
ProtoOaAmendOrderReq = 2109,
ProtoOaAmendPositionSltpReq = 2110,
ProtoOaClosePositionReq = 2111,
ProtoOaAssetListReq = 2112,
ProtoOaAssetListRes = 2113,
ProtoOaSymbolsListReq = 2114,
ProtoOaSymbolsListRes = 2115,
ProtoOaSymbolByIdReq = 2116,
ProtoOaSymbolByIdRes = 2117,
ProtoOaSymbolsForConversionReq = 2118,
ProtoOaSymbolsForConversionRes = 2119,
ProtoOaSymbolChangedEvent = 2120,
ProtoOaTraderReq = 2121,
ProtoOaTraderRes = 2122,
ProtoOaTraderUpdateEvent = 2123,
ProtoOaReconcileReq = 2124,
ProtoOaReconcileRes = 2125,
ProtoOaExecutionEvent = 2126,
ProtoOaSubscribeSpotsReq = 2127,
ProtoOaSubscribeSpotsRes = 2128,
ProtoOaUnsubscribeSpotsReq = 2129,
ProtoOaUnsubscribeSpotsRes = 2130,
ProtoOaSpotEvent = 2131,
ProtoOaOrderErrorEvent = 2132,
ProtoOaDealListReq = 2133,
ProtoOaDealListRes = 2134,
ProtoOaSubscribeLiveTrendbarReq = 2135,
ProtoOaUnsubscribeLiveTrendbarReq = 2136,
ProtoOaGetTrendbarsReq = 2137,
ProtoOaGetTrendbarsRes = 2138,
ProtoOaExpectedMarginReq = 2139,
ProtoOaExpectedMarginRes = 2140,
ProtoOaMarginChangedEvent = 2141,
ProtoOaErrorRes = 2142,
ProtoOaCashFlowHistoryListReq = 2143,
ProtoOaCashFlowHistoryListRes = 2144,
ProtoOaGetTickdataReq = 2145,
ProtoOaGetTickdataRes = 2146,
ProtoOaAccountsTokenInvalidatedEvent = 2147,
ProtoOaClientDisconnectEvent = 2148,
ProtoOaGetAccountsByAccessTokenReq = 2149,
ProtoOaGetAccountsByAccessTokenRes = 2150,
ProtoOaGetCtidProfileByTokenReq = 2151,
ProtoOaGetCtidProfileByTokenRes = 2152,
ProtoOaAssetClassListReq = 2153,
ProtoOaAssetClassListRes = 2154,
ProtoOaDepthEvent = 2155,
ProtoOaSubscribeDepthQuotesReq = 2156,
ProtoOaSubscribeDepthQuotesRes = 2157,
ProtoOaUnsubscribeDepthQuotesReq = 2158,
ProtoOaUnsubscribeDepthQuotesRes = 2159,
ProtoOaSymbolCategoryReq = 2160,
ProtoOaSymbolCategoryRes = 2161,
ProtoOaAccountLogoutReq = 2162,
ProtoOaAccountLogoutRes = 2163,
ProtoOaAccountDisconnectEvent = 2164,
ProtoOaSubscribeLiveTrendbarRes = 2165,
ProtoOaUnsubscribeLiveTrendbarRes = 2166,
ProtoOaMarginCallListReq = 2167,
ProtoOaMarginCallListRes = 2168,
ProtoOaMarginCallUpdateReq = 2169,
ProtoOaMarginCallUpdateRes = 2170,
ProtoOaMarginCallUpdateEvent = 2171,
ProtoOaMarginCallTriggerEvent = 2172,
ProtoOaRefreshTokenReq = 2173,
ProtoOaRefreshTokenRes = 2174,
ProtoOaOrderListReq = 2175,
ProtoOaOrderListRes = 2176,
ProtoOaGetDynamicLeverageReq = 2177,
ProtoOaGetDynamicLeverageRes = 2178,
ProtoOaDealListByPositionIdReq = 2179,
ProtoOaDealListByPositionIdRes = 2180,
ProtoOaOrderDetailsReq = 2181,
ProtoOaOrderDetailsRes = 2182,
ProtoOaOrderListByPositionIdReq = 2183,
ProtoOaOrderListByPositionIdRes = 2184,
ProtoOaDealOffsetListReq = 2185,
ProtoOaDealOffsetListRes = 2186,
ProtoOaGetPositionUnrealizedPnlReq = 2187,
ProtoOaGetPositionUnrealizedPnlRes = 2188,
}
impl ProtoOaPayloadType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::ProtoOaApplicationAuthReq => "PROTO_OA_APPLICATION_AUTH_REQ",
Self::ProtoOaApplicationAuthRes => "PROTO_OA_APPLICATION_AUTH_RES",
Self::ProtoOaAccountAuthReq => "PROTO_OA_ACCOUNT_AUTH_REQ",
Self::ProtoOaAccountAuthRes => "PROTO_OA_ACCOUNT_AUTH_RES",
Self::ProtoOaVersionReq => "PROTO_OA_VERSION_REQ",
Self::ProtoOaVersionRes => "PROTO_OA_VERSION_RES",
Self::ProtoOaNewOrderReq => "PROTO_OA_NEW_ORDER_REQ",
Self::ProtoOaTrailingSlChangedEvent => "PROTO_OA_TRAILING_SL_CHANGED_EVENT",
Self::ProtoOaCancelOrderReq => "PROTO_OA_CANCEL_ORDER_REQ",
Self::ProtoOaAmendOrderReq => "PROTO_OA_AMEND_ORDER_REQ",
Self::ProtoOaAmendPositionSltpReq => "PROTO_OA_AMEND_POSITION_SLTP_REQ",
Self::ProtoOaClosePositionReq => "PROTO_OA_CLOSE_POSITION_REQ",
Self::ProtoOaAssetListReq => "PROTO_OA_ASSET_LIST_REQ",
Self::ProtoOaAssetListRes => "PROTO_OA_ASSET_LIST_RES",
Self::ProtoOaSymbolsListReq => "PROTO_OA_SYMBOLS_LIST_REQ",
Self::ProtoOaSymbolsListRes => "PROTO_OA_SYMBOLS_LIST_RES",
Self::ProtoOaSymbolByIdReq => "PROTO_OA_SYMBOL_BY_ID_REQ",
Self::ProtoOaSymbolByIdRes => "PROTO_OA_SYMBOL_BY_ID_RES",
Self::ProtoOaSymbolsForConversionReq => "PROTO_OA_SYMBOLS_FOR_CONVERSION_REQ",
Self::ProtoOaSymbolsForConversionRes => "PROTO_OA_SYMBOLS_FOR_CONVERSION_RES",
Self::ProtoOaSymbolChangedEvent => "PROTO_OA_SYMBOL_CHANGED_EVENT",
Self::ProtoOaTraderReq => "PROTO_OA_TRADER_REQ",
Self::ProtoOaTraderRes => "PROTO_OA_TRADER_RES",
Self::ProtoOaTraderUpdateEvent => "PROTO_OA_TRADER_UPDATE_EVENT",
Self::ProtoOaReconcileReq => "PROTO_OA_RECONCILE_REQ",
Self::ProtoOaReconcileRes => "PROTO_OA_RECONCILE_RES",
Self::ProtoOaExecutionEvent => "PROTO_OA_EXECUTION_EVENT",
Self::ProtoOaSubscribeSpotsReq => "PROTO_OA_SUBSCRIBE_SPOTS_REQ",
Self::ProtoOaSubscribeSpotsRes => "PROTO_OA_SUBSCRIBE_SPOTS_RES",
Self::ProtoOaUnsubscribeSpotsReq => "PROTO_OA_UNSUBSCRIBE_SPOTS_REQ",
Self::ProtoOaUnsubscribeSpotsRes => "PROTO_OA_UNSUBSCRIBE_SPOTS_RES",
Self::ProtoOaSpotEvent => "PROTO_OA_SPOT_EVENT",
Self::ProtoOaOrderErrorEvent => "PROTO_OA_ORDER_ERROR_EVENT",
Self::ProtoOaDealListReq => "PROTO_OA_DEAL_LIST_REQ",
Self::ProtoOaDealListRes => "PROTO_OA_DEAL_LIST_RES",
Self::ProtoOaSubscribeLiveTrendbarReq => {
"PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_REQ"
}
Self::ProtoOaUnsubscribeLiveTrendbarReq => {
"PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_REQ"
}
Self::ProtoOaGetTrendbarsReq => "PROTO_OA_GET_TRENDBARS_REQ",
Self::ProtoOaGetTrendbarsRes => "PROTO_OA_GET_TRENDBARS_RES",
Self::ProtoOaExpectedMarginReq => "PROTO_OA_EXPECTED_MARGIN_REQ",
Self::ProtoOaExpectedMarginRes => "PROTO_OA_EXPECTED_MARGIN_RES",
Self::ProtoOaMarginChangedEvent => "PROTO_OA_MARGIN_CHANGED_EVENT",
Self::ProtoOaErrorRes => "PROTO_OA_ERROR_RES",
Self::ProtoOaCashFlowHistoryListReq => "PROTO_OA_CASH_FLOW_HISTORY_LIST_REQ",
Self::ProtoOaCashFlowHistoryListRes => "PROTO_OA_CASH_FLOW_HISTORY_LIST_RES",
Self::ProtoOaGetTickdataReq => "PROTO_OA_GET_TICKDATA_REQ",
Self::ProtoOaGetTickdataRes => "PROTO_OA_GET_TICKDATA_RES",
Self::ProtoOaAccountsTokenInvalidatedEvent => {
"PROTO_OA_ACCOUNTS_TOKEN_INVALIDATED_EVENT"
}
Self::ProtoOaClientDisconnectEvent => "PROTO_OA_CLIENT_DISCONNECT_EVENT",
Self::ProtoOaGetAccountsByAccessTokenReq => {
"PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_REQ"
}
Self::ProtoOaGetAccountsByAccessTokenRes => {
"PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_RES"
}
Self::ProtoOaGetCtidProfileByTokenReq => {
"PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_REQ"
}
Self::ProtoOaGetCtidProfileByTokenRes => {
"PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_RES"
}
Self::ProtoOaAssetClassListReq => "PROTO_OA_ASSET_CLASS_LIST_REQ",
Self::ProtoOaAssetClassListRes => "PROTO_OA_ASSET_CLASS_LIST_RES",
Self::ProtoOaDepthEvent => "PROTO_OA_DEPTH_EVENT",
Self::ProtoOaSubscribeDepthQuotesReq => "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_REQ",
Self::ProtoOaSubscribeDepthQuotesRes => "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_RES",
Self::ProtoOaUnsubscribeDepthQuotesReq => {
"PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_REQ"
}
Self::ProtoOaUnsubscribeDepthQuotesRes => {
"PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_RES"
}
Self::ProtoOaSymbolCategoryReq => "PROTO_OA_SYMBOL_CATEGORY_REQ",
Self::ProtoOaSymbolCategoryRes => "PROTO_OA_SYMBOL_CATEGORY_RES",
Self::ProtoOaAccountLogoutReq => "PROTO_OA_ACCOUNT_LOGOUT_REQ",
Self::ProtoOaAccountLogoutRes => "PROTO_OA_ACCOUNT_LOGOUT_RES",
Self::ProtoOaAccountDisconnectEvent => "PROTO_OA_ACCOUNT_DISCONNECT_EVENT",
Self::ProtoOaSubscribeLiveTrendbarRes => {
"PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_RES"
}
Self::ProtoOaUnsubscribeLiveTrendbarRes => {
"PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_RES"
}
Self::ProtoOaMarginCallListReq => "PROTO_OA_MARGIN_CALL_LIST_REQ",
Self::ProtoOaMarginCallListRes => "PROTO_OA_MARGIN_CALL_LIST_RES",
Self::ProtoOaMarginCallUpdateReq => "PROTO_OA_MARGIN_CALL_UPDATE_REQ",
Self::ProtoOaMarginCallUpdateRes => "PROTO_OA_MARGIN_CALL_UPDATE_RES",
Self::ProtoOaMarginCallUpdateEvent => "PROTO_OA_MARGIN_CALL_UPDATE_EVENT",
Self::ProtoOaMarginCallTriggerEvent => "PROTO_OA_MARGIN_CALL_TRIGGER_EVENT",
Self::ProtoOaRefreshTokenReq => "PROTO_OA_REFRESH_TOKEN_REQ",
Self::ProtoOaRefreshTokenRes => "PROTO_OA_REFRESH_TOKEN_RES",
Self::ProtoOaOrderListReq => "PROTO_OA_ORDER_LIST_REQ",
Self::ProtoOaOrderListRes => "PROTO_OA_ORDER_LIST_RES",
Self::ProtoOaGetDynamicLeverageReq => "PROTO_OA_GET_DYNAMIC_LEVERAGE_REQ",
Self::ProtoOaGetDynamicLeverageRes => "PROTO_OA_GET_DYNAMIC_LEVERAGE_RES",
Self::ProtoOaDealListByPositionIdReq => {
"PROTO_OA_DEAL_LIST_BY_POSITION_ID_REQ"
}
Self::ProtoOaDealListByPositionIdRes => {
"PROTO_OA_DEAL_LIST_BY_POSITION_ID_RES"
}
Self::ProtoOaOrderDetailsReq => "PROTO_OA_ORDER_DETAILS_REQ",
Self::ProtoOaOrderDetailsRes => "PROTO_OA_ORDER_DETAILS_RES",
Self::ProtoOaOrderListByPositionIdReq => {
"PROTO_OA_ORDER_LIST_BY_POSITION_ID_REQ"
}
Self::ProtoOaOrderListByPositionIdRes => {
"PROTO_OA_ORDER_LIST_BY_POSITION_ID_RES"
}
Self::ProtoOaDealOffsetListReq => "PROTO_OA_DEAL_OFFSET_LIST_REQ",
Self::ProtoOaDealOffsetListRes => "PROTO_OA_DEAL_OFFSET_LIST_RES",
Self::ProtoOaGetPositionUnrealizedPnlReq => {
"PROTO_OA_GET_POSITION_UNREALIZED_PNL_REQ"
}
Self::ProtoOaGetPositionUnrealizedPnlRes => {
"PROTO_OA_GET_POSITION_UNREALIZED_PNL_RES"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PROTO_OA_APPLICATION_AUTH_REQ" => Some(Self::ProtoOaApplicationAuthReq),
"PROTO_OA_APPLICATION_AUTH_RES" => Some(Self::ProtoOaApplicationAuthRes),
"PROTO_OA_ACCOUNT_AUTH_REQ" => Some(Self::ProtoOaAccountAuthReq),
"PROTO_OA_ACCOUNT_AUTH_RES" => Some(Self::ProtoOaAccountAuthRes),
"PROTO_OA_VERSION_REQ" => Some(Self::ProtoOaVersionReq),
"PROTO_OA_VERSION_RES" => Some(Self::ProtoOaVersionRes),
"PROTO_OA_NEW_ORDER_REQ" => Some(Self::ProtoOaNewOrderReq),
"PROTO_OA_TRAILING_SL_CHANGED_EVENT" => {
Some(Self::ProtoOaTrailingSlChangedEvent)
}
"PROTO_OA_CANCEL_ORDER_REQ" => Some(Self::ProtoOaCancelOrderReq),
"PROTO_OA_AMEND_ORDER_REQ" => Some(Self::ProtoOaAmendOrderReq),
"PROTO_OA_AMEND_POSITION_SLTP_REQ" => Some(Self::ProtoOaAmendPositionSltpReq),
"PROTO_OA_CLOSE_POSITION_REQ" => Some(Self::ProtoOaClosePositionReq),
"PROTO_OA_ASSET_LIST_REQ" => Some(Self::ProtoOaAssetListReq),
"PROTO_OA_ASSET_LIST_RES" => Some(Self::ProtoOaAssetListRes),
"PROTO_OA_SYMBOLS_LIST_REQ" => Some(Self::ProtoOaSymbolsListReq),
"PROTO_OA_SYMBOLS_LIST_RES" => Some(Self::ProtoOaSymbolsListRes),
"PROTO_OA_SYMBOL_BY_ID_REQ" => Some(Self::ProtoOaSymbolByIdReq),
"PROTO_OA_SYMBOL_BY_ID_RES" => Some(Self::ProtoOaSymbolByIdRes),
"PROTO_OA_SYMBOLS_FOR_CONVERSION_REQ" => {
Some(Self::ProtoOaSymbolsForConversionReq)
}
"PROTO_OA_SYMBOLS_FOR_CONVERSION_RES" => {
Some(Self::ProtoOaSymbolsForConversionRes)
}
"PROTO_OA_SYMBOL_CHANGED_EVENT" => Some(Self::ProtoOaSymbolChangedEvent),
"PROTO_OA_TRADER_REQ" => Some(Self::ProtoOaTraderReq),
"PROTO_OA_TRADER_RES" => Some(Self::ProtoOaTraderRes),
"PROTO_OA_TRADER_UPDATE_EVENT" => Some(Self::ProtoOaTraderUpdateEvent),
"PROTO_OA_RECONCILE_REQ" => Some(Self::ProtoOaReconcileReq),
"PROTO_OA_RECONCILE_RES" => Some(Self::ProtoOaReconcileRes),
"PROTO_OA_EXECUTION_EVENT" => Some(Self::ProtoOaExecutionEvent),
"PROTO_OA_SUBSCRIBE_SPOTS_REQ" => Some(Self::ProtoOaSubscribeSpotsReq),
"PROTO_OA_SUBSCRIBE_SPOTS_RES" => Some(Self::ProtoOaSubscribeSpotsRes),
"PROTO_OA_UNSUBSCRIBE_SPOTS_REQ" => Some(Self::ProtoOaUnsubscribeSpotsReq),
"PROTO_OA_UNSUBSCRIBE_SPOTS_RES" => Some(Self::ProtoOaUnsubscribeSpotsRes),
"PROTO_OA_SPOT_EVENT" => Some(Self::ProtoOaSpotEvent),
"PROTO_OA_ORDER_ERROR_EVENT" => Some(Self::ProtoOaOrderErrorEvent),
"PROTO_OA_DEAL_LIST_REQ" => Some(Self::ProtoOaDealListReq),
"PROTO_OA_DEAL_LIST_RES" => Some(Self::ProtoOaDealListRes),
"PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_REQ" => {
Some(Self::ProtoOaSubscribeLiveTrendbarReq)
}
"PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_REQ" => {
Some(Self::ProtoOaUnsubscribeLiveTrendbarReq)
}
"PROTO_OA_GET_TRENDBARS_REQ" => Some(Self::ProtoOaGetTrendbarsReq),
"PROTO_OA_GET_TRENDBARS_RES" => Some(Self::ProtoOaGetTrendbarsRes),
"PROTO_OA_EXPECTED_MARGIN_REQ" => Some(Self::ProtoOaExpectedMarginReq),
"PROTO_OA_EXPECTED_MARGIN_RES" => Some(Self::ProtoOaExpectedMarginRes),
"PROTO_OA_MARGIN_CHANGED_EVENT" => Some(Self::ProtoOaMarginChangedEvent),
"PROTO_OA_ERROR_RES" => Some(Self::ProtoOaErrorRes),
"PROTO_OA_CASH_FLOW_HISTORY_LIST_REQ" => {
Some(Self::ProtoOaCashFlowHistoryListReq)
}
"PROTO_OA_CASH_FLOW_HISTORY_LIST_RES" => {
Some(Self::ProtoOaCashFlowHistoryListRes)
}
"PROTO_OA_GET_TICKDATA_REQ" => Some(Self::ProtoOaGetTickdataReq),
"PROTO_OA_GET_TICKDATA_RES" => Some(Self::ProtoOaGetTickdataRes),
"PROTO_OA_ACCOUNTS_TOKEN_INVALIDATED_EVENT" => {
Some(Self::ProtoOaAccountsTokenInvalidatedEvent)
}
"PROTO_OA_CLIENT_DISCONNECT_EVENT" => {
Some(Self::ProtoOaClientDisconnectEvent)
}
"PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_REQ" => {
Some(Self::ProtoOaGetAccountsByAccessTokenReq)
}
"PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_RES" => {
Some(Self::ProtoOaGetAccountsByAccessTokenRes)
}
"PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_REQ" => {
Some(Self::ProtoOaGetCtidProfileByTokenReq)
}
"PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_RES" => {
Some(Self::ProtoOaGetCtidProfileByTokenRes)
}
"PROTO_OA_ASSET_CLASS_LIST_REQ" => Some(Self::ProtoOaAssetClassListReq),
"PROTO_OA_ASSET_CLASS_LIST_RES" => Some(Self::ProtoOaAssetClassListRes),
"PROTO_OA_DEPTH_EVENT" => Some(Self::ProtoOaDepthEvent),
"PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_REQ" => {
Some(Self::ProtoOaSubscribeDepthQuotesReq)
}
"PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_RES" => {
Some(Self::ProtoOaSubscribeDepthQuotesRes)
}
"PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_REQ" => {
Some(Self::ProtoOaUnsubscribeDepthQuotesReq)
}
"PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_RES" => {
Some(Self::ProtoOaUnsubscribeDepthQuotesRes)
}
"PROTO_OA_SYMBOL_CATEGORY_REQ" => Some(Self::ProtoOaSymbolCategoryReq),
"PROTO_OA_SYMBOL_CATEGORY_RES" => Some(Self::ProtoOaSymbolCategoryRes),
"PROTO_OA_ACCOUNT_LOGOUT_REQ" => Some(Self::ProtoOaAccountLogoutReq),
"PROTO_OA_ACCOUNT_LOGOUT_RES" => Some(Self::ProtoOaAccountLogoutRes),
"PROTO_OA_ACCOUNT_DISCONNECT_EVENT" => {
Some(Self::ProtoOaAccountDisconnectEvent)
}
"PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_RES" => {
Some(Self::ProtoOaSubscribeLiveTrendbarRes)
}
"PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_RES" => {
Some(Self::ProtoOaUnsubscribeLiveTrendbarRes)
}
"PROTO_OA_MARGIN_CALL_LIST_REQ" => Some(Self::ProtoOaMarginCallListReq),
"PROTO_OA_MARGIN_CALL_LIST_RES" => Some(Self::ProtoOaMarginCallListRes),
"PROTO_OA_MARGIN_CALL_UPDATE_REQ" => Some(Self::ProtoOaMarginCallUpdateReq),
"PROTO_OA_MARGIN_CALL_UPDATE_RES" => Some(Self::ProtoOaMarginCallUpdateRes),
"PROTO_OA_MARGIN_CALL_UPDATE_EVENT" => {
Some(Self::ProtoOaMarginCallUpdateEvent)
}
"PROTO_OA_MARGIN_CALL_TRIGGER_EVENT" => {
Some(Self::ProtoOaMarginCallTriggerEvent)
}
"PROTO_OA_REFRESH_TOKEN_REQ" => Some(Self::ProtoOaRefreshTokenReq),
"PROTO_OA_REFRESH_TOKEN_RES" => Some(Self::ProtoOaRefreshTokenRes),
"PROTO_OA_ORDER_LIST_REQ" => Some(Self::ProtoOaOrderListReq),
"PROTO_OA_ORDER_LIST_RES" => Some(Self::ProtoOaOrderListRes),
"PROTO_OA_GET_DYNAMIC_LEVERAGE_REQ" => {
Some(Self::ProtoOaGetDynamicLeverageReq)
}
"PROTO_OA_GET_DYNAMIC_LEVERAGE_RES" => {
Some(Self::ProtoOaGetDynamicLeverageRes)
}
"PROTO_OA_DEAL_LIST_BY_POSITION_ID_REQ" => {
Some(Self::ProtoOaDealListByPositionIdReq)
}
"PROTO_OA_DEAL_LIST_BY_POSITION_ID_RES" => {
Some(Self::ProtoOaDealListByPositionIdRes)
}
"PROTO_OA_ORDER_DETAILS_REQ" => Some(Self::ProtoOaOrderDetailsReq),
"PROTO_OA_ORDER_DETAILS_RES" => Some(Self::ProtoOaOrderDetailsRes),
"PROTO_OA_ORDER_LIST_BY_POSITION_ID_REQ" => {
Some(Self::ProtoOaOrderListByPositionIdReq)
}
"PROTO_OA_ORDER_LIST_BY_POSITION_ID_RES" => {
Some(Self::ProtoOaOrderListByPositionIdRes)
}
"PROTO_OA_DEAL_OFFSET_LIST_REQ" => Some(Self::ProtoOaDealOffsetListReq),
"PROTO_OA_DEAL_OFFSET_LIST_RES" => Some(Self::ProtoOaDealOffsetListRes),
"PROTO_OA_GET_POSITION_UNREALIZED_PNL_REQ" => {
Some(Self::ProtoOaGetPositionUnrealizedPnlReq)
}
"PROTO_OA_GET_POSITION_UNREALIZED_PNL_RES" => {
Some(Self::ProtoOaGetPositionUnrealizedPnlRes)
}
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaDayOfWeek {
None = 0,
Monday = 1,
Tuesday = 2,
Wednesday = 3,
Thursday = 4,
Friday = 5,
Saturday = 6,
Sunday = 7,
}
impl ProtoOaDayOfWeek {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::None => "NONE",
Self::Monday => "MONDAY",
Self::Tuesday => "TUESDAY",
Self::Wednesday => "WEDNESDAY",
Self::Thursday => "THURSDAY",
Self::Friday => "FRIDAY",
Self::Saturday => "SATURDAY",
Self::Sunday => "SUNDAY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NONE" => Some(Self::None),
"MONDAY" => Some(Self::Monday),
"TUESDAY" => Some(Self::Tuesday),
"WEDNESDAY" => Some(Self::Wednesday),
"THURSDAY" => Some(Self::Thursday),
"FRIDAY" => Some(Self::Friday),
"SATURDAY" => Some(Self::Saturday),
"SUNDAY" => Some(Self::Sunday),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaCommissionType {
UsdPerMillionUsd = 1,
UsdPerLot = 2,
PercentageOfValue = 3,
QuoteCcyPerLot = 4,
}
impl ProtoOaCommissionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::UsdPerMillionUsd => "USD_PER_MILLION_USD",
Self::UsdPerLot => "USD_PER_LOT",
Self::PercentageOfValue => "PERCENTAGE_OF_VALUE",
Self::QuoteCcyPerLot => "QUOTE_CCY_PER_LOT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"USD_PER_MILLION_USD" => Some(Self::UsdPerMillionUsd),
"USD_PER_LOT" => Some(Self::UsdPerLot),
"PERCENTAGE_OF_VALUE" => Some(Self::PercentageOfValue),
"QUOTE_CCY_PER_LOT" => Some(Self::QuoteCcyPerLot),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaSymbolDistanceType {
SymbolDistanceInPoints = 1,
SymbolDistanceInPercentage = 2,
}
impl ProtoOaSymbolDistanceType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::SymbolDistanceInPoints => "SYMBOL_DISTANCE_IN_POINTS",
Self::SymbolDistanceInPercentage => "SYMBOL_DISTANCE_IN_PERCENTAGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SYMBOL_DISTANCE_IN_POINTS" => Some(Self::SymbolDistanceInPoints),
"SYMBOL_DISTANCE_IN_PERCENTAGE" => Some(Self::SymbolDistanceInPercentage),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaMinCommissionType {
Currency = 1,
QuoteCurrency = 2,
}
impl ProtoOaMinCommissionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Currency => "CURRENCY",
Self::QuoteCurrency => "QUOTE_CURRENCY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CURRENCY" => Some(Self::Currency),
"QUOTE_CURRENCY" => Some(Self::QuoteCurrency),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaTradingMode {
Enabled = 0,
DisabledWithoutPendingsExecution = 1,
DisabledWithPendingsExecution = 2,
CloseOnlyMode = 3,
}
impl ProtoOaTradingMode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Enabled => "ENABLED",
Self::DisabledWithoutPendingsExecution => {
"DISABLED_WITHOUT_PENDINGS_EXECUTION"
}
Self::DisabledWithPendingsExecution => "DISABLED_WITH_PENDINGS_EXECUTION",
Self::CloseOnlyMode => "CLOSE_ONLY_MODE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENABLED" => Some(Self::Enabled),
"DISABLED_WITHOUT_PENDINGS_EXECUTION" => {
Some(Self::DisabledWithoutPendingsExecution)
}
"DISABLED_WITH_PENDINGS_EXECUTION" => {
Some(Self::DisabledWithPendingsExecution)
}
"CLOSE_ONLY_MODE" => Some(Self::CloseOnlyMode),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaSwapCalculationType {
Pips = 0,
Percentage = 1,
}
impl ProtoOaSwapCalculationType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Pips => "PIPS",
Self::Percentage => "PERCENTAGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PIPS" => Some(Self::Pips),
"PERCENTAGE" => Some(Self::Percentage),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaAccessRights {
FullAccess = 0,
CloseOnly = 1,
NoTrading = 2,
NoLogin = 3,
}
impl ProtoOaAccessRights {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::FullAccess => "FULL_ACCESS",
Self::CloseOnly => "CLOSE_ONLY",
Self::NoTrading => "NO_TRADING",
Self::NoLogin => "NO_LOGIN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FULL_ACCESS" => Some(Self::FullAccess),
"CLOSE_ONLY" => Some(Self::CloseOnly),
"NO_TRADING" => Some(Self::NoTrading),
"NO_LOGIN" => Some(Self::NoLogin),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaTotalMarginCalculationType {
Max = 0,
Sum = 1,
Net = 2,
}
impl ProtoOaTotalMarginCalculationType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Max => "MAX",
Self::Sum => "SUM",
Self::Net => "NET",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MAX" => Some(Self::Max),
"SUM" => Some(Self::Sum),
"NET" => Some(Self::Net),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaAccountType {
Hedged = 0,
Netted = 1,
SpreadBetting = 2,
}
impl ProtoOaAccountType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Hedged => "HEDGED",
Self::Netted => "NETTED",
Self::SpreadBetting => "SPREAD_BETTING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HEDGED" => Some(Self::Hedged),
"NETTED" => Some(Self::Netted),
"SPREAD_BETTING" => Some(Self::SpreadBetting),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaPositionStatus {
PositionStatusOpen = 1,
PositionStatusClosed = 2,
PositionStatusCreated = 3,
PositionStatusError = 4,
}
impl ProtoOaPositionStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::PositionStatusOpen => "POSITION_STATUS_OPEN",
Self::PositionStatusClosed => "POSITION_STATUS_CLOSED",
Self::PositionStatusCreated => "POSITION_STATUS_CREATED",
Self::PositionStatusError => "POSITION_STATUS_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"POSITION_STATUS_OPEN" => Some(Self::PositionStatusOpen),
"POSITION_STATUS_CLOSED" => Some(Self::PositionStatusClosed),
"POSITION_STATUS_CREATED" => Some(Self::PositionStatusCreated),
"POSITION_STATUS_ERROR" => Some(Self::PositionStatusError),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaTradeSide {
Buy = 1,
Sell = 2,
}
impl ProtoOaTradeSide {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Buy => "BUY",
Self::Sell => "SELL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BUY" => Some(Self::Buy),
"SELL" => Some(Self::Sell),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaOrderType {
Market = 1,
Limit = 2,
Stop = 3,
StopLossTakeProfit = 4,
MarketRange = 5,
StopLimit = 6,
}
impl ProtoOaOrderType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Market => "MARKET",
Self::Limit => "LIMIT",
Self::Stop => "STOP",
Self::StopLossTakeProfit => "STOP_LOSS_TAKE_PROFIT",
Self::MarketRange => "MARKET_RANGE",
Self::StopLimit => "STOP_LIMIT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MARKET" => Some(Self::Market),
"LIMIT" => Some(Self::Limit),
"STOP" => Some(Self::Stop),
"STOP_LOSS_TAKE_PROFIT" => Some(Self::StopLossTakeProfit),
"MARKET_RANGE" => Some(Self::MarketRange),
"STOP_LIMIT" => Some(Self::StopLimit),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaTimeInForce {
GoodTillDate = 1,
GoodTillCancel = 2,
ImmediateOrCancel = 3,
FillOrKill = 4,
MarketOnOpen = 5,
}
impl ProtoOaTimeInForce {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::GoodTillDate => "GOOD_TILL_DATE",
Self::GoodTillCancel => "GOOD_TILL_CANCEL",
Self::ImmediateOrCancel => "IMMEDIATE_OR_CANCEL",
Self::FillOrKill => "FILL_OR_KILL",
Self::MarketOnOpen => "MARKET_ON_OPEN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GOOD_TILL_DATE" => Some(Self::GoodTillDate),
"GOOD_TILL_CANCEL" => Some(Self::GoodTillCancel),
"IMMEDIATE_OR_CANCEL" => Some(Self::ImmediateOrCancel),
"FILL_OR_KILL" => Some(Self::FillOrKill),
"MARKET_ON_OPEN" => Some(Self::MarketOnOpen),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaOrderStatus {
OrderStatusAccepted = 1,
OrderStatusFilled = 2,
OrderStatusRejected = 3,
OrderStatusExpired = 4,
OrderStatusCancelled = 5,
}
impl ProtoOaOrderStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::OrderStatusAccepted => "ORDER_STATUS_ACCEPTED",
Self::OrderStatusFilled => "ORDER_STATUS_FILLED",
Self::OrderStatusRejected => "ORDER_STATUS_REJECTED",
Self::OrderStatusExpired => "ORDER_STATUS_EXPIRED",
Self::OrderStatusCancelled => "ORDER_STATUS_CANCELLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_STATUS_ACCEPTED" => Some(Self::OrderStatusAccepted),
"ORDER_STATUS_FILLED" => Some(Self::OrderStatusFilled),
"ORDER_STATUS_REJECTED" => Some(Self::OrderStatusRejected),
"ORDER_STATUS_EXPIRED" => Some(Self::OrderStatusExpired),
"ORDER_STATUS_CANCELLED" => Some(Self::OrderStatusCancelled),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaOrderTriggerMethod {
Trade = 1,
Opposite = 2,
DoubleTrade = 3,
DoubleOpposite = 4,
}
impl ProtoOaOrderTriggerMethod {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Trade => "TRADE",
Self::Opposite => "OPPOSITE",
Self::DoubleTrade => "DOUBLE_TRADE",
Self::DoubleOpposite => "DOUBLE_OPPOSITE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRADE" => Some(Self::Trade),
"OPPOSITE" => Some(Self::Opposite),
"DOUBLE_TRADE" => Some(Self::DoubleTrade),
"DOUBLE_OPPOSITE" => Some(Self::DoubleOpposite),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaExecutionType {
OrderAccepted = 2,
OrderFilled = 3,
OrderReplaced = 4,
OrderCancelled = 5,
OrderExpired = 6,
OrderRejected = 7,
OrderCancelRejected = 8,
Swap = 9,
DepositWithdraw = 10,
OrderPartialFill = 11,
BonusDepositWithdraw = 12,
}
impl ProtoOaExecutionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::OrderAccepted => "ORDER_ACCEPTED",
Self::OrderFilled => "ORDER_FILLED",
Self::OrderReplaced => "ORDER_REPLACED",
Self::OrderCancelled => "ORDER_CANCELLED",
Self::OrderExpired => "ORDER_EXPIRED",
Self::OrderRejected => "ORDER_REJECTED",
Self::OrderCancelRejected => "ORDER_CANCEL_REJECTED",
Self::Swap => "SWAP",
Self::DepositWithdraw => "DEPOSIT_WITHDRAW",
Self::OrderPartialFill => "ORDER_PARTIAL_FILL",
Self::BonusDepositWithdraw => "BONUS_DEPOSIT_WITHDRAW",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_ACCEPTED" => Some(Self::OrderAccepted),
"ORDER_FILLED" => Some(Self::OrderFilled),
"ORDER_REPLACED" => Some(Self::OrderReplaced),
"ORDER_CANCELLED" => Some(Self::OrderCancelled),
"ORDER_EXPIRED" => Some(Self::OrderExpired),
"ORDER_REJECTED" => Some(Self::OrderRejected),
"ORDER_CANCEL_REJECTED" => Some(Self::OrderCancelRejected),
"SWAP" => Some(Self::Swap),
"DEPOSIT_WITHDRAW" => Some(Self::DepositWithdraw),
"ORDER_PARTIAL_FILL" => Some(Self::OrderPartialFill),
"BONUS_DEPOSIT_WITHDRAW" => Some(Self::BonusDepositWithdraw),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaChangeBonusType {
BonusDeposit = 0,
BonusWithdraw = 1,
}
impl ProtoOaChangeBonusType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::BonusDeposit => "BONUS_DEPOSIT",
Self::BonusWithdraw => "BONUS_WITHDRAW",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BONUS_DEPOSIT" => Some(Self::BonusDeposit),
"BONUS_WITHDRAW" => Some(Self::BonusWithdraw),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaChangeBalanceType {
BalanceDeposit = 0,
BalanceWithdraw = 1,
BalanceDepositStrategyCommissionInner = 3,
BalanceWithdrawStrategyCommissionInner = 4,
BalanceDepositIbCommissions = 5,
BalanceWithdrawIbSharedPercentage = 6,
BalanceDepositIbSharedPercentageFromSubIb = 7,
BalanceDepositIbSharedPercentageFromBroker = 8,
BalanceDepositRebate = 9,
BalanceWithdrawRebate = 10,
BalanceDepositStrategyCommissionOuter = 11,
BalanceWithdrawStrategyCommissionOuter = 12,
BalanceWithdrawBonusCompensation = 13,
BalanceWithdrawIbSharedPercentageToBroker = 14,
BalanceDepositDividends = 15,
BalanceWithdrawDividends = 16,
BalanceWithdrawGslCharge = 17,
BalanceWithdrawRollover = 18,
BalanceDepositNonwithdrawableBonus = 19,
BalanceWithdrawNonwithdrawableBonus = 20,
BalanceDepositSwap = 21,
BalanceWithdrawSwap = 22,
BalanceDepositManagementFee = 27,
BalanceWithdrawManagementFee = 28,
BalanceDepositPerformanceFee = 29,
BalanceWithdrawForSubaccount = 30,
BalanceDepositToSubaccount = 31,
BalanceWithdrawFromSubaccount = 32,
BalanceDepositFromSubaccount = 33,
BalanceWithdrawCopyFee = 34,
BalanceWithdrawInactivityFee = 35,
BalanceDepositTransfer = 36,
BalanceWithdrawTransfer = 37,
BalanceDepositConvertedBonus = 38,
BalanceDepositNegativeBalanceProtection = 39,
}
impl ProtoOaChangeBalanceType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::BalanceDeposit => "BALANCE_DEPOSIT",
Self::BalanceWithdraw => "BALANCE_WITHDRAW",
Self::BalanceDepositStrategyCommissionInner => {
"BALANCE_DEPOSIT_STRATEGY_COMMISSION_INNER"
}
Self::BalanceWithdrawStrategyCommissionInner => {
"BALANCE_WITHDRAW_STRATEGY_COMMISSION_INNER"
}
Self::BalanceDepositIbCommissions => "BALANCE_DEPOSIT_IB_COMMISSIONS",
Self::BalanceWithdrawIbSharedPercentage => {
"BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE"
}
Self::BalanceDepositIbSharedPercentageFromSubIb => {
"BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_SUB_IB"
}
Self::BalanceDepositIbSharedPercentageFromBroker => {
"BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_BROKER"
}
Self::BalanceDepositRebate => "BALANCE_DEPOSIT_REBATE",
Self::BalanceWithdrawRebate => "BALANCE_WITHDRAW_REBATE",
Self::BalanceDepositStrategyCommissionOuter => {
"BALANCE_DEPOSIT_STRATEGY_COMMISSION_OUTER"
}
Self::BalanceWithdrawStrategyCommissionOuter => {
"BALANCE_WITHDRAW_STRATEGY_COMMISSION_OUTER"
}
Self::BalanceWithdrawBonusCompensation => {
"BALANCE_WITHDRAW_BONUS_COMPENSATION"
}
Self::BalanceWithdrawIbSharedPercentageToBroker => {
"BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE_TO_BROKER"
}
Self::BalanceDepositDividends => "BALANCE_DEPOSIT_DIVIDENDS",
Self::BalanceWithdrawDividends => "BALANCE_WITHDRAW_DIVIDENDS",
Self::BalanceWithdrawGslCharge => "BALANCE_WITHDRAW_GSL_CHARGE",
Self::BalanceWithdrawRollover => "BALANCE_WITHDRAW_ROLLOVER",
Self::BalanceDepositNonwithdrawableBonus => {
"BALANCE_DEPOSIT_NONWITHDRAWABLE_BONUS"
}
Self::BalanceWithdrawNonwithdrawableBonus => {
"BALANCE_WITHDRAW_NONWITHDRAWABLE_BONUS"
}
Self::BalanceDepositSwap => "BALANCE_DEPOSIT_SWAP",
Self::BalanceWithdrawSwap => "BALANCE_WITHDRAW_SWAP",
Self::BalanceDepositManagementFee => "BALANCE_DEPOSIT_MANAGEMENT_FEE",
Self::BalanceWithdrawManagementFee => "BALANCE_WITHDRAW_MANAGEMENT_FEE",
Self::BalanceDepositPerformanceFee => "BALANCE_DEPOSIT_PERFORMANCE_FEE",
Self::BalanceWithdrawForSubaccount => "BALANCE_WITHDRAW_FOR_SUBACCOUNT",
Self::BalanceDepositToSubaccount => "BALANCE_DEPOSIT_TO_SUBACCOUNT",
Self::BalanceWithdrawFromSubaccount => "BALANCE_WITHDRAW_FROM_SUBACCOUNT",
Self::BalanceDepositFromSubaccount => "BALANCE_DEPOSIT_FROM_SUBACCOUNT",
Self::BalanceWithdrawCopyFee => "BALANCE_WITHDRAW_COPY_FEE",
Self::BalanceWithdrawInactivityFee => "BALANCE_WITHDRAW_INACTIVITY_FEE",
Self::BalanceDepositTransfer => "BALANCE_DEPOSIT_TRANSFER",
Self::BalanceWithdrawTransfer => "BALANCE_WITHDRAW_TRANSFER",
Self::BalanceDepositConvertedBonus => "BALANCE_DEPOSIT_CONVERTED_BONUS",
Self::BalanceDepositNegativeBalanceProtection => {
"BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BALANCE_DEPOSIT" => Some(Self::BalanceDeposit),
"BALANCE_WITHDRAW" => Some(Self::BalanceWithdraw),
"BALANCE_DEPOSIT_STRATEGY_COMMISSION_INNER" => {
Some(Self::BalanceDepositStrategyCommissionInner)
}
"BALANCE_WITHDRAW_STRATEGY_COMMISSION_INNER" => {
Some(Self::BalanceWithdrawStrategyCommissionInner)
}
"BALANCE_DEPOSIT_IB_COMMISSIONS" => Some(Self::BalanceDepositIbCommissions),
"BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE" => {
Some(Self::BalanceWithdrawIbSharedPercentage)
}
"BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_SUB_IB" => {
Some(Self::BalanceDepositIbSharedPercentageFromSubIb)
}
"BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_BROKER" => {
Some(Self::BalanceDepositIbSharedPercentageFromBroker)
}
"BALANCE_DEPOSIT_REBATE" => Some(Self::BalanceDepositRebate),
"BALANCE_WITHDRAW_REBATE" => Some(Self::BalanceWithdrawRebate),
"BALANCE_DEPOSIT_STRATEGY_COMMISSION_OUTER" => {
Some(Self::BalanceDepositStrategyCommissionOuter)
}
"BALANCE_WITHDRAW_STRATEGY_COMMISSION_OUTER" => {
Some(Self::BalanceWithdrawStrategyCommissionOuter)
}
"BALANCE_WITHDRAW_BONUS_COMPENSATION" => {
Some(Self::BalanceWithdrawBonusCompensation)
}
"BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE_TO_BROKER" => {
Some(Self::BalanceWithdrawIbSharedPercentageToBroker)
}
"BALANCE_DEPOSIT_DIVIDENDS" => Some(Self::BalanceDepositDividends),
"BALANCE_WITHDRAW_DIVIDENDS" => Some(Self::BalanceWithdrawDividends),
"BALANCE_WITHDRAW_GSL_CHARGE" => Some(Self::BalanceWithdrawGslCharge),
"BALANCE_WITHDRAW_ROLLOVER" => Some(Self::BalanceWithdrawRollover),
"BALANCE_DEPOSIT_NONWITHDRAWABLE_BONUS" => {
Some(Self::BalanceDepositNonwithdrawableBonus)
}
"BALANCE_WITHDRAW_NONWITHDRAWABLE_BONUS" => {
Some(Self::BalanceWithdrawNonwithdrawableBonus)
}
"BALANCE_DEPOSIT_SWAP" => Some(Self::BalanceDepositSwap),
"BALANCE_WITHDRAW_SWAP" => Some(Self::BalanceWithdrawSwap),
"BALANCE_DEPOSIT_MANAGEMENT_FEE" => Some(Self::BalanceDepositManagementFee),
"BALANCE_WITHDRAW_MANAGEMENT_FEE" => Some(Self::BalanceWithdrawManagementFee),
"BALANCE_DEPOSIT_PERFORMANCE_FEE" => Some(Self::BalanceDepositPerformanceFee),
"BALANCE_WITHDRAW_FOR_SUBACCOUNT" => Some(Self::BalanceWithdrawForSubaccount),
"BALANCE_DEPOSIT_TO_SUBACCOUNT" => Some(Self::BalanceDepositToSubaccount),
"BALANCE_WITHDRAW_FROM_SUBACCOUNT" => {
Some(Self::BalanceWithdrawFromSubaccount)
}
"BALANCE_DEPOSIT_FROM_SUBACCOUNT" => Some(Self::BalanceDepositFromSubaccount),
"BALANCE_WITHDRAW_COPY_FEE" => Some(Self::BalanceWithdrawCopyFee),
"BALANCE_WITHDRAW_INACTIVITY_FEE" => Some(Self::BalanceWithdrawInactivityFee),
"BALANCE_DEPOSIT_TRANSFER" => Some(Self::BalanceDepositTransfer),
"BALANCE_WITHDRAW_TRANSFER" => Some(Self::BalanceWithdrawTransfer),
"BALANCE_DEPOSIT_CONVERTED_BONUS" => Some(Self::BalanceDepositConvertedBonus),
"BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION" => {
Some(Self::BalanceDepositNegativeBalanceProtection)
}
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaDealStatus {
Filled = 2,
PartiallyFilled = 3,
Rejected = 4,
InternallyRejected = 5,
Error = 6,
Missed = 7,
}
impl ProtoOaDealStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Filled => "FILLED",
Self::PartiallyFilled => "PARTIALLY_FILLED",
Self::Rejected => "REJECTED",
Self::InternallyRejected => "INTERNALLY_REJECTED",
Self::Error => "ERROR",
Self::Missed => "MISSED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FILLED" => Some(Self::Filled),
"PARTIALLY_FILLED" => Some(Self::PartiallyFilled),
"REJECTED" => Some(Self::Rejected),
"INTERNALLY_REJECTED" => Some(Self::InternallyRejected),
"ERROR" => Some(Self::Error),
"MISSED" => Some(Self::Missed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaTrendbarPeriod {
M1 = 1,
M2 = 2,
M3 = 3,
M4 = 4,
M5 = 5,
M10 = 6,
M15 = 7,
M30 = 8,
H1 = 9,
H4 = 10,
H12 = 11,
D1 = 12,
W1 = 13,
Mn1 = 14,
}
impl ProtoOaTrendbarPeriod {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::M1 => "M1",
Self::M2 => "M2",
Self::M3 => "M3",
Self::M4 => "M4",
Self::M5 => "M5",
Self::M10 => "M10",
Self::M15 => "M15",
Self::M30 => "M30",
Self::H1 => "H1",
Self::H4 => "H4",
Self::H12 => "H12",
Self::D1 => "D1",
Self::W1 => "W1",
Self::Mn1 => "MN1",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"M1" => Some(Self::M1),
"M2" => Some(Self::M2),
"M3" => Some(Self::M3),
"M4" => Some(Self::M4),
"M5" => Some(Self::M5),
"M10" => Some(Self::M10),
"M15" => Some(Self::M15),
"M30" => Some(Self::M30),
"H1" => Some(Self::H1),
"H4" => Some(Self::H4),
"H12" => Some(Self::H12),
"D1" => Some(Self::D1),
"W1" => Some(Self::W1),
"MN1" => Some(Self::Mn1),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaQuoteType {
Bid = 1,
Ask = 2,
}
impl ProtoOaQuoteType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Bid => "BID",
Self::Ask => "ASK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BID" => Some(Self::Bid),
"ASK" => Some(Self::Ask),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaClientPermissionScope {
ScopeView = 0,
ScopeTrade = 1,
}
impl ProtoOaClientPermissionScope {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::ScopeView => "SCOPE_VIEW",
Self::ScopeTrade => "SCOPE_TRADE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCOPE_VIEW" => Some(Self::ScopeView),
"SCOPE_TRADE" => Some(Self::ScopeTrade),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaNotificationType {
MarginLevelThreshold1 = 61,
MarginLevelThreshold2 = 62,
MarginLevelThreshold3 = 63,
}
impl ProtoOaNotificationType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MarginLevelThreshold1 => "MARGIN_LEVEL_THRESHOLD_1",
Self::MarginLevelThreshold2 => "MARGIN_LEVEL_THRESHOLD_2",
Self::MarginLevelThreshold3 => "MARGIN_LEVEL_THRESHOLD_3",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MARGIN_LEVEL_THRESHOLD_1" => Some(Self::MarginLevelThreshold1),
"MARGIN_LEVEL_THRESHOLD_2" => Some(Self::MarginLevelThreshold2),
"MARGIN_LEVEL_THRESHOLD_3" => Some(Self::MarginLevelThreshold3),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaErrorCode {
OaAuthTokenExpired = 1,
AccountNotAuthorized = 2,
RetNoSuchLogin = 12,
AlreadyLoggedIn = 14,
RetAccountDisabled = 64,
ChClientAuthFailure = 101,
ChClientNotAuthenticated = 102,
ChClientAlreadyAuthenticated = 103,
ChAccessTokenInvalid = 104,
ChServerNotReachable = 105,
ChCtidTraderAccountNotFound = 106,
ChOaClientNotFound = 107,
RequestFrequencyExceeded = 108,
ServerIsUnderMaintenance = 109,
ChannelIsBlocked = 110,
ConnectionsLimitExceeded = 67,
WorseGslNotAllowed = 68,
SymbolHasHoliday = 69,
NotSubscribedToSpots = 112,
AlreadySubscribed = 113,
SymbolNotFound = 114,
UnknownSymbol = 115,
IncorrectBoundaries = 35,
NoQuotes = 117,
NotEnoughMoney = 118,
MaxExposureReached = 119,
PositionNotFound = 120,
OrderNotFound = 121,
PositionNotOpen = 122,
PositionLocked = 123,
TooManyPositions = 124,
TradingBadVolume = 125,
TradingBadStops = 126,
TradingBadPrices = 127,
TradingBadStake = 128,
ProtectionIsTooCloseToMarket = 129,
TradingBadExpirationDate = 130,
PendingExecution = 131,
TradingDisabled = 132,
TradingNotAllowed = 133,
UnableToCancelOrder = 134,
UnableToAmendOrder = 135,
ShortSellingNotAllowed = 136,
}
impl ProtoOaErrorCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::OaAuthTokenExpired => "OA_AUTH_TOKEN_EXPIRED",
Self::AccountNotAuthorized => "ACCOUNT_NOT_AUTHORIZED",
Self::RetNoSuchLogin => "RET_NO_SUCH_LOGIN",
Self::AlreadyLoggedIn => "ALREADY_LOGGED_IN",
Self::RetAccountDisabled => "RET_ACCOUNT_DISABLED",
Self::ChClientAuthFailure => "CH_CLIENT_AUTH_FAILURE",
Self::ChClientNotAuthenticated => "CH_CLIENT_NOT_AUTHENTICATED",
Self::ChClientAlreadyAuthenticated => "CH_CLIENT_ALREADY_AUTHENTICATED",
Self::ChAccessTokenInvalid => "CH_ACCESS_TOKEN_INVALID",
Self::ChServerNotReachable => "CH_SERVER_NOT_REACHABLE",
Self::ChCtidTraderAccountNotFound => "CH_CTID_TRADER_ACCOUNT_NOT_FOUND",
Self::ChOaClientNotFound => "CH_OA_CLIENT_NOT_FOUND",
Self::RequestFrequencyExceeded => "REQUEST_FREQUENCY_EXCEEDED",
Self::ServerIsUnderMaintenance => "SERVER_IS_UNDER_MAINTENANCE",
Self::ChannelIsBlocked => "CHANNEL_IS_BLOCKED",
Self::ConnectionsLimitExceeded => "CONNECTIONS_LIMIT_EXCEEDED",
Self::WorseGslNotAllowed => "WORSE_GSL_NOT_ALLOWED",
Self::SymbolHasHoliday => "SYMBOL_HAS_HOLIDAY",
Self::NotSubscribedToSpots => "NOT_SUBSCRIBED_TO_SPOTS",
Self::AlreadySubscribed => "ALREADY_SUBSCRIBED",
Self::SymbolNotFound => "SYMBOL_NOT_FOUND",
Self::UnknownSymbol => "UNKNOWN_SYMBOL",
Self::IncorrectBoundaries => "INCORRECT_BOUNDARIES",
Self::NoQuotes => "NO_QUOTES",
Self::NotEnoughMoney => "NOT_ENOUGH_MONEY",
Self::MaxExposureReached => "MAX_EXPOSURE_REACHED",
Self::PositionNotFound => "POSITION_NOT_FOUND",
Self::OrderNotFound => "ORDER_NOT_FOUND",
Self::PositionNotOpen => "POSITION_NOT_OPEN",
Self::PositionLocked => "POSITION_LOCKED",
Self::TooManyPositions => "TOO_MANY_POSITIONS",
Self::TradingBadVolume => "TRADING_BAD_VOLUME",
Self::TradingBadStops => "TRADING_BAD_STOPS",
Self::TradingBadPrices => "TRADING_BAD_PRICES",
Self::TradingBadStake => "TRADING_BAD_STAKE",
Self::ProtectionIsTooCloseToMarket => "PROTECTION_IS_TOO_CLOSE_TO_MARKET",
Self::TradingBadExpirationDate => "TRADING_BAD_EXPIRATION_DATE",
Self::PendingExecution => "PENDING_EXECUTION",
Self::TradingDisabled => "TRADING_DISABLED",
Self::TradingNotAllowed => "TRADING_NOT_ALLOWED",
Self::UnableToCancelOrder => "UNABLE_TO_CANCEL_ORDER",
Self::UnableToAmendOrder => "UNABLE_TO_AMEND_ORDER",
Self::ShortSellingNotAllowed => "SHORT_SELLING_NOT_ALLOWED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OA_AUTH_TOKEN_EXPIRED" => Some(Self::OaAuthTokenExpired),
"ACCOUNT_NOT_AUTHORIZED" => Some(Self::AccountNotAuthorized),
"RET_NO_SUCH_LOGIN" => Some(Self::RetNoSuchLogin),
"ALREADY_LOGGED_IN" => Some(Self::AlreadyLoggedIn),
"RET_ACCOUNT_DISABLED" => Some(Self::RetAccountDisabled),
"CH_CLIENT_AUTH_FAILURE" => Some(Self::ChClientAuthFailure),
"CH_CLIENT_NOT_AUTHENTICATED" => Some(Self::ChClientNotAuthenticated),
"CH_CLIENT_ALREADY_AUTHENTICATED" => Some(Self::ChClientAlreadyAuthenticated),
"CH_ACCESS_TOKEN_INVALID" => Some(Self::ChAccessTokenInvalid),
"CH_SERVER_NOT_REACHABLE" => Some(Self::ChServerNotReachable),
"CH_CTID_TRADER_ACCOUNT_NOT_FOUND" => Some(Self::ChCtidTraderAccountNotFound),
"CH_OA_CLIENT_NOT_FOUND" => Some(Self::ChOaClientNotFound),
"REQUEST_FREQUENCY_EXCEEDED" => Some(Self::RequestFrequencyExceeded),
"SERVER_IS_UNDER_MAINTENANCE" => Some(Self::ServerIsUnderMaintenance),
"CHANNEL_IS_BLOCKED" => Some(Self::ChannelIsBlocked),
"CONNECTIONS_LIMIT_EXCEEDED" => Some(Self::ConnectionsLimitExceeded),
"WORSE_GSL_NOT_ALLOWED" => Some(Self::WorseGslNotAllowed),
"SYMBOL_HAS_HOLIDAY" => Some(Self::SymbolHasHoliday),
"NOT_SUBSCRIBED_TO_SPOTS" => Some(Self::NotSubscribedToSpots),
"ALREADY_SUBSCRIBED" => Some(Self::AlreadySubscribed),
"SYMBOL_NOT_FOUND" => Some(Self::SymbolNotFound),
"UNKNOWN_SYMBOL" => Some(Self::UnknownSymbol),
"INCORRECT_BOUNDARIES" => Some(Self::IncorrectBoundaries),
"NO_QUOTES" => Some(Self::NoQuotes),
"NOT_ENOUGH_MONEY" => Some(Self::NotEnoughMoney),
"MAX_EXPOSURE_REACHED" => Some(Self::MaxExposureReached),
"POSITION_NOT_FOUND" => Some(Self::PositionNotFound),
"ORDER_NOT_FOUND" => Some(Self::OrderNotFound),
"POSITION_NOT_OPEN" => Some(Self::PositionNotOpen),
"POSITION_LOCKED" => Some(Self::PositionLocked),
"TOO_MANY_POSITIONS" => Some(Self::TooManyPositions),
"TRADING_BAD_VOLUME" => Some(Self::TradingBadVolume),
"TRADING_BAD_STOPS" => Some(Self::TradingBadStops),
"TRADING_BAD_PRICES" => Some(Self::TradingBadPrices),
"TRADING_BAD_STAKE" => Some(Self::TradingBadStake),
"PROTECTION_IS_TOO_CLOSE_TO_MARKET" => {
Some(Self::ProtectionIsTooCloseToMarket)
}
"TRADING_BAD_EXPIRATION_DATE" => Some(Self::TradingBadExpirationDate),
"PENDING_EXECUTION" => Some(Self::PendingExecution),
"TRADING_DISABLED" => Some(Self::TradingDisabled),
"TRADING_NOT_ALLOWED" => Some(Self::TradingNotAllowed),
"UNABLE_TO_CANCEL_ORDER" => Some(Self::UnableToCancelOrder),
"UNABLE_TO_AMEND_ORDER" => Some(Self::UnableToAmendOrder),
"SHORT_SELLING_NOT_ALLOWED" => Some(Self::ShortSellingNotAllowed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProtoOaLimitedRiskMarginCalculationStrategy {
AccordingToLeverage = 0,
AccordingToGsl = 1,
AccordingToGslAndLeverage = 2,
}
impl ProtoOaLimitedRiskMarginCalculationStrategy {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::AccordingToLeverage => "ACCORDING_TO_LEVERAGE",
Self::AccordingToGsl => "ACCORDING_TO_GSL",
Self::AccordingToGslAndLeverage => "ACCORDING_TO_GSL_AND_LEVERAGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACCORDING_TO_LEVERAGE" => Some(Self::AccordingToLeverage),
"ACCORDING_TO_GSL" => Some(Self::AccordingToGsl),
"ACCORDING_TO_GSL_AND_LEVERAGE" => Some(Self::AccordingToGslAndLeverage),
_ => None,
}
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaApplicationAuthReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaApplicationAuthReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(string, required, tag = "2")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, required, tag = "3")]
pub client_secret: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaApplicationAuthRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaApplicationAuthRes"
)]
pub payload_type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaAccountAuthReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAccountAuthReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(string, required, tag = "3")]
pub access_token: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaAccountAuthRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAccountAuthRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaErrorRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaErrorRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, optional, tag = "2")]
pub ctid_trader_account_id: ::core::option::Option<i64>,
#[prost(string, required, tag = "3")]
pub error_code: ::prost::alloc::string::String,
#[prost(string, optional, tag = "4")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "5")]
pub maintenance_end_timestamp: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaClientDisconnectEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaClientDisconnectEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(string, optional, tag = "2")]
pub reason: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaAccountsTokenInvalidatedEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAccountsTokenInvalidatedEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, repeated, packed = "false", tag = "2")]
pub ctid_trader_account_ids: ::prost::alloc::vec::Vec<i64>,
#[prost(string, optional, tag = "3")]
pub reason: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaVersionReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaVersionReq"
)]
pub payload_type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaVersionRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaVersionRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(string, required, tag = "2")]
pub version: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaNewOrderReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaNewOrderReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub symbol_id: i64,
#[prost(enumeration = "ProtoOaOrderType", required, tag = "4")]
pub order_type: i32,
#[prost(enumeration = "ProtoOaTradeSide", required, tag = "5")]
pub trade_side: i32,
#[prost(int64, required, tag = "6")]
pub volume: i64,
#[prost(double, optional, tag = "7")]
pub limit_price: ::core::option::Option<f64>,
#[prost(double, optional, tag = "8")]
pub stop_price: ::core::option::Option<f64>,
#[prost(
enumeration = "ProtoOaTimeInForce",
optional,
tag = "9",
default = "GoodTillCancel"
)]
pub time_in_force: ::core::option::Option<i32>,
#[prost(int64, optional, tag = "10")]
pub expiration_timestamp: ::core::option::Option<i64>,
#[prost(double, optional, tag = "11")]
pub stop_loss: ::core::option::Option<f64>,
#[prost(double, optional, tag = "12")]
pub take_profit: ::core::option::Option<f64>,
#[prost(string, optional, tag = "13")]
pub comment: ::core::option::Option<::prost::alloc::string::String>,
#[prost(double, optional, tag = "14")]
pub base_slippage_price: ::core::option::Option<f64>,
#[prost(int32, optional, tag = "15")]
pub slippage_in_points: ::core::option::Option<i32>,
#[prost(string, optional, tag = "16")]
pub label: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "17")]
pub position_id: ::core::option::Option<i64>,
#[prost(string, optional, tag = "18")]
pub client_order_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "19")]
pub relative_stop_loss: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "20")]
pub relative_take_profit: ::core::option::Option<i64>,
#[prost(bool, optional, tag = "21")]
pub guaranteed_stop_loss: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "22")]
pub trailing_stop_loss: ::core::option::Option<bool>,
#[prost(
enumeration = "ProtoOaOrderTriggerMethod",
optional,
tag = "23",
default = "Trade"
)]
pub stop_trigger_method: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaExecutionEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaExecutionEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(enumeration = "ProtoOaExecutionType", required, tag = "3")]
pub execution_type: i32,
#[prost(message, optional, tag = "4")]
pub position: ::core::option::Option<ProtoOaPosition>,
#[prost(message, optional, tag = "5")]
pub order: ::core::option::Option<ProtoOaOrder>,
#[prost(message, optional, tag = "6")]
pub deal: ::core::option::Option<ProtoOaDeal>,
#[prost(message, optional, tag = "7")]
pub bonus_deposit_withdraw: ::core::option::Option<ProtoOaBonusDepositWithdraw>,
#[prost(message, optional, tag = "8")]
pub deposit_withdraw: ::core::option::Option<ProtoOaDepositWithdraw>,
#[prost(string, optional, tag = "9")]
pub error_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "10")]
pub is_server_event: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaCancelOrderReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaCancelOrderReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub order_id: i64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaAmendOrderReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAmendOrderReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub order_id: i64,
#[prost(int64, optional, tag = "4")]
pub volume: ::core::option::Option<i64>,
#[prost(double, optional, tag = "5")]
pub limit_price: ::core::option::Option<f64>,
#[prost(double, optional, tag = "6")]
pub stop_price: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "7")]
pub expiration_timestamp: ::core::option::Option<i64>,
#[prost(double, optional, tag = "8")]
pub stop_loss: ::core::option::Option<f64>,
#[prost(double, optional, tag = "9")]
pub take_profit: ::core::option::Option<f64>,
#[prost(int32, optional, tag = "10")]
pub slippage_in_points: ::core::option::Option<i32>,
#[prost(int64, optional, tag = "11")]
pub relative_stop_loss: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "12")]
pub relative_take_profit: ::core::option::Option<i64>,
#[prost(bool, optional, tag = "13")]
pub guaranteed_stop_loss: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "14")]
pub trailing_stop_loss: ::core::option::Option<bool>,
#[prost(
enumeration = "ProtoOaOrderTriggerMethod",
optional,
tag = "15",
default = "Trade"
)]
pub stop_trigger_method: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaAmendPositionSltpReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAmendPositionSltpReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub position_id: i64,
#[prost(double, optional, tag = "4")]
pub stop_loss: ::core::option::Option<f64>,
#[prost(double, optional, tag = "5")]
pub take_profit: ::core::option::Option<f64>,
#[prost(bool, optional, tag = "7")]
pub guaranteed_stop_loss: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "8")]
pub trailing_stop_loss: ::core::option::Option<bool>,
#[prost(
enumeration = "ProtoOaOrderTriggerMethod",
optional,
tag = "9",
default = "Trade"
)]
pub stop_loss_trigger_method: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaClosePositionReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaClosePositionReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub position_id: i64,
#[prost(int64, required, tag = "4")]
pub volume: i64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaTrailingSlChangedEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaTrailingSlChangedEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub position_id: i64,
#[prost(int64, required, tag = "4")]
pub order_id: i64,
#[prost(double, required, tag = "5")]
pub stop_price: f64,
#[prost(int64, required, tag = "6")]
pub utc_last_update_timestamp: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaAssetListReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAssetListReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaAssetListRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAssetListRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub asset: ::prost::alloc::vec::Vec<ProtoOaAsset>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSymbolsListReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSymbolsListReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(bool, optional, tag = "3", default = "false")]
pub include_archived_symbols: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaSymbolsListRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSymbolsListRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub symbol: ::prost::alloc::vec::Vec<ProtoOaLightSymbol>,
#[prost(message, repeated, tag = "4")]
pub archived_symbol: ::prost::alloc::vec::Vec<ProtoOaArchivedSymbol>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSymbolByIdReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSymbolByIdReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, repeated, packed = "false", tag = "3")]
pub symbol_id: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaSymbolByIdRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSymbolByIdRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub symbol: ::prost::alloc::vec::Vec<ProtoOaSymbol>,
#[prost(message, repeated, tag = "4")]
pub archived_symbol: ::prost::alloc::vec::Vec<ProtoOaArchivedSymbol>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSymbolsForConversionReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSymbolsForConversionReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub first_asset_id: i64,
#[prost(int64, required, tag = "4")]
pub last_asset_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaSymbolsForConversionRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSymbolsForConversionRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub symbol: ::prost::alloc::vec::Vec<ProtoOaLightSymbol>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSymbolChangedEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSymbolChangedEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, repeated, packed = "false", tag = "3")]
pub symbol_id: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaAssetClassListReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAssetClassListReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaAssetClassListRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAssetClassListRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub asset_class: ::prost::alloc::vec::Vec<ProtoOaAssetClass>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaTraderReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaTraderReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaTraderRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaTraderRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, required, tag = "3")]
pub trader: ProtoOaTrader,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaTraderUpdatedEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaTraderUpdateEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, required, tag = "3")]
pub trader: ProtoOaTrader,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaReconcileReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaReconcileReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(bool, optional, tag = "3")]
pub return_protection_orders: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaReconcileRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaReconcileRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub position: ::prost::alloc::vec::Vec<ProtoOaPosition>,
#[prost(message, repeated, tag = "4")]
pub order: ::prost::alloc::vec::Vec<ProtoOaOrder>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaOrderErrorEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaOrderErrorEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "5")]
pub ctid_trader_account_id: i64,
#[prost(string, required, tag = "2")]
pub error_code: ::prost::alloc::string::String,
#[prost(int64, optional, tag = "3")]
pub order_id: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "6")]
pub position_id: ::core::option::Option<i64>,
#[prost(string, optional, tag = "7")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaDealListReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaDealListReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub from_timestamp: i64,
#[prost(int64, required, tag = "4")]
pub to_timestamp: i64,
#[prost(int32, optional, tag = "5")]
pub max_rows: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaDealListRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaDealListRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub deal: ::prost::alloc::vec::Vec<ProtoOaDeal>,
#[prost(bool, required, tag = "4")]
pub has_more: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaOrderListReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaOrderListReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub from_timestamp: i64,
#[prost(int64, required, tag = "4")]
pub to_timestamp: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaOrderListRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaOrderListRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub order: ::prost::alloc::vec::Vec<ProtoOaOrder>,
#[prost(bool, required, tag = "4")]
pub has_more: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaExpectedMarginReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaExpectedMarginReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub symbol_id: i64,
#[prost(int64, repeated, packed = "false", tag = "4")]
pub volume: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaExpectedMarginRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaExpectedMarginRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub margin: ::prost::alloc::vec::Vec<ProtoOaExpectedMargin>,
#[prost(uint32, optional, tag = "4")]
pub money_digits: ::core::option::Option<u32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaMarginChangedEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaMarginChangedEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(uint64, required, tag = "3")]
pub position_id: u64,
#[prost(uint64, required, tag = "4")]
pub used_margin: u64,
#[prost(uint32, optional, tag = "5")]
pub money_digits: ::core::option::Option<u32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaCashFlowHistoryListReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaCashFlowHistoryListReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub from_timestamp: i64,
#[prost(int64, required, tag = "4")]
pub to_timestamp: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaCashFlowHistoryListRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaCashFlowHistoryListRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub deposit_withdraw: ::prost::alloc::vec::Vec<ProtoOaDepositWithdraw>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaGetAccountListByAccessTokenReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetAccountsByAccessTokenReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(string, required, tag = "2")]
pub access_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaGetAccountListByAccessTokenRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetAccountsByAccessTokenRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(string, required, tag = "2")]
pub access_token: ::prost::alloc::string::String,
#[prost(enumeration = "ProtoOaClientPermissionScope", optional, tag = "3")]
pub permission_scope: ::core::option::Option<i32>,
#[prost(message, repeated, tag = "4")]
pub ctid_trader_account: ::prost::alloc::vec::Vec<ProtoOaCtidTraderAccount>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaRefreshTokenReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaRefreshTokenReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(string, required, tag = "2")]
pub refresh_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaRefreshTokenRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaRefreshTokenRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(string, required, tag = "2")]
pub access_token: ::prost::alloc::string::String,
#[prost(string, required, tag = "3")]
pub token_type: ::prost::alloc::string::String,
#[prost(int64, required, tag = "4")]
pub expires_in: i64,
#[prost(string, required, tag = "5")]
pub refresh_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSubscribeSpotsReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSubscribeSpotsReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, repeated, packed = "false", tag = "3")]
pub symbol_id: ::prost::alloc::vec::Vec<i64>,
#[prost(bool, optional, tag = "4")]
pub subscribe_to_spot_timestamp: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSubscribeSpotsRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSubscribeSpotsRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaUnsubscribeSpotsReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaUnsubscribeSpotsReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, repeated, packed = "false", tag = "3")]
pub symbol_id: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaUnsubscribeSpotsRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaUnsubscribeSpotsRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaSpotEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSpotEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub symbol_id: i64,
#[prost(uint64, optional, tag = "4")]
pub bid: ::core::option::Option<u64>,
#[prost(uint64, optional, tag = "5")]
pub ask: ::core::option::Option<u64>,
#[prost(message, repeated, tag = "6")]
pub trendbar: ::prost::alloc::vec::Vec<ProtoOaTrendbar>,
#[prost(uint64, optional, tag = "7")]
pub session_close: ::core::option::Option<u64>,
#[prost(int64, optional, tag = "8")]
pub timestamp: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSubscribeLiveTrendbarReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSubscribeLiveTrendbarReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "3")]
pub period: i32,
#[prost(int64, required, tag = "4")]
pub symbol_id: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSubscribeLiveTrendbarRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSubscribeLiveTrendbarRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaUnsubscribeLiveTrendbarReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaUnsubscribeLiveTrendbarReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "3")]
pub period: i32,
#[prost(int64, required, tag = "4")]
pub symbol_id: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaUnsubscribeLiveTrendbarRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaUnsubscribeLiveTrendbarRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaGetTrendbarsReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetTrendbarsReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub from_timestamp: i64,
#[prost(int64, required, tag = "4")]
pub to_timestamp: i64,
#[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "5")]
pub period: i32,
#[prost(int64, required, tag = "6")]
pub symbol_id: i64,
#[prost(uint32, optional, tag = "7")]
pub count: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaGetTrendbarsRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetTrendbarsRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "3")]
pub period: i32,
#[prost(int64, required, tag = "4")]
pub timestamp: i64,
#[prost(message, repeated, tag = "5")]
pub trendbar: ::prost::alloc::vec::Vec<ProtoOaTrendbar>,
#[prost(int64, optional, tag = "6")]
pub symbol_id: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaGetTickDataReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetTickdataReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub symbol_id: i64,
#[prost(enumeration = "ProtoOaQuoteType", required, tag = "4")]
pub r#type: i32,
#[prost(int64, required, tag = "5")]
pub from_timestamp: i64,
#[prost(int64, required, tag = "6")]
pub to_timestamp: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaGetTickDataRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetTickdataRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub tick_data: ::prost::alloc::vec::Vec<ProtoOaTickData>,
#[prost(bool, required, tag = "4")]
pub has_more: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaGetCtidProfileByTokenReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetCtidProfileByTokenReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(string, required, tag = "2")]
pub access_token: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaGetCtidProfileByTokenRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetCtidProfileByTokenRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(message, required, tag = "2")]
pub profile: ProtoOaCtidProfile,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaDepthEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaDepthEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(uint64, required, tag = "3")]
pub symbol_id: u64,
#[prost(message, repeated, tag = "4")]
pub new_quotes: ::prost::alloc::vec::Vec<ProtoOaDepthQuote>,
#[prost(uint64, repeated, tag = "5")]
pub deleted_quotes: ::prost::alloc::vec::Vec<u64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSubscribeDepthQuotesReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSubscribeDepthQuotesReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, repeated, packed = "false", tag = "3")]
pub symbol_id: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSubscribeDepthQuotesRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSubscribeDepthQuotesRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaUnsubscribeDepthQuotesReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaUnsubscribeDepthQuotesReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, repeated, packed = "false", tag = "3")]
pub symbol_id: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaUnsubscribeDepthQuotesRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaUnsubscribeDepthQuotesRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaSymbolCategoryListReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSymbolCategoryReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaSymbolCategoryListRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaSymbolCategoryRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub symbol_category: ::prost::alloc::vec::Vec<ProtoOaSymbolCategory>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaAccountLogoutReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAccountLogoutReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaAccountLogoutRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAccountLogoutRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaAccountDisconnectEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaAccountDisconnectEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaMarginCallListReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaMarginCallListReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaMarginCallListRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaMarginCallListRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(message, repeated, tag = "2")]
pub margin_call: ::prost::alloc::vec::Vec<ProtoOaMarginCall>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaMarginCallUpdateReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaMarginCallUpdateReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, required, tag = "3")]
pub margin_call: ProtoOaMarginCall,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaMarginCallUpdateRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaMarginCallUpdateRes"
)]
pub payload_type: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaMarginCallUpdateEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaMarginCallUpdateEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, required, tag = "3")]
pub margin_call: ProtoOaMarginCall,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProtoOaMarginCallTriggerEvent {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaMarginCallTriggerEvent"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, required, tag = "3")]
pub margin_call: ProtoOaMarginCall,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaGetDynamicLeverageByIdReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetDynamicLeverageReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub leverage_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaGetDynamicLeverageByIdRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetDynamicLeverageRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, required, tag = "3")]
pub leverage: ProtoOaDynamicLeverage,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaDealListByPositionIdReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaDealListByPositionIdReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub position_id: i64,
#[prost(int64, required, tag = "4")]
pub from_timestamp: i64,
#[prost(int64, required, tag = "5")]
pub to_timestamp: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaDealListByPositionIdRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaDealListByPositionIdRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub deal: ::prost::alloc::vec::Vec<ProtoOaDeal>,
#[prost(bool, required, tag = "4")]
pub has_more: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaOrderDetailsReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaOrderDetailsReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub order_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaOrderDetailsRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaOrderDetailsRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, required, tag = "3")]
pub order: ProtoOaOrder,
#[prost(message, repeated, tag = "4")]
pub deal: ::prost::alloc::vec::Vec<ProtoOaDeal>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaOrderListByPositionIdReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaOrderListByPositionIdReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub position_id: i64,
#[prost(int64, required, tag = "4")]
pub from_timestamp: i64,
#[prost(int64, required, tag = "5")]
pub to_timestamp: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaOrderListByPositionIdRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaOrderListByPositionIdRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub order: ::prost::alloc::vec::Vec<ProtoOaOrder>,
#[prost(bool, required, tag = "4")]
pub has_more: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaDealOffsetListReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaDealOffsetListReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(int64, required, tag = "3")]
pub deal_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaDealOffsetListRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaDealOffsetListRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub offset_by: ::prost::alloc::vec::Vec<ProtoOaDealOffset>,
#[prost(message, repeated, tag = "4")]
pub offsetting: ::prost::alloc::vec::Vec<ProtoOaDealOffset>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoOaGetPositionUnrealizedPnLReq {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetPositionUnrealizedPnlReq"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoOaGetPositionUnrealizedPnLRes {
#[prost(
enumeration = "ProtoOaPayloadType",
optional,
tag = "1",
default = "ProtoOaGetPositionUnrealizedPnlRes"
)]
pub payload_type: ::core::option::Option<i32>,
#[prost(int64, required, tag = "2")]
pub ctid_trader_account_id: i64,
#[prost(message, repeated, tag = "3")]
pub position_unrealized_pn_l: ::prost::alloc::vec::Vec<ProtoOaPositionUnrealizedPnL>,
#[prost(uint32, required, tag = "4")]
pub money_digits: u32,
}