Skip to main content

ctrader_rs/
openapi.rs

1// This file is @generated by prost-build.
2/// --- INTENSIVE COMMANDS 1 - 49
3/// --- COMMON API 50 - 69
4#[derive(serde::Serialize, serde::Deserialize)]
5#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
6#[repr(i32)]
7pub enum ProtoPayloadType {
8    /// common intensive
9    ProtoMessage = 5,
10    /// common commands
11    ErrorRes = 50,
12    HeartbeatEvent = 51,
13}
14impl ProtoPayloadType {
15    /// String value of the enum field names used in the ProtoBuf definition.
16    ///
17    /// The values are not transformed in any way and thus are considered stable
18    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
19    pub fn as_str_name(&self) -> &'static str {
20        match self {
21            Self::ProtoMessage => "PROTO_MESSAGE",
22            Self::ErrorRes => "ERROR_RES",
23            Self::HeartbeatEvent => "HEARTBEAT_EVENT",
24        }
25    }
26    /// Creates an enum from field names used in the ProtoBuf definition.
27    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
28        match value {
29            "PROTO_MESSAGE" => Some(Self::ProtoMessage),
30            "ERROR_RES" => Some(Self::ErrorRes),
31            "HEARTBEAT_EVENT" => Some(Self::HeartbeatEvent),
32            _ => None,
33        }
34    }
35}
36/// COMMON error codes 1 - 99
37#[derive(serde::Serialize, serde::Deserialize)]
38#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
39#[repr(i32)]
40pub enum ProtoErrorCode {
41    /// Generic error.
42    UnknownError = 1,
43    /// Message is not supported. Wrong message.
44    UnsupportedMessage = 2,
45    /// Generic error.  Usually used when input value is not correct.
46    InvalidRequest = 3,
47    /// Deal execution is reached timeout and rejected.
48    TimeoutError = 5,
49    /// Generic error for requests by id.
50    EntityNotFound = 6,
51    /// Connection to Server is lost or not supported.
52    CantRouteRequest = 7,
53    /// Message is too large.
54    FrameTooLong = 8,
55    /// Market is closed.
56    MarketClosed = 9,
57    /// Order is blocked (e.g. under execution) and change cannot be applied.
58    ConcurrentModification = 10,
59    /// Message is blocked by server or rate limit is reached.
60    BlockedPayloadType = 11,
61}
62impl ProtoErrorCode {
63    /// String value of the enum field names used in the ProtoBuf definition.
64    ///
65    /// The values are not transformed in any way and thus are considered stable
66    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
67    pub fn as_str_name(&self) -> &'static str {
68        match self {
69            Self::UnknownError => "UNKNOWN_ERROR",
70            Self::UnsupportedMessage => "UNSUPPORTED_MESSAGE",
71            Self::InvalidRequest => "INVALID_REQUEST",
72            Self::TimeoutError => "TIMEOUT_ERROR",
73            Self::EntityNotFound => "ENTITY_NOT_FOUND",
74            Self::CantRouteRequest => "CANT_ROUTE_REQUEST",
75            Self::FrameTooLong => "FRAME_TOO_LONG",
76            Self::MarketClosed => "MARKET_CLOSED",
77            Self::ConcurrentModification => "CONCURRENT_MODIFICATION",
78            Self::BlockedPayloadType => "BLOCKED_PAYLOAD_TYPE",
79        }
80    }
81    /// Creates an enum from field names used in the ProtoBuf definition.
82    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
83        match value {
84            "UNKNOWN_ERROR" => Some(Self::UnknownError),
85            "UNSUPPORTED_MESSAGE" => Some(Self::UnsupportedMessage),
86            "INVALID_REQUEST" => Some(Self::InvalidRequest),
87            "TIMEOUT_ERROR" => Some(Self::TimeoutError),
88            "ENTITY_NOT_FOUND" => Some(Self::EntityNotFound),
89            "CANT_ROUTE_REQUEST" => Some(Self::CantRouteRequest),
90            "FRAME_TOO_LONG" => Some(Self::FrameTooLong),
91            "MARKET_CLOSED" => Some(Self::MarketClosed),
92            "CONCURRENT_MODIFICATION" => Some(Self::ConcurrentModification),
93            "BLOCKED_PAYLOAD_TYPE" => Some(Self::BlockedPayloadType),
94            _ => None,
95        }
96    }
97}
98/// * Base message that is used for all messages that are sent to/from Open API proxy of cTrader platform.
99#[derive(serde::Serialize, serde::Deserialize)]
100#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
101pub struct ProtoMessage {
102    /// Contains id of ProtoPayloadType or other custom PayloadTypes (e.g. ProtoOAPayloadType).
103    #[prost(uint32, required, tag = "1")]
104    pub payload_type: u32,
105    /// Serialized protobuf message that corresponds to payloadType.
106    #[prost(bytes = "vec", optional, tag = "2")]
107    pub payload: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
108    /// Request message id, assigned by the client that will be returned in the response.
109    #[prost(string, optional, tag = "3")]
110    pub client_msg_id: ::core::option::Option<::prost::alloc::string::String>,
111}
112/// * Error response that is sent from Open API proxy when error occurs.
113#[derive(serde::Serialize, serde::Deserialize)]
114#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
115pub struct ProtoErrorRes {
116    #[prost(enumeration = "ProtoPayloadType", optional, tag = "1", default = "ErrorRes")]
117    pub payload_type: ::core::option::Option<i32>,
118    /// Contains name of ProtoErrorCode or other custom ErrorCodes (e.g. ProtoCHErrorCode).
119    #[prost(string, required, tag = "2")]
120    pub error_code: ::prost::alloc::string::String,
121    /// Error description.
122    #[prost(string, optional, tag = "3")]
123    pub description: ::core::option::Option<::prost::alloc::string::String>,
124    /// The Unix time in milliseconds of the end of the maintenance.
125    #[prost(uint64, optional, tag = "4")]
126    pub maintenance_end_timestamp: ::core::option::Option<u64>,
127}
128/// * Event that is sent from Open API proxy and can be used as criteria that connection is healthy when no other messages are sent by cTrader platform. Open API client can send this message when he needs to keep the connection open for a period without other messages longer than 30 seconds.
129#[derive(serde::Serialize, serde::Deserialize)]
130#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
131pub struct ProtoHeartbeatEvent {
132    #[prost(
133        enumeration = "ProtoPayloadType",
134        optional,
135        tag = "1",
136        default = "HeartbeatEvent"
137    )]
138    pub payload_type: ::core::option::Option<i32>,
139}
140/// * Asset entity.
141#[derive(serde::Serialize, serde::Deserialize)]
142#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
143pub struct ProtoOaAsset {
144    /// The unique asset ID.
145    #[prost(int64, required, tag = "1")]
146    pub asset_id: i64,
147    /// The asset name.
148    #[prost(string, required, tag = "2")]
149    pub name: ::prost::alloc::string::String,
150    /// User friendly name.
151    #[prost(string, optional, tag = "3")]
152    pub display_name: ::core::option::Option<::prost::alloc::string::String>,
153    /// Precision of the asset.
154    #[prost(int32, optional, tag = "4")]
155    pub digits: ::core::option::Option<i32>,
156}
157/// * Trading symbol entity.
158#[derive(serde::Serialize, serde::Deserialize)]
159#[derive(Clone, PartialEq, ::prost::Message)]
160pub struct ProtoOaSymbol {
161    /// The unique identifier of the symbol in specific server environment within cTrader platform. Different servers have different IDs.
162    #[prost(int64, required, tag = "1")]
163    pub symbol_id: i64,
164    /// Number of price digits to be displayed.
165    #[prost(int32, required, tag = "2")]
166    pub digits: i32,
167    /// Pip position on digits.
168    #[prost(int32, required, tag = "3")]
169    pub pip_position: i32,
170    /// If TRUE then the short selling with the symbol is enabled.
171    #[prost(bool, optional, tag = "4")]
172    pub enable_short_selling: ::core::option::Option<bool>,
173    /// If TRUE then setting of guaranteedStopLoss is available for limited risk accounts.
174    #[prost(bool, optional, tag = "5")]
175    pub guaranteed_stop_loss: ::core::option::Option<bool>,
176    /// Day of the week when SWAP charge amount will be tripled. Doesn't impact Rollover Commission.
177    #[prost(enumeration = "ProtoOaDayOfWeek", optional, tag = "6", default = "Monday")]
178    pub swap_rollover3_days: ::core::option::Option<i32>,
179    /// SWAP charge for long positions.
180    #[prost(double, optional, tag = "7")]
181    pub swap_long: ::core::option::Option<f64>,
182    /// SWAP charge for short positions.
183    #[prost(double, optional, tag = "8")]
184    pub swap_short: ::core::option::Option<f64>,
185    /// Maximum allowed volume in cents for an order with a symbol.
186    #[prost(int64, optional, tag = "9")]
187    pub max_volume: ::core::option::Option<i64>,
188    /// Minimum allowed volume in cents for an order with a symbol.
189    #[prost(int64, optional, tag = "10")]
190    pub min_volume: ::core::option::Option<i64>,
191    /// Step of the volume in cents for an order.
192    #[prost(int64, optional, tag = "11")]
193    pub step_volume: ::core::option::Option<i64>,
194    /// Value of max exposure per symbol, per account. Blocks execution if breached.
195    #[prost(uint64, optional, tag = "12")]
196    pub max_exposure: ::core::option::Option<u64>,
197    /// Symbol trading interval, specified in seconds starting from SUNDAY 00:00 in specified time zone.
198    #[prost(message, repeated, tag = "13")]
199    pub schedule: ::prost::alloc::vec::Vec<ProtoOaInterval>,
200    /// Commission base amount. Total commission depends on commissionType. Use preciseTradingCommissionRate.
201    #[deprecated]
202    #[prost(int64, optional, tag = "14")]
203    pub commission: ::core::option::Option<i64>,
204    /// Commission type. See ProtoOACommissionType for details.
205    #[prost(
206        enumeration = "ProtoOaCommissionType",
207        optional,
208        tag = "15",
209        default = "UsdPerMillionUsd"
210    )]
211    pub commission_type: ::core::option::Option<i32>,
212    /// Minimum allowed distance between stop loss and current market price.
213    #[prost(uint32, optional, tag = "16")]
214    pub sl_distance: ::core::option::Option<u32>,
215    /// Minimum allowed distance between take profit and current market price.
216    #[prost(uint32, optional, tag = "17")]
217    pub tp_distance: ::core::option::Option<u32>,
218    /// Minimum allowed distance between guaranteed stop loss and current market price.
219    #[prost(uint32, optional, tag = "18")]
220    pub gsl_distance: ::core::option::Option<u32>,
221    /// Guaranteed stop loss fee.
222    #[prost(int64, optional, tag = "19")]
223    pub gsl_charge: ::core::option::Option<i64>,
224    /// Unit of distance measure for slDistance, tpDistance, gslDistance.
225    #[prost(
226        enumeration = "ProtoOaSymbolDistanceType",
227        optional,
228        tag = "20",
229        default = "SymbolDistanceInPoints"
230    )]
231    pub distance_set_in: ::core::option::Option<i32>,
232    /// Minimum commission amount per trade. Use preciseMinCommission.
233    #[deprecated]
234    #[prost(int64, optional, tag = "21")]
235    pub min_commission: ::core::option::Option<i64>,
236    /// Minimum commission Type. See ProtoOAMinCommissionType for details.
237    #[prost(
238        enumeration = "ProtoOaMinCommissionType",
239        optional,
240        tag = "22",
241        default = "Currency"
242    )]
243    pub min_commission_type: ::core::option::Option<i32>,
244    /// Currency for minimum commission. (USD or quote currency).
245    #[prost(string, optional, tag = "23", default = "USD")]
246    pub min_commission_asset: ::core::option::Option<::prost::alloc::string::String>,
247    /// Administrative Fee, charged instead of Swaps if the Account is marked as a "Shariah Compliant (Swap Free)". The Administrative Fee is charged daily as USD per current open volume of Position in lots. The Account charged in the Deposit currency.
248    #[prost(int64, optional, tag = "24")]
249    pub rollover_commission: ::core::option::Option<i64>,
250    /// Initial period before the first rolloverCommission will be charged on the account.
251    #[prost(int32, optional, tag = "25")]
252    pub skip_rollover_days: ::core::option::Option<i32>,
253    /// Time zone for the symbol trading intervals.
254    #[prost(string, optional, tag = "26")]
255    pub schedule_time_zone: ::core::option::Option<::prost::alloc::string::String>,
256    /// Rules for trading with the symbol. See ProtoOATradingMode for details.
257    #[prost(
258        enumeration = "ProtoOaTradingMode",
259        optional,
260        tag = "27",
261        default = "Enabled"
262    )]
263    pub trading_mode: ::core::option::Option<i32>,
264    /// Day of the week (in UTC) when Administrative Fee charge amount will be tripled. Applied only if RolloverChargePeriod = 0 or 1.
265    #[prost(enumeration = "ProtoOaDayOfWeek", optional, tag = "28", default = "Monday")]
266    pub rollover_commission3_days: ::core::option::Option<i32>,
267    /// Specifies type of SWAP computation as PIPS (0) or PERCENTAGE (1, annual, in percent).
268    #[prost(
269        enumeration = "ProtoOaSwapCalculationType",
270        optional,
271        tag = "29",
272        default = "Pips"
273    )]
274    pub swap_calculation_type: ::core::option::Option<i32>,
275    /// Lot size of the Symbol (in cents).
276    #[prost(int64, optional, tag = "30")]
277    pub lot_size: ::core::option::Option<i64>,
278    /// Commission base amount. Total commission depends on commissionType: for non-percentage types it is multiplied by 10^8, for percentage of value commission type it is multiplied by 10^5.
279    #[prost(int64, optional, tag = "31")]
280    pub precise_trading_commission_rate: ::core::option::Option<i64>,
281    /// Minimum commission amount per trade multiplied by 10^8.
282    #[prost(int64, optional, tag = "32")]
283    pub precise_min_commission: ::core::option::Option<i64>,
284    /// List of holidays for this symbol specified by broker.
285    #[prost(message, repeated, tag = "33")]
286    pub holiday: ::prost::alloc::vec::Vec<ProtoOaHoliday>,
287    /// Percentage (1 = 0.01%) of the realized Gross Profit, which will be paid by the Trader for any trade if the Quote Asset of the traded Symbol is not matched with the Deposit Asset.
288    #[prost(int32, optional, tag = "34")]
289    pub pnl_conversion_fee_rate: ::core::option::Option<i32>,
290    /// The unique identifier of dynamic leverage entity. <https://help.ctrader.com/ctrader/trading/dynamic-leverage>
291    #[prost(int64, optional, tag = "35")]
292    pub leverage_id: ::core::option::Option<i64>,
293    /// Period of charging swaps in hours. 24 means swaps will be charged 1 time per day, 12 - every 12 hours, 8 - every 8 hours, etc.
294    #[prost(int32, optional, tag = "36")]
295    pub swap_period: ::core::option::Option<i32>,
296    /// Time in minutes from 00:00 (UTC) when intraday swaps are charged for the first time.
297    #[prost(int32, optional, tag = "37")]
298    pub swap_time: ::core::option::Option<i32>,
299    /// Count of swapPeriods before the first SWAP charge.
300    #[prost(int32, optional, tag = "38")]
301    pub skip_swap_periods: ::core::option::Option<i32>,
302    /// If enabled, SWAP will be charged for all days of the week, including Saturday and Sunday.
303    #[prost(bool, optional, tag = "39")]
304    pub charge_swap_at_weekends: ::core::option::Option<bool>,
305    /// Specifies the units in which the base Asset of the Symbol is denominated.
306    #[prost(string, optional, tag = "40")]
307    pub measurement_units: ::core::option::Option<::prost::alloc::string::String>,
308}
309/// * Lightweight symbol entity.
310#[derive(serde::Serialize, serde::Deserialize)]
311#[derive(Clone, PartialEq, ::prost::Message)]
312pub struct ProtoOaLightSymbol {
313    /// The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs.
314    #[prost(int64, required, tag = "1")]
315    pub symbol_id: i64,
316    /// Name of the symbol (e.g. EUR/USD).
317    #[prost(string, optional, tag = "2")]
318    pub symbol_name: ::core::option::Option<::prost::alloc::string::String>,
319    /// If TRUE then symbol is visible for traders.
320    #[prost(bool, optional, tag = "3")]
321    pub enabled: ::core::option::Option<bool>,
322    /// Base asset.
323    #[prost(int64, optional, tag = "4")]
324    pub base_asset_id: ::core::option::Option<i64>,
325    /// Quote asset.
326    #[prost(int64, optional, tag = "5")]
327    pub quote_asset_id: ::core::option::Option<i64>,
328    /// Id of the symbol category used for symbols grouping.
329    #[prost(int64, optional, tag = "6")]
330    pub symbol_category_id: ::core::option::Option<i64>,
331    #[prost(string, optional, tag = "7")]
332    pub description: ::core::option::Option<::prost::alloc::string::String>,
333    /// The number used for sorting Symbols in the UI (lowest number should appear at the top).
334    #[prost(double, optional, tag = "8")]
335    pub sorting_number: ::core::option::Option<f64>,
336}
337#[derive(serde::Serialize, serde::Deserialize)]
338#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
339pub struct ProtoOaArchivedSymbol {
340    /// The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs.
341    #[prost(int64, required, tag = "1")]
342    pub symbol_id: i64,
343    /// Name of the symbol (e.g. EUR/USD).
344    #[prost(string, required, tag = "2")]
345    pub name: ::prost::alloc::string::String,
346    /// The Unix time in milliseconds of the last update of the symbol.
347    #[prost(int64, required, tag = "3")]
348    pub utc_last_update_timestamp: i64,
349    /// Description of the symbol.
350    #[prost(string, optional, tag = "4")]
351    pub description: ::core::option::Option<::prost::alloc::string::String>,
352}
353/// * Symbol category entity.
354#[derive(serde::Serialize, serde::Deserialize)]
355#[derive(Clone, PartialEq, ::prost::Message)]
356pub struct ProtoOaSymbolCategory {
357    /// The unique identifier of the symbol category.
358    #[prost(int64, required, tag = "1")]
359    pub id: i64,
360    /// Link to the asset class. One asset class can have many symbol categories.
361    #[prost(int64, required, tag = "2")]
362    pub asset_class_id: i64,
363    /// Category name.
364    #[prost(string, required, tag = "3")]
365    pub name: ::prost::alloc::string::String,
366    /// The number used for sorting Symbol Categories in the UI (lowest number should appear at the top).
367    #[prost(double, optional, tag = "4")]
368    pub sorting_number: ::core::option::Option<f64>,
369}
370/// * Symbol trading session entity.
371#[derive(serde::Serialize, serde::Deserialize)]
372#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
373pub struct ProtoOaInterval {
374    /// Interval start, specified in seconds starting from SUNDAY 00:00 in specified time zone (inclusive to the interval).
375    #[prost(uint32, required, tag = "3")]
376    pub start_second: u32,
377    /// Interval end, specified in seconds starting from SUNDAY 00:00 in specified time zone (exclusive from the interval).
378    #[prost(uint32, required, tag = "4")]
379    pub end_second: u32,
380}
381/// * Trading account entity.
382#[derive(serde::Serialize, serde::Deserialize)]
383#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
384pub struct ProtoOaTrader {
385    /// The unique Trader's Account ID used to match the responses to the Trader's Account.
386    #[prost(int64, required, tag = "1")]
387    pub ctid_trader_account_id: i64,
388    /// Current account balance.
389    #[prost(int64, required, tag = "2")]
390    pub balance: i64,
391    /// Balance version used to identify the final balance. Increments each time when the trader's account balance is changed.
392    #[prost(int64, optional, tag = "3")]
393    pub balance_version: ::core::option::Option<i64>,
394    /// Amount of broker's bonus allocated to the account.
395    #[prost(int64, optional, tag = "4")]
396    pub manager_bonus: ::core::option::Option<i64>,
397    /// Amount of introducing broker bonus allocated to the account.
398    #[prost(int64, optional, tag = "5")]
399    pub ib_bonus: ::core::option::Option<i64>,
400    /// Broker's bonus that cannot be withdrew from the account as cash.
401    #[prost(int64, optional, tag = "6")]
402    pub non_withdrawable_bonus: ::core::option::Option<i64>,
403    /// Access rights that an owner has to the account in cTrader platform. See ProtoOAAccessRights for details.
404    #[prost(
405        enumeration = "ProtoOaAccessRights",
406        optional,
407        tag = "7",
408        default = "FullAccess"
409    )]
410    pub access_rights: ::core::option::Option<i32>,
411    /// Deposit currency of the account.
412    #[prost(int64, required, tag = "8")]
413    pub deposit_asset_id: i64,
414    /// If TRUE then account is Shariah compliant.
415    #[prost(bool, optional, tag = "9")]
416    pub swap_free: ::core::option::Option<bool>,
417    /// Account leverage (e.g. If leverage = 1:50 then value = 5000).
418    #[prost(uint32, optional, tag = "10")]
419    pub leverage_in_cents: ::core::option::Option<u32>,
420    /// Margin computation type for the account (MAX, SUM, NET).
421    #[prost(enumeration = "ProtoOaTotalMarginCalculationType", optional, tag = "11")]
422    pub total_margin_calculation_type: ::core::option::Option<i32>,
423    /// Maximum allowed leverage for the account. Used as validation when a Trader can change leverage value.
424    #[prost(uint32, optional, tag = "12")]
425    pub max_leverage: ::core::option::Option<u32>,
426    /// If TRUE then account is AMF compliant. Use isLimitedRisk and limitedRiskMarginCalculationStrategy.
427    #[deprecated]
428    #[prost(bool, optional, tag = "13")]
429    pub french_risk: ::core::option::Option<bool>,
430    /// ID of the account that is unique per server (Broker).
431    #[prost(int64, optional, tag = "14")]
432    pub trader_login: ::core::option::Option<i64>,
433    /// Account type: HEDGED, NETTED, etc.
434    #[prost(
435        enumeration = "ProtoOaAccountType",
436        optional,
437        tag = "15",
438        default = "Hedged"
439    )]
440    pub account_type: ::core::option::Option<i32>,
441    /// Some whitelabel assigned to trader by broker at the moment of account creation.
442    #[prost(string, optional, tag = "16")]
443    pub broker_name: ::core::option::Option<::prost::alloc::string::String>,
444    /// The Unix timestamp in milliseconds of the account registration. Should be used as minimal date in historical data requests.
445    #[prost(int64, optional, tag = "17")]
446    pub registration_timestamp: ::core::option::Option<i64>,
447    /// If TRUE then account is compliant to use specific margin calculation strategy. Such accounts are require to have guaranteed stop loss on all positions.
448    #[prost(bool, optional, tag = "18")]
449    pub is_limited_risk: ::core::option::Option<bool>,
450    /// Special strategy used in margin calculations for this account (if account isLimitedRisk).
451    #[prost(
452        enumeration = "ProtoOaLimitedRiskMarginCalculationStrategy",
453        optional,
454        tag = "19",
455        default = "AccordingToLeverage"
456    )]
457    pub limited_risk_margin_calculation_strategy: ::core::option::Option<i32>,
458    /// Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects balance, managerBonus, ibBonus, nonWithdrawableBonus.
459    #[prost(uint32, optional, tag = "20")]
460    pub money_digits: ::core::option::Option<u32>,
461    /// If TRUE - Position is fully closed on Stop Out, if FALSE - smart (partial closing) Stop Out is applied, if unspecified  - Stop Out format is determined by Broker.
462    #[prost(bool, optional, tag = "21")]
463    pub fair_stop_out: ::core::option::Option<bool>,
464    /// The Stop Out strategy that is used for this Trader. The Trader can change the value in the cTrader UI if this option is not disabled by the Broker
465    #[prost(
466        enumeration = "ProtoOaStopOutStrategy",
467        optional,
468        tag = "22",
469        default = "MostMarginUsedFirst"
470    )]
471    pub stop_out_strategy: ::core::option::Option<i32>,
472}
473/// * Trade position entity.
474#[derive(serde::Serialize, serde::Deserialize)]
475#[derive(Clone, PartialEq, ::prost::Message)]
476pub struct ProtoOaPosition {
477    /// The unique ID of the position. Note: trader might have two positions with the same id if positions are taken from accounts from different brokers.
478    #[prost(int64, required, tag = "1")]
479    pub position_id: i64,
480    /// Position details. See ProtoOATradeData for details.
481    #[prost(message, required, tag = "2")]
482    pub trade_data: ProtoOaTradeData,
483    /// Current status of the position.
484    #[prost(enumeration = "ProtoOaPositionStatus", required, tag = "3")]
485    pub position_status: i32,
486    /// Total amount of charged swap on open position.
487    #[prost(int64, required, tag = "4")]
488    pub swap: i64,
489    /// VWAP price of the position based on all executions (orders) linked to the position.
490    #[prost(double, optional, tag = "5")]
491    pub price: ::core::option::Option<f64>,
492    /// Current stop loss price.
493    #[prost(double, optional, tag = "6")]
494    pub stop_loss: ::core::option::Option<f64>,
495    /// Current take profit price.
496    #[prost(double, optional, tag = "7")]
497    pub take_profit: ::core::option::Option<f64>,
498    /// The Unix time in milliseconds of the last change of the position, including amend SL/TP of the position, execution of related order, cancel or related order, etc.
499    #[prost(int64, optional, tag = "8")]
500    pub utc_last_update_timestamp: ::core::option::Option<i64>,
501    /// Current unrealized commission related to the position.
502    #[prost(int64, optional, tag = "9")]
503    pub commission: ::core::option::Option<i64>,
504    /// Rate for used margin computation. Represented as Base/Deposit.
505    #[prost(double, optional, tag = "10")]
506    pub margin_rate: ::core::option::Option<f64>,
507    /// Amount of unrealized commission related to following of strategy provider.
508    #[prost(int64, optional, tag = "11")]
509    pub mirroring_commission: ::core::option::Option<i64>,
510    /// If TRUE then position's stop loss is guaranteedStopLoss.
511    #[prost(bool, optional, tag = "12")]
512    pub guaranteed_stop_loss: ::core::option::Option<bool>,
513    /// Amount of margin used for the position in deposit currency.
514    #[prost(uint64, optional, tag = "13")]
515    pub used_margin: ::core::option::Option<u64>,
516    /// Stop trigger method for SL/TP of the position.
517    #[prost(
518        enumeration = "ProtoOaOrderTriggerMethod",
519        optional,
520        tag = "14",
521        default = "Trade"
522    )]
523    pub stop_loss_trigger_method: ::core::option::Option<i32>,
524    /// Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects swap, commission, mirroringCommission, usedMargin.
525    #[prost(uint32, optional, tag = "15")]
526    pub money_digits: ::core::option::Option<u32>,
527    /// If TRUE then the Trailing Stop Loss is applied.
528    #[prost(bool, optional, tag = "16")]
529    pub trailing_stop_loss: ::core::option::Option<bool>,
530}
531/// * Position/order trading details entity.
532#[derive(serde::Serialize, serde::Deserialize)]
533#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
534pub struct ProtoOaTradeData {
535    /// The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs.
536    #[prost(int64, required, tag = "1")]
537    pub symbol_id: i64,
538    /// Volume in cents (e.g. 1000 in protocol means 10.00 units).
539    #[prost(int64, required, tag = "2")]
540    pub volume: i64,
541    /// Buy, Sell.
542    #[prost(enumeration = "ProtoOaTradeSide", required, tag = "3")]
543    pub trade_side: i32,
544    /// The Unix time in milliseconds when position was opened or order was created.
545    #[prost(int64, optional, tag = "4")]
546    pub open_timestamp: ::core::option::Option<i64>,
547    /// Text label specified during order request.
548    #[prost(string, optional, tag = "5")]
549    pub label: ::core::option::Option<::prost::alloc::string::String>,
550    /// If TRUE then position/order stop loss is guaranteedStopLoss.
551    #[prost(bool, optional, tag = "6")]
552    pub guaranteed_stop_loss: ::core::option::Option<bool>,
553    /// User-specified comment.
554    #[prost(string, optional, tag = "7")]
555    pub comment: ::core::option::Option<::prost::alloc::string::String>,
556    /// Specifies the units in which the Symbol is denominated.
557    #[prost(string, optional, tag = "8")]
558    pub measurement_units: ::core::option::Option<::prost::alloc::string::String>,
559    /// The Unix time in milliseconds when a Position was closed
560    #[prost(uint64, optional, tag = "9")]
561    pub close_timestamp: ::core::option::Option<u64>,
562}
563/// * Trade order entity.
564#[derive(serde::Serialize, serde::Deserialize)]
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct ProtoOaOrder {
567    /// The unique ID of the order. Note: trader might have two orders with the same id if orders are taken from accounts from different brokers.
568    #[prost(int64, required, tag = "1")]
569    pub order_id: i64,
570    /// Detailed trader data.
571    #[prost(message, required, tag = "2")]
572    pub trade_data: ProtoOaTradeData,
573    /// Order type.
574    #[prost(enumeration = "ProtoOaOrderType", required, tag = "3")]
575    pub order_type: i32,
576    /// Order status.
577    #[prost(enumeration = "ProtoOaOrderStatus", required, tag = "4")]
578    pub order_status: i32,
579    /// The Unix time in milliseconds of expiration if the order has time in force GTD.
580    #[prost(int64, optional, tag = "6")]
581    pub expiration_timestamp: ::core::option::Option<i64>,
582    /// Price at which an order was executed. For order with FILLED status.
583    #[prost(double, optional, tag = "7")]
584    pub execution_price: ::core::option::Option<f64>,
585    /// Part of the volume that was filled in cents (e.g. 1000 in protocol means 10.00 units).
586    #[prost(int64, optional, tag = "8")]
587    pub executed_volume: ::core::option::Option<i64>,
588    /// The Unix time in milliseconds of the last update of the order.
589    #[prost(int64, optional, tag = "9")]
590    pub utc_last_update_timestamp: ::core::option::Option<i64>,
591    /// Used for Market Range order with combination of slippageInPoints to specify price range were order can be executed.
592    #[prost(double, optional, tag = "10")]
593    pub base_slippage_price: ::core::option::Option<f64>,
594    /// Used for Market Range and STOP_LIMIT orders to to specify price range were order can be executed.
595    #[prost(int64, optional, tag = "11")]
596    pub slippage_in_points: ::core::option::Option<i64>,
597    /// If TRUE then the order is closing part of whole position. Must have specified positionId.
598    #[prost(bool, optional, tag = "12")]
599    pub closing_order: ::core::option::Option<bool>,
600    /// Valid only for LIMIT orders.
601    #[prost(double, optional, tag = "13")]
602    pub limit_price: ::core::option::Option<f64>,
603    /// Valid only for STOP and STOP_LIMIT orders.
604    #[prost(double, optional, tag = "14")]
605    pub stop_price: ::core::option::Option<f64>,
606    /// Absolute stopLoss price.
607    #[prost(double, optional, tag = "15")]
608    pub stop_loss: ::core::option::Option<f64>,
609    /// Absolute takeProfit price.
610    #[prost(double, optional, tag = "16")]
611    pub take_profit: ::core::option::Option<f64>,
612    /// Optional ClientOrderId. Max Length = 50 chars.
613    #[prost(string, optional, tag = "17")]
614    pub client_order_id: ::core::option::Option<::prost::alloc::string::String>,
615    /// Order's time in force. Depends on order type.
616    #[prost(
617        enumeration = "ProtoOaTimeInForce",
618        optional,
619        tag = "18",
620        default = "ImmediateOrCancel"
621    )]
622    pub time_in_force: ::core::option::Option<i32>,
623    /// ID of the position linked to the order (e.g. closing order, order that increase volume of a specific position, etc.).
624    #[prost(int64, optional, tag = "19")]
625    pub position_id: ::core::option::Option<i64>,
626    /// Relative stopLoss that can be specified instead of absolute as one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss.
627    #[prost(int64, optional, tag = "20")]
628    pub relative_stop_loss: ::core::option::Option<i64>,
629    /// Relative takeProfit that can be specified instead of absolute one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) ForBUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit.
630    #[prost(int64, optional, tag = "21")]
631    pub relative_take_profit: ::core::option::Option<i64>,
632    /// If TRUE then order was stopped out from server side.
633    #[prost(bool, optional, tag = "22")]
634    pub is_stop_out: ::core::option::Option<bool>,
635    /// If TRUE then order is trailingStopLoss. Valid for STOP_LOSS_TAKE_PROFIT order.
636    #[prost(bool, optional, tag = "23")]
637    pub trailing_stop_loss: ::core::option::Option<bool>,
638    /// Trigger method for the order. Valid only for STOP and STOP_LIMIT orders.
639    #[prost(
640        enumeration = "ProtoOaOrderTriggerMethod",
641        optional,
642        tag = "24",
643        default = "Trade"
644    )]
645    pub stop_trigger_method: ::core::option::Option<i32>,
646}
647/// * Bonus deposit/withdrawal entity.
648#[derive(serde::Serialize, serde::Deserialize)]
649#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
650pub struct ProtoOaBonusDepositWithdraw {
651    /// Type of the operation. Deposit/Withdrawal.
652    #[prost(enumeration = "ProtoOaChangeBonusType", required, tag = "1")]
653    pub operation_type: i32,
654    /// The unique ID of the bonus deposit/withdrawal operation.
655    #[prost(int64, required, tag = "2")]
656    pub bonus_history_id: i64,
657    /// Total amount of broker's bonus after the operation.
658    #[prost(int64, required, tag = "3")]
659    pub manager_bonus: i64,
660    /// Amount of bonus deposited/withdrew by manager.
661    #[prost(int64, required, tag = "4")]
662    pub manager_delta: i64,
663    /// Total amount of introducing broker's bonus after the operation.
664    #[prost(int64, required, tag = "5")]
665    pub ib_bonus: i64,
666    /// Amount of bonus deposited/withdrew by introducing broker.
667    #[prost(int64, required, tag = "6")]
668    pub ib_delta: i64,
669    /// The Unix time in milliseconds when the bonus operation was executed.
670    #[prost(int64, required, tag = "7")]
671    pub change_bonus_timestamp: i64,
672    /// Note added to operation. Visible to the trader.
673    #[prost(string, optional, tag = "8")]
674    pub external_note: ::core::option::Option<::prost::alloc::string::String>,
675    /// ID of introducing broker who deposited/withdrew bonus.
676    #[prost(int64, optional, tag = "9")]
677    pub introducing_broker_id: ::core::option::Option<i64>,
678    /// Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects managerBonus, managerDelta, ibBonus, ibDelta.
679    #[prost(uint32, optional, tag = "10")]
680    pub money_digits: ::core::option::Option<u32>,
681}
682/// * Account deposit/withdrawal operation entity.
683#[derive(serde::Serialize, serde::Deserialize)]
684#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
685pub struct ProtoOaDepositWithdraw {
686    /// Type of the operation. Deposit/Withdrawal.
687    #[prost(enumeration = "ProtoOaChangeBalanceType", required, tag = "1")]
688    pub operation_type: i32,
689    /// The unique ID of the deposit/withdrawal operation.
690    #[prost(int64, required, tag = "2")]
691    pub balance_history_id: i64,
692    /// Account balance after the operation was executed.
693    #[prost(int64, required, tag = "3")]
694    pub balance: i64,
695    /// Amount of deposit/withdrawal operation.
696    #[prost(int64, required, tag = "4")]
697    pub delta: i64,
698    /// The Unix time in milliseconds when deposit/withdrawal operation was executed.
699    #[prost(int64, required, tag = "5")]
700    pub change_balance_timestamp: i64,
701    /// Note added to operation. Visible to the trader.
702    #[prost(string, optional, tag = "6")]
703    pub external_note: ::core::option::Option<::prost::alloc::string::String>,
704    /// Balance version used to identify the final balance. Increments each time when the trader's account balance is changed.
705    #[prost(int64, optional, tag = "7")]
706    pub balance_version: ::core::option::Option<i64>,
707    /// Total account's equity after balance operation was executed.
708    #[prost(int64, optional, tag = "8")]
709    pub equity: ::core::option::Option<i64>,
710    /// Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects balance, delta, equity.
711    #[prost(uint32, optional, tag = "9")]
712    pub money_digits: ::core::option::Option<u32>,
713}
714/// * Execution entity.
715#[derive(serde::Serialize, serde::Deserialize)]
716#[derive(Clone, Copy, PartialEq, ::prost::Message)]
717pub struct ProtoOaDeal {
718    /// The unique ID of the execution deal.
719    #[prost(int64, required, tag = "1")]
720    pub deal_id: i64,
721    /// Source order of the deal.
722    #[prost(int64, required, tag = "2")]
723    pub order_id: i64,
724    /// Source position of the deal.
725    #[prost(int64, required, tag = "3")]
726    pub position_id: i64,
727    /// Volume sent for execution, in cents.
728    #[prost(int64, required, tag = "4")]
729    pub volume: i64,
730    /// Filled volume, in cents.
731    #[prost(int64, required, tag = "5")]
732    pub filled_volume: i64,
733    /// The unique identifier of the symbol in specific server environment within cTrader platform. Different servers have different IDs.
734    #[prost(int64, required, tag = "6")]
735    pub symbol_id: i64,
736    /// The Unix time in milliseconds when the deal was sent for execution.
737    #[prost(int64, required, tag = "7")]
738    pub create_timestamp: i64,
739    /// The Unix time in milliseconds when the deal was executed.
740    #[prost(int64, required, tag = "8")]
741    pub execution_timestamp: i64,
742    /// The Unix time in milliseconds when the deal was created, executed or rejected.
743    #[prost(int64, optional, tag = "9")]
744    pub utc_last_update_timestamp: ::core::option::Option<i64>,
745    /// Execution price.
746    #[prost(double, optional, tag = "10")]
747    pub execution_price: ::core::option::Option<f64>,
748    /// Buy/Sell.
749    #[prost(enumeration = "ProtoOaTradeSide", required, tag = "11")]
750    pub trade_side: i32,
751    /// Status of the deal.
752    #[prost(enumeration = "ProtoOaDealStatus", required, tag = "12")]
753    pub deal_status: i32,
754    /// Rate for used margin computation. Represented as Base/Deposit.
755    #[prost(double, optional, tag = "13")]
756    pub margin_rate: ::core::option::Option<f64>,
757    /// Amount of trading commission associated with the deal.
758    #[prost(int64, optional, tag = "14")]
759    pub commission: ::core::option::Option<i64>,
760    /// Base to USD conversion rate on the time of deal execution.
761    #[prost(double, optional, tag = "15")]
762    pub base_to_usd_conversion_rate: ::core::option::Option<f64>,
763    /// Closing position detail. Valid only for closing deal.
764    #[prost(message, optional, tag = "16")]
765    pub close_position_detail: ::core::option::Option<ProtoOaClosePositionDetail>,
766    /// Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects commission.
767    #[prost(uint32, optional, tag = "17")]
768    pub money_digits: ::core::option::Option<u32>,
769}
770/// * Deal details for ProtoOADealOffsetListReq.
771#[derive(serde::Serialize, serde::Deserialize)]
772#[derive(Clone, Copy, PartialEq, ::prost::Message)]
773pub struct ProtoOaDealOffset {
774    /// The unique ID of the execution Deal.
775    #[prost(int64, required, tag = "1")]
776    pub deal_id: i64,
777    /// Matched volume, in cents.
778    #[prost(int64, required, tag = "2")]
779    pub volume: i64,
780    /// The Unix time in milliseconds when the offset Deal was executed.
781    #[prost(int64, optional, tag = "3")]
782    pub execution_timestamp: ::core::option::Option<i64>,
783    /// Execution price of the offset Deal.
784    #[prost(double, optional, tag = "4")]
785    pub execution_price: ::core::option::Option<f64>,
786}
787/// * Trading details for closing deal.
788#[derive(serde::Serialize, serde::Deserialize)]
789#[derive(Clone, Copy, PartialEq, ::prost::Message)]
790pub struct ProtoOaClosePositionDetail {
791    /// Position price at the moment of filling the closing order.
792    #[prost(double, required, tag = "1")]
793    pub entry_price: f64,
794    /// Amount of realized gross profit after closing deal execution.
795    #[prost(int64, required, tag = "2")]
796    pub gross_profit: i64,
797    /// Amount of realized swap related to closed volume.
798    #[prost(int64, required, tag = "3")]
799    pub swap: i64,
800    /// Amount of realized commission related to closed volume.
801    #[prost(int64, required, tag = "4")]
802    pub commission: i64,
803    /// Account balance after closing deal execution.
804    #[prost(int64, required, tag = "5")]
805    pub balance: i64,
806    /// Quote/Deposit currency conversion rate on the time of closing deal execution.
807    #[prost(double, optional, tag = "6")]
808    pub quote_to_deposit_conversion_rate: ::core::option::Option<f64>,
809    /// Closed volume in cents.
810    #[prost(int64, optional, tag = "7")]
811    pub closed_volume: ::core::option::Option<i64>,
812    /// Balance version of the account related to closing deal operation.
813    #[prost(int64, optional, tag = "8")]
814    pub balance_version: ::core::option::Option<i64>,
815    /// Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects grossProfit, swap, commission, balance, pnlConversionFee.
816    #[prost(uint32, optional, tag = "9")]
817    pub money_digits: ::core::option::Option<u32>,
818    /// Fee for conversion applied to the Deal in account's ccy when trader symbol's quote asset id \<\> ProtoOATrader.depositAssetId.
819    #[prost(int64, optional, tag = "10")]
820    pub pnl_conversion_fee: ::core::option::Option<i64>,
821}
822/// * Historical Trendbar entity.
823#[derive(serde::Serialize, serde::Deserialize)]
824#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
825pub struct ProtoOaTrendbar {
826    /// Bar volume in ticks.
827    #[prost(int64, required, tag = "3")]
828    pub volume: i64,
829    /// Bar period.
830    #[prost(enumeration = "ProtoOaTrendbarPeriod", optional, tag = "4", default = "M1")]
831    pub period: ::core::option::Option<i32>,
832    /// Low price of the bar.
833    #[prost(int64, optional, tag = "5")]
834    pub low: ::core::option::Option<i64>,
835    /// Delta between open and low price. open = low + deltaOpen.
836    #[prost(uint64, optional, tag = "6")]
837    pub delta_open: ::core::option::Option<u64>,
838    /// Delta between close and low price. close = low + deltaClose.
839    #[prost(uint64, optional, tag = "7")]
840    pub delta_close: ::core::option::Option<u64>,
841    /// Delta between high and low price. high = low + deltaHigh.
842    #[prost(uint64, optional, tag = "8")]
843    pub delta_high: ::core::option::Option<u64>,
844    /// The Unix time in minutes of the bar, equal to the timestamp of the open tick.
845    #[prost(uint32, optional, tag = "9")]
846    pub utc_timestamp_in_minutes: ::core::option::Option<u32>,
847}
848/// * Expected margin computation entity.
849#[derive(serde::Serialize, serde::Deserialize)]
850#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
851pub struct ProtoOaExpectedMargin {
852    /// Volume in cents used for computation of expected margin.
853    #[prost(int64, required, tag = "1")]
854    pub volume: i64,
855    /// Buy margin amount.
856    #[prost(int64, required, tag = "2")]
857    pub buy_margin: i64,
858    /// Sell margin amount.
859    #[prost(int64, required, tag = "3")]
860    pub sell_margin: i64,
861}
862/// * Historical tick data type.
863#[derive(serde::Serialize, serde::Deserialize)]
864#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
865pub struct ProtoOaTickData {
866    /// The Unix time in milliseconds of the tick. See ProtoOAGetTickDataRes.tickData for details.
867    #[prost(int64, required, tag = "1")]
868    pub timestamp: i64,
869    /// Tick price.
870    #[prost(int64, required, tag = "2")]
871    pub tick: i64,
872}
873/// * Trader profile entity. Empty due to GDPR.
874#[derive(serde::Serialize, serde::Deserialize)]
875#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
876pub struct ProtoOaCtidProfile {
877    #[prost(int64, required, tag = "1")]
878    pub user_id: i64,
879}
880/// * Trader account entity.
881#[derive(serde::Serialize, serde::Deserialize)]
882#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
883pub struct ProtoOaCtidTraderAccount {
884    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.cTrader platform. Different brokers might have different ids
885    #[prost(uint64, required, tag = "1")]
886    pub ctid_trader_account_id: u64,
887    /// If TRUE then the account is belong to Live environment and live host must be used to authorize it
888    #[prost(bool, optional, tag = "2")]
889    pub is_live: ::core::option::Option<bool>,
890    /// TraderLogin for a specific account. Value is displayed on Client App UI
891    #[prost(int64, optional, tag = "3")]
892    pub trader_login: ::core::option::Option<i64>,
893    /// The Unix time in milliseconds of the last ProtoOAClosePositionDetail happened to this account.
894    #[prost(int64, optional, tag = "4")]
895    pub last_closing_deal_timestamp: ::core::option::Option<i64>,
896    /// The Unix time in milliseconds of the last ProtoOADepositWithdraw happened to this account.
897    #[prost(int64, optional, tag = "5")]
898    pub last_balance_update_timestamp: ::core::option::Option<i64>,
899    /// The name of the broker to which the account belongs to. Shortened to be displayed in the UI.
900    #[prost(string, optional, tag = "6")]
901    pub broker_title_short: ::core::option::Option<::prost::alloc::string::String>,
902}
903/// * Asset class entity.
904#[derive(serde::Serialize, serde::Deserialize)]
905#[derive(Clone, PartialEq, ::prost::Message)]
906pub struct ProtoOaAssetClass {
907    /// Unique asset ID.
908    #[prost(int64, optional, tag = "1")]
909    pub id: ::core::option::Option<i64>,
910    /// Asset class name.
911    #[prost(string, optional, tag = "2")]
912    pub name: ::core::option::Option<::prost::alloc::string::String>,
913    /// The number used for sorting Asset Classes in the UI (lowest number should appear at the top).
914    #[prost(double, optional, tag = "3")]
915    pub sorting_number: ::core::option::Option<f64>,
916}
917/// * Depth of market entity.
918#[derive(serde::Serialize, serde::Deserialize)]
919#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
920pub struct ProtoOaDepthQuote {
921    /// Quote ID.
922    #[prost(uint64, required, tag = "1")]
923    pub id: u64,
924    /// Quote size in cents.
925    #[prost(uint64, required, tag = "3")]
926    pub size: u64,
927    /// Bid price for bid quotes.
928    #[prost(uint64, optional, tag = "4")]
929    pub bid: ::core::option::Option<u64>,
930    /// Ask price for ask quotes.
931    #[prost(uint64, optional, tag = "5")]
932    pub ask: ::core::option::Option<u64>,
933}
934/// * Margin call entity, specifies threshold for exact margin call type. Only 3 instances of margin calls are supported, identified by marginCallType. See ProtoOANotificationType for details.
935#[derive(serde::Serialize, serde::Deserialize)]
936#[derive(Clone, Copy, PartialEq, ::prost::Message)]
937pub struct ProtoOaMarginCall {
938    /// Type of margin call. All margin calls are similar, only difference is in marginLevelThreshold.
939    #[prost(enumeration = "ProtoOaNotificationType", required, tag = "1")]
940    pub margin_call_type: i32,
941    /// Margin level threshold for margin call.
942    #[prost(double, required, tag = "2")]
943    pub margin_level_threshold: f64,
944    /// The Unix time in milliseconds of the last update of the margin call.
945    #[prost(int64, optional, tag = "3")]
946    pub utc_last_update_timestamp: ::core::option::Option<i64>,
947}
948#[derive(serde::Serialize, serde::Deserialize)]
949#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
950pub struct ProtoOaHoliday {
951    /// Unique ID of holiday.
952    #[prost(int64, required, tag = "1")]
953    pub holiday_id: i64,
954    /// Name of holiday.
955    #[prost(string, required, tag = "2")]
956    pub name: ::prost::alloc::string::String,
957    /// Description of holiday.
958    #[prost(string, optional, tag = "3")]
959    pub description: ::core::option::Option<::prost::alloc::string::String>,
960    /// Timezone used for holiday.
961    #[prost(string, required, tag = "4")]
962    pub schedule_time_zone: ::prost::alloc::string::String,
963    /// Amount of days from 1st Jan 1970, multiply it by 86400000 to get Unix time in milliseconds.
964    #[prost(int64, required, tag = "5")]
965    pub holiday_date: i64,
966    /// If TRUE, then the holiday happens each year.
967    #[prost(bool, required, tag = "6")]
968    pub is_recurring: bool,
969    /// Amount of seconds from 00:00:00 of the holiday day when holiday actually starts.
970    #[prost(int32, optional, tag = "7")]
971    pub start_second: ::core::option::Option<i32>,
972    /// Amount of seconds from 00:00:00 of the holiday day when holiday actually finishes.
973    #[prost(int32, optional, tag = "8")]
974    pub end_second: ::core::option::Option<i32>,
975}
976#[derive(serde::Serialize, serde::Deserialize)]
977#[derive(Clone, PartialEq, ::prost::Message)]
978pub struct ProtoOaDynamicLeverage {
979    /// Unique ID of dynamic leverage.
980    #[prost(int64, required, tag = "1")]
981    pub leverage_id: i64,
982    /// Tiers sorted by volume. Last tier's leverage is applied also to volume above specified.
983    #[prost(message, repeated, tag = "2")]
984    pub tiers: ::prost::alloc::vec::Vec<ProtoOaDynamicLeverageTier>,
985}
986#[derive(serde::Serialize, serde::Deserialize)]
987#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
988pub struct ProtoOaDynamicLeverageTier {
989    /// Max USD volume (in cents) of the Open Position (per side) to apply specified leverage. Last tier's leverage is applied also to volume above specified.
990    #[prost(int64, required, tag = "1")]
991    pub volume: i64,
992    /// Applied leverage.
993    #[prost(int32, required, tag = "2")]
994    pub leverage: i32,
995}
996#[derive(serde::Serialize, serde::Deserialize)]
997#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
998pub struct ProtoOaPositionUnrealizedPnL {
999    /// The position ID.
1000    #[prost(int64, required, tag = "1")]
1001    pub position_id: i64,
1002    /// The gross unrealized PnL of the position denoted in the account deposit currency.
1003    #[prost(int64, required, tag = "2")]
1004    pub gross_unrealized_pn_l: i64,
1005    /// The net unrealized PnL of the position denoted in the account deposit currency. It does not include potential closing commission.
1006    #[prost(int64, required, tag = "3")]
1007    pub net_unrealized_pn_l: i64,
1008}
1009#[derive(serde::Serialize, serde::Deserialize)]
1010#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1011#[repr(i32)]
1012pub enum ProtoOaPayloadType {
1013    ProtoOaApplicationAuthReq = 2100,
1014    ProtoOaApplicationAuthRes = 2101,
1015    ProtoOaAccountAuthReq = 2102,
1016    ProtoOaAccountAuthRes = 2103,
1017    ProtoOaVersionReq = 2104,
1018    ProtoOaVersionRes = 2105,
1019    ProtoOaNewOrderReq = 2106,
1020    ProtoOaTrailingSlChangedEvent = 2107,
1021    ProtoOaCancelOrderReq = 2108,
1022    ProtoOaAmendOrderReq = 2109,
1023    ProtoOaAmendPositionSltpReq = 2110,
1024    ProtoOaClosePositionReq = 2111,
1025    ProtoOaAssetListReq = 2112,
1026    ProtoOaAssetListRes = 2113,
1027    ProtoOaSymbolsListReq = 2114,
1028    ProtoOaSymbolsListRes = 2115,
1029    ProtoOaSymbolByIdReq = 2116,
1030    ProtoOaSymbolByIdRes = 2117,
1031    ProtoOaSymbolsForConversionReq = 2118,
1032    ProtoOaSymbolsForConversionRes = 2119,
1033    ProtoOaSymbolChangedEvent = 2120,
1034    ProtoOaTraderReq = 2121,
1035    ProtoOaTraderRes = 2122,
1036    ProtoOaTraderUpdateEvent = 2123,
1037    ProtoOaReconcileReq = 2124,
1038    ProtoOaReconcileRes = 2125,
1039    ProtoOaExecutionEvent = 2126,
1040    ProtoOaSubscribeSpotsReq = 2127,
1041    ProtoOaSubscribeSpotsRes = 2128,
1042    ProtoOaUnsubscribeSpotsReq = 2129,
1043    ProtoOaUnsubscribeSpotsRes = 2130,
1044    ProtoOaSpotEvent = 2131,
1045    ProtoOaOrderErrorEvent = 2132,
1046    ProtoOaDealListReq = 2133,
1047    ProtoOaDealListRes = 2134,
1048    ProtoOaSubscribeLiveTrendbarReq = 2135,
1049    ProtoOaUnsubscribeLiveTrendbarReq = 2136,
1050    ProtoOaGetTrendbarsReq = 2137,
1051    ProtoOaGetTrendbarsRes = 2138,
1052    ProtoOaExpectedMarginReq = 2139,
1053    ProtoOaExpectedMarginRes = 2140,
1054    ProtoOaMarginChangedEvent = 2141,
1055    ProtoOaErrorRes = 2142,
1056    ProtoOaCashFlowHistoryListReq = 2143,
1057    ProtoOaCashFlowHistoryListRes = 2144,
1058    ProtoOaGetTickdataReq = 2145,
1059    ProtoOaGetTickdataRes = 2146,
1060    ProtoOaAccountsTokenInvalidatedEvent = 2147,
1061    ProtoOaClientDisconnectEvent = 2148,
1062    ProtoOaGetAccountsByAccessTokenReq = 2149,
1063    ProtoOaGetAccountsByAccessTokenRes = 2150,
1064    ProtoOaGetCtidProfileByTokenReq = 2151,
1065    ProtoOaGetCtidProfileByTokenRes = 2152,
1066    ProtoOaAssetClassListReq = 2153,
1067    ProtoOaAssetClassListRes = 2154,
1068    ProtoOaDepthEvent = 2155,
1069    ProtoOaSubscribeDepthQuotesReq = 2156,
1070    ProtoOaSubscribeDepthQuotesRes = 2157,
1071    ProtoOaUnsubscribeDepthQuotesReq = 2158,
1072    ProtoOaUnsubscribeDepthQuotesRes = 2159,
1073    ProtoOaSymbolCategoryReq = 2160,
1074    ProtoOaSymbolCategoryRes = 2161,
1075    ProtoOaAccountLogoutReq = 2162,
1076    ProtoOaAccountLogoutRes = 2163,
1077    ProtoOaAccountDisconnectEvent = 2164,
1078    ProtoOaSubscribeLiveTrendbarRes = 2165,
1079    ProtoOaUnsubscribeLiveTrendbarRes = 2166,
1080    ProtoOaMarginCallListReq = 2167,
1081    ProtoOaMarginCallListRes = 2168,
1082    ProtoOaMarginCallUpdateReq = 2169,
1083    ProtoOaMarginCallUpdateRes = 2170,
1084    ProtoOaMarginCallUpdateEvent = 2171,
1085    ProtoOaMarginCallTriggerEvent = 2172,
1086    ProtoOaRefreshTokenReq = 2173,
1087    ProtoOaRefreshTokenRes = 2174,
1088    ProtoOaOrderListReq = 2175,
1089    ProtoOaOrderListRes = 2176,
1090    ProtoOaGetDynamicLeverageReq = 2177,
1091    ProtoOaGetDynamicLeverageRes = 2178,
1092    ProtoOaDealListByPositionIdReq = 2179,
1093    ProtoOaDealListByPositionIdRes = 2180,
1094    ProtoOaOrderDetailsReq = 2181,
1095    ProtoOaOrderDetailsRes = 2182,
1096    ProtoOaOrderListByPositionIdReq = 2183,
1097    ProtoOaOrderListByPositionIdRes = 2184,
1098    ProtoOaDealOffsetListReq = 2185,
1099    ProtoOaDealOffsetListRes = 2186,
1100    ProtoOaGetPositionUnrealizedPnlReq = 2187,
1101    ProtoOaGetPositionUnrealizedPnlRes = 2188,
1102}
1103impl ProtoOaPayloadType {
1104    /// String value of the enum field names used in the ProtoBuf definition.
1105    ///
1106    /// The values are not transformed in any way and thus are considered stable
1107    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1108    pub fn as_str_name(&self) -> &'static str {
1109        match self {
1110            Self::ProtoOaApplicationAuthReq => "PROTO_OA_APPLICATION_AUTH_REQ",
1111            Self::ProtoOaApplicationAuthRes => "PROTO_OA_APPLICATION_AUTH_RES",
1112            Self::ProtoOaAccountAuthReq => "PROTO_OA_ACCOUNT_AUTH_REQ",
1113            Self::ProtoOaAccountAuthRes => "PROTO_OA_ACCOUNT_AUTH_RES",
1114            Self::ProtoOaVersionReq => "PROTO_OA_VERSION_REQ",
1115            Self::ProtoOaVersionRes => "PROTO_OA_VERSION_RES",
1116            Self::ProtoOaNewOrderReq => "PROTO_OA_NEW_ORDER_REQ",
1117            Self::ProtoOaTrailingSlChangedEvent => "PROTO_OA_TRAILING_SL_CHANGED_EVENT",
1118            Self::ProtoOaCancelOrderReq => "PROTO_OA_CANCEL_ORDER_REQ",
1119            Self::ProtoOaAmendOrderReq => "PROTO_OA_AMEND_ORDER_REQ",
1120            Self::ProtoOaAmendPositionSltpReq => "PROTO_OA_AMEND_POSITION_SLTP_REQ",
1121            Self::ProtoOaClosePositionReq => "PROTO_OA_CLOSE_POSITION_REQ",
1122            Self::ProtoOaAssetListReq => "PROTO_OA_ASSET_LIST_REQ",
1123            Self::ProtoOaAssetListRes => "PROTO_OA_ASSET_LIST_RES",
1124            Self::ProtoOaSymbolsListReq => "PROTO_OA_SYMBOLS_LIST_REQ",
1125            Self::ProtoOaSymbolsListRes => "PROTO_OA_SYMBOLS_LIST_RES",
1126            Self::ProtoOaSymbolByIdReq => "PROTO_OA_SYMBOL_BY_ID_REQ",
1127            Self::ProtoOaSymbolByIdRes => "PROTO_OA_SYMBOL_BY_ID_RES",
1128            Self::ProtoOaSymbolsForConversionReq => "PROTO_OA_SYMBOLS_FOR_CONVERSION_REQ",
1129            Self::ProtoOaSymbolsForConversionRes => "PROTO_OA_SYMBOLS_FOR_CONVERSION_RES",
1130            Self::ProtoOaSymbolChangedEvent => "PROTO_OA_SYMBOL_CHANGED_EVENT",
1131            Self::ProtoOaTraderReq => "PROTO_OA_TRADER_REQ",
1132            Self::ProtoOaTraderRes => "PROTO_OA_TRADER_RES",
1133            Self::ProtoOaTraderUpdateEvent => "PROTO_OA_TRADER_UPDATE_EVENT",
1134            Self::ProtoOaReconcileReq => "PROTO_OA_RECONCILE_REQ",
1135            Self::ProtoOaReconcileRes => "PROTO_OA_RECONCILE_RES",
1136            Self::ProtoOaExecutionEvent => "PROTO_OA_EXECUTION_EVENT",
1137            Self::ProtoOaSubscribeSpotsReq => "PROTO_OA_SUBSCRIBE_SPOTS_REQ",
1138            Self::ProtoOaSubscribeSpotsRes => "PROTO_OA_SUBSCRIBE_SPOTS_RES",
1139            Self::ProtoOaUnsubscribeSpotsReq => "PROTO_OA_UNSUBSCRIBE_SPOTS_REQ",
1140            Self::ProtoOaUnsubscribeSpotsRes => "PROTO_OA_UNSUBSCRIBE_SPOTS_RES",
1141            Self::ProtoOaSpotEvent => "PROTO_OA_SPOT_EVENT",
1142            Self::ProtoOaOrderErrorEvent => "PROTO_OA_ORDER_ERROR_EVENT",
1143            Self::ProtoOaDealListReq => "PROTO_OA_DEAL_LIST_REQ",
1144            Self::ProtoOaDealListRes => "PROTO_OA_DEAL_LIST_RES",
1145            Self::ProtoOaSubscribeLiveTrendbarReq => {
1146                "PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_REQ"
1147            }
1148            Self::ProtoOaUnsubscribeLiveTrendbarReq => {
1149                "PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_REQ"
1150            }
1151            Self::ProtoOaGetTrendbarsReq => "PROTO_OA_GET_TRENDBARS_REQ",
1152            Self::ProtoOaGetTrendbarsRes => "PROTO_OA_GET_TRENDBARS_RES",
1153            Self::ProtoOaExpectedMarginReq => "PROTO_OA_EXPECTED_MARGIN_REQ",
1154            Self::ProtoOaExpectedMarginRes => "PROTO_OA_EXPECTED_MARGIN_RES",
1155            Self::ProtoOaMarginChangedEvent => "PROTO_OA_MARGIN_CHANGED_EVENT",
1156            Self::ProtoOaErrorRes => "PROTO_OA_ERROR_RES",
1157            Self::ProtoOaCashFlowHistoryListReq => "PROTO_OA_CASH_FLOW_HISTORY_LIST_REQ",
1158            Self::ProtoOaCashFlowHistoryListRes => "PROTO_OA_CASH_FLOW_HISTORY_LIST_RES",
1159            Self::ProtoOaGetTickdataReq => "PROTO_OA_GET_TICKDATA_REQ",
1160            Self::ProtoOaGetTickdataRes => "PROTO_OA_GET_TICKDATA_RES",
1161            Self::ProtoOaAccountsTokenInvalidatedEvent => {
1162                "PROTO_OA_ACCOUNTS_TOKEN_INVALIDATED_EVENT"
1163            }
1164            Self::ProtoOaClientDisconnectEvent => "PROTO_OA_CLIENT_DISCONNECT_EVENT",
1165            Self::ProtoOaGetAccountsByAccessTokenReq => {
1166                "PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_REQ"
1167            }
1168            Self::ProtoOaGetAccountsByAccessTokenRes => {
1169                "PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_RES"
1170            }
1171            Self::ProtoOaGetCtidProfileByTokenReq => {
1172                "PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_REQ"
1173            }
1174            Self::ProtoOaGetCtidProfileByTokenRes => {
1175                "PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_RES"
1176            }
1177            Self::ProtoOaAssetClassListReq => "PROTO_OA_ASSET_CLASS_LIST_REQ",
1178            Self::ProtoOaAssetClassListRes => "PROTO_OA_ASSET_CLASS_LIST_RES",
1179            Self::ProtoOaDepthEvent => "PROTO_OA_DEPTH_EVENT",
1180            Self::ProtoOaSubscribeDepthQuotesReq => "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_REQ",
1181            Self::ProtoOaSubscribeDepthQuotesRes => "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_RES",
1182            Self::ProtoOaUnsubscribeDepthQuotesReq => {
1183                "PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_REQ"
1184            }
1185            Self::ProtoOaUnsubscribeDepthQuotesRes => {
1186                "PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_RES"
1187            }
1188            Self::ProtoOaSymbolCategoryReq => "PROTO_OA_SYMBOL_CATEGORY_REQ",
1189            Self::ProtoOaSymbolCategoryRes => "PROTO_OA_SYMBOL_CATEGORY_RES",
1190            Self::ProtoOaAccountLogoutReq => "PROTO_OA_ACCOUNT_LOGOUT_REQ",
1191            Self::ProtoOaAccountLogoutRes => "PROTO_OA_ACCOUNT_LOGOUT_RES",
1192            Self::ProtoOaAccountDisconnectEvent => "PROTO_OA_ACCOUNT_DISCONNECT_EVENT",
1193            Self::ProtoOaSubscribeLiveTrendbarRes => {
1194                "PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_RES"
1195            }
1196            Self::ProtoOaUnsubscribeLiveTrendbarRes => {
1197                "PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_RES"
1198            }
1199            Self::ProtoOaMarginCallListReq => "PROTO_OA_MARGIN_CALL_LIST_REQ",
1200            Self::ProtoOaMarginCallListRes => "PROTO_OA_MARGIN_CALL_LIST_RES",
1201            Self::ProtoOaMarginCallUpdateReq => "PROTO_OA_MARGIN_CALL_UPDATE_REQ",
1202            Self::ProtoOaMarginCallUpdateRes => "PROTO_OA_MARGIN_CALL_UPDATE_RES",
1203            Self::ProtoOaMarginCallUpdateEvent => "PROTO_OA_MARGIN_CALL_UPDATE_EVENT",
1204            Self::ProtoOaMarginCallTriggerEvent => "PROTO_OA_MARGIN_CALL_TRIGGER_EVENT",
1205            Self::ProtoOaRefreshTokenReq => "PROTO_OA_REFRESH_TOKEN_REQ",
1206            Self::ProtoOaRefreshTokenRes => "PROTO_OA_REFRESH_TOKEN_RES",
1207            Self::ProtoOaOrderListReq => "PROTO_OA_ORDER_LIST_REQ",
1208            Self::ProtoOaOrderListRes => "PROTO_OA_ORDER_LIST_RES",
1209            Self::ProtoOaGetDynamicLeverageReq => "PROTO_OA_GET_DYNAMIC_LEVERAGE_REQ",
1210            Self::ProtoOaGetDynamicLeverageRes => "PROTO_OA_GET_DYNAMIC_LEVERAGE_RES",
1211            Self::ProtoOaDealListByPositionIdReq => {
1212                "PROTO_OA_DEAL_LIST_BY_POSITION_ID_REQ"
1213            }
1214            Self::ProtoOaDealListByPositionIdRes => {
1215                "PROTO_OA_DEAL_LIST_BY_POSITION_ID_RES"
1216            }
1217            Self::ProtoOaOrderDetailsReq => "PROTO_OA_ORDER_DETAILS_REQ",
1218            Self::ProtoOaOrderDetailsRes => "PROTO_OA_ORDER_DETAILS_RES",
1219            Self::ProtoOaOrderListByPositionIdReq => {
1220                "PROTO_OA_ORDER_LIST_BY_POSITION_ID_REQ"
1221            }
1222            Self::ProtoOaOrderListByPositionIdRes => {
1223                "PROTO_OA_ORDER_LIST_BY_POSITION_ID_RES"
1224            }
1225            Self::ProtoOaDealOffsetListReq => "PROTO_OA_DEAL_OFFSET_LIST_REQ",
1226            Self::ProtoOaDealOffsetListRes => "PROTO_OA_DEAL_OFFSET_LIST_RES",
1227            Self::ProtoOaGetPositionUnrealizedPnlReq => {
1228                "PROTO_OA_GET_POSITION_UNREALIZED_PNL_REQ"
1229            }
1230            Self::ProtoOaGetPositionUnrealizedPnlRes => {
1231                "PROTO_OA_GET_POSITION_UNREALIZED_PNL_RES"
1232            }
1233        }
1234    }
1235    /// Creates an enum from field names used in the ProtoBuf definition.
1236    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1237        match value {
1238            "PROTO_OA_APPLICATION_AUTH_REQ" => Some(Self::ProtoOaApplicationAuthReq),
1239            "PROTO_OA_APPLICATION_AUTH_RES" => Some(Self::ProtoOaApplicationAuthRes),
1240            "PROTO_OA_ACCOUNT_AUTH_REQ" => Some(Self::ProtoOaAccountAuthReq),
1241            "PROTO_OA_ACCOUNT_AUTH_RES" => Some(Self::ProtoOaAccountAuthRes),
1242            "PROTO_OA_VERSION_REQ" => Some(Self::ProtoOaVersionReq),
1243            "PROTO_OA_VERSION_RES" => Some(Self::ProtoOaVersionRes),
1244            "PROTO_OA_NEW_ORDER_REQ" => Some(Self::ProtoOaNewOrderReq),
1245            "PROTO_OA_TRAILING_SL_CHANGED_EVENT" => {
1246                Some(Self::ProtoOaTrailingSlChangedEvent)
1247            }
1248            "PROTO_OA_CANCEL_ORDER_REQ" => Some(Self::ProtoOaCancelOrderReq),
1249            "PROTO_OA_AMEND_ORDER_REQ" => Some(Self::ProtoOaAmendOrderReq),
1250            "PROTO_OA_AMEND_POSITION_SLTP_REQ" => Some(Self::ProtoOaAmendPositionSltpReq),
1251            "PROTO_OA_CLOSE_POSITION_REQ" => Some(Self::ProtoOaClosePositionReq),
1252            "PROTO_OA_ASSET_LIST_REQ" => Some(Self::ProtoOaAssetListReq),
1253            "PROTO_OA_ASSET_LIST_RES" => Some(Self::ProtoOaAssetListRes),
1254            "PROTO_OA_SYMBOLS_LIST_REQ" => Some(Self::ProtoOaSymbolsListReq),
1255            "PROTO_OA_SYMBOLS_LIST_RES" => Some(Self::ProtoOaSymbolsListRes),
1256            "PROTO_OA_SYMBOL_BY_ID_REQ" => Some(Self::ProtoOaSymbolByIdReq),
1257            "PROTO_OA_SYMBOL_BY_ID_RES" => Some(Self::ProtoOaSymbolByIdRes),
1258            "PROTO_OA_SYMBOLS_FOR_CONVERSION_REQ" => {
1259                Some(Self::ProtoOaSymbolsForConversionReq)
1260            }
1261            "PROTO_OA_SYMBOLS_FOR_CONVERSION_RES" => {
1262                Some(Self::ProtoOaSymbolsForConversionRes)
1263            }
1264            "PROTO_OA_SYMBOL_CHANGED_EVENT" => Some(Self::ProtoOaSymbolChangedEvent),
1265            "PROTO_OA_TRADER_REQ" => Some(Self::ProtoOaTraderReq),
1266            "PROTO_OA_TRADER_RES" => Some(Self::ProtoOaTraderRes),
1267            "PROTO_OA_TRADER_UPDATE_EVENT" => Some(Self::ProtoOaTraderUpdateEvent),
1268            "PROTO_OA_RECONCILE_REQ" => Some(Self::ProtoOaReconcileReq),
1269            "PROTO_OA_RECONCILE_RES" => Some(Self::ProtoOaReconcileRes),
1270            "PROTO_OA_EXECUTION_EVENT" => Some(Self::ProtoOaExecutionEvent),
1271            "PROTO_OA_SUBSCRIBE_SPOTS_REQ" => Some(Self::ProtoOaSubscribeSpotsReq),
1272            "PROTO_OA_SUBSCRIBE_SPOTS_RES" => Some(Self::ProtoOaSubscribeSpotsRes),
1273            "PROTO_OA_UNSUBSCRIBE_SPOTS_REQ" => Some(Self::ProtoOaUnsubscribeSpotsReq),
1274            "PROTO_OA_UNSUBSCRIBE_SPOTS_RES" => Some(Self::ProtoOaUnsubscribeSpotsRes),
1275            "PROTO_OA_SPOT_EVENT" => Some(Self::ProtoOaSpotEvent),
1276            "PROTO_OA_ORDER_ERROR_EVENT" => Some(Self::ProtoOaOrderErrorEvent),
1277            "PROTO_OA_DEAL_LIST_REQ" => Some(Self::ProtoOaDealListReq),
1278            "PROTO_OA_DEAL_LIST_RES" => Some(Self::ProtoOaDealListRes),
1279            "PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_REQ" => {
1280                Some(Self::ProtoOaSubscribeLiveTrendbarReq)
1281            }
1282            "PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_REQ" => {
1283                Some(Self::ProtoOaUnsubscribeLiveTrendbarReq)
1284            }
1285            "PROTO_OA_GET_TRENDBARS_REQ" => Some(Self::ProtoOaGetTrendbarsReq),
1286            "PROTO_OA_GET_TRENDBARS_RES" => Some(Self::ProtoOaGetTrendbarsRes),
1287            "PROTO_OA_EXPECTED_MARGIN_REQ" => Some(Self::ProtoOaExpectedMarginReq),
1288            "PROTO_OA_EXPECTED_MARGIN_RES" => Some(Self::ProtoOaExpectedMarginRes),
1289            "PROTO_OA_MARGIN_CHANGED_EVENT" => Some(Self::ProtoOaMarginChangedEvent),
1290            "PROTO_OA_ERROR_RES" => Some(Self::ProtoOaErrorRes),
1291            "PROTO_OA_CASH_FLOW_HISTORY_LIST_REQ" => {
1292                Some(Self::ProtoOaCashFlowHistoryListReq)
1293            }
1294            "PROTO_OA_CASH_FLOW_HISTORY_LIST_RES" => {
1295                Some(Self::ProtoOaCashFlowHistoryListRes)
1296            }
1297            "PROTO_OA_GET_TICKDATA_REQ" => Some(Self::ProtoOaGetTickdataReq),
1298            "PROTO_OA_GET_TICKDATA_RES" => Some(Self::ProtoOaGetTickdataRes),
1299            "PROTO_OA_ACCOUNTS_TOKEN_INVALIDATED_EVENT" => {
1300                Some(Self::ProtoOaAccountsTokenInvalidatedEvent)
1301            }
1302            "PROTO_OA_CLIENT_DISCONNECT_EVENT" => {
1303                Some(Self::ProtoOaClientDisconnectEvent)
1304            }
1305            "PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_REQ" => {
1306                Some(Self::ProtoOaGetAccountsByAccessTokenReq)
1307            }
1308            "PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_RES" => {
1309                Some(Self::ProtoOaGetAccountsByAccessTokenRes)
1310            }
1311            "PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_REQ" => {
1312                Some(Self::ProtoOaGetCtidProfileByTokenReq)
1313            }
1314            "PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_RES" => {
1315                Some(Self::ProtoOaGetCtidProfileByTokenRes)
1316            }
1317            "PROTO_OA_ASSET_CLASS_LIST_REQ" => Some(Self::ProtoOaAssetClassListReq),
1318            "PROTO_OA_ASSET_CLASS_LIST_RES" => Some(Self::ProtoOaAssetClassListRes),
1319            "PROTO_OA_DEPTH_EVENT" => Some(Self::ProtoOaDepthEvent),
1320            "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_REQ" => {
1321                Some(Self::ProtoOaSubscribeDepthQuotesReq)
1322            }
1323            "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_RES" => {
1324                Some(Self::ProtoOaSubscribeDepthQuotesRes)
1325            }
1326            "PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_REQ" => {
1327                Some(Self::ProtoOaUnsubscribeDepthQuotesReq)
1328            }
1329            "PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_RES" => {
1330                Some(Self::ProtoOaUnsubscribeDepthQuotesRes)
1331            }
1332            "PROTO_OA_SYMBOL_CATEGORY_REQ" => Some(Self::ProtoOaSymbolCategoryReq),
1333            "PROTO_OA_SYMBOL_CATEGORY_RES" => Some(Self::ProtoOaSymbolCategoryRes),
1334            "PROTO_OA_ACCOUNT_LOGOUT_REQ" => Some(Self::ProtoOaAccountLogoutReq),
1335            "PROTO_OA_ACCOUNT_LOGOUT_RES" => Some(Self::ProtoOaAccountLogoutRes),
1336            "PROTO_OA_ACCOUNT_DISCONNECT_EVENT" => {
1337                Some(Self::ProtoOaAccountDisconnectEvent)
1338            }
1339            "PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_RES" => {
1340                Some(Self::ProtoOaSubscribeLiveTrendbarRes)
1341            }
1342            "PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_RES" => {
1343                Some(Self::ProtoOaUnsubscribeLiveTrendbarRes)
1344            }
1345            "PROTO_OA_MARGIN_CALL_LIST_REQ" => Some(Self::ProtoOaMarginCallListReq),
1346            "PROTO_OA_MARGIN_CALL_LIST_RES" => Some(Self::ProtoOaMarginCallListRes),
1347            "PROTO_OA_MARGIN_CALL_UPDATE_REQ" => Some(Self::ProtoOaMarginCallUpdateReq),
1348            "PROTO_OA_MARGIN_CALL_UPDATE_RES" => Some(Self::ProtoOaMarginCallUpdateRes),
1349            "PROTO_OA_MARGIN_CALL_UPDATE_EVENT" => {
1350                Some(Self::ProtoOaMarginCallUpdateEvent)
1351            }
1352            "PROTO_OA_MARGIN_CALL_TRIGGER_EVENT" => {
1353                Some(Self::ProtoOaMarginCallTriggerEvent)
1354            }
1355            "PROTO_OA_REFRESH_TOKEN_REQ" => Some(Self::ProtoOaRefreshTokenReq),
1356            "PROTO_OA_REFRESH_TOKEN_RES" => Some(Self::ProtoOaRefreshTokenRes),
1357            "PROTO_OA_ORDER_LIST_REQ" => Some(Self::ProtoOaOrderListReq),
1358            "PROTO_OA_ORDER_LIST_RES" => Some(Self::ProtoOaOrderListRes),
1359            "PROTO_OA_GET_DYNAMIC_LEVERAGE_REQ" => {
1360                Some(Self::ProtoOaGetDynamicLeverageReq)
1361            }
1362            "PROTO_OA_GET_DYNAMIC_LEVERAGE_RES" => {
1363                Some(Self::ProtoOaGetDynamicLeverageRes)
1364            }
1365            "PROTO_OA_DEAL_LIST_BY_POSITION_ID_REQ" => {
1366                Some(Self::ProtoOaDealListByPositionIdReq)
1367            }
1368            "PROTO_OA_DEAL_LIST_BY_POSITION_ID_RES" => {
1369                Some(Self::ProtoOaDealListByPositionIdRes)
1370            }
1371            "PROTO_OA_ORDER_DETAILS_REQ" => Some(Self::ProtoOaOrderDetailsReq),
1372            "PROTO_OA_ORDER_DETAILS_RES" => Some(Self::ProtoOaOrderDetailsRes),
1373            "PROTO_OA_ORDER_LIST_BY_POSITION_ID_REQ" => {
1374                Some(Self::ProtoOaOrderListByPositionIdReq)
1375            }
1376            "PROTO_OA_ORDER_LIST_BY_POSITION_ID_RES" => {
1377                Some(Self::ProtoOaOrderListByPositionIdRes)
1378            }
1379            "PROTO_OA_DEAL_OFFSET_LIST_REQ" => Some(Self::ProtoOaDealOffsetListReq),
1380            "PROTO_OA_DEAL_OFFSET_LIST_RES" => Some(Self::ProtoOaDealOffsetListRes),
1381            "PROTO_OA_GET_POSITION_UNREALIZED_PNL_REQ" => {
1382                Some(Self::ProtoOaGetPositionUnrealizedPnlReq)
1383            }
1384            "PROTO_OA_GET_POSITION_UNREALIZED_PNL_RES" => {
1385                Some(Self::ProtoOaGetPositionUnrealizedPnlRes)
1386            }
1387            _ => None,
1388        }
1389    }
1390}
1391#[derive(serde::Serialize, serde::Deserialize)]
1392#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1393#[repr(i32)]
1394pub enum ProtoOaDayOfWeek {
1395    None = 0,
1396    Monday = 1,
1397    Tuesday = 2,
1398    Wednesday = 3,
1399    Thursday = 4,
1400    Friday = 5,
1401    Saturday = 6,
1402    Sunday = 7,
1403}
1404impl ProtoOaDayOfWeek {
1405    /// String value of the enum field names used in the ProtoBuf definition.
1406    ///
1407    /// The values are not transformed in any way and thus are considered stable
1408    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1409    pub fn as_str_name(&self) -> &'static str {
1410        match self {
1411            Self::None => "NONE",
1412            Self::Monday => "MONDAY",
1413            Self::Tuesday => "TUESDAY",
1414            Self::Wednesday => "WEDNESDAY",
1415            Self::Thursday => "THURSDAY",
1416            Self::Friday => "FRIDAY",
1417            Self::Saturday => "SATURDAY",
1418            Self::Sunday => "SUNDAY",
1419        }
1420    }
1421    /// Creates an enum from field names used in the ProtoBuf definition.
1422    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1423        match value {
1424            "NONE" => Some(Self::None),
1425            "MONDAY" => Some(Self::Monday),
1426            "TUESDAY" => Some(Self::Tuesday),
1427            "WEDNESDAY" => Some(Self::Wednesday),
1428            "THURSDAY" => Some(Self::Thursday),
1429            "FRIDAY" => Some(Self::Friday),
1430            "SATURDAY" => Some(Self::Saturday),
1431            "SUNDAY" => Some(Self::Sunday),
1432            _ => None,
1433        }
1434    }
1435}
1436/// * Enum for specifying type of trading commission.
1437#[derive(serde::Serialize, serde::Deserialize)]
1438#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1439#[repr(i32)]
1440pub enum ProtoOaCommissionType {
1441    /// USD per million USD volume - usually used for FX. Example: 50 USD for 1 mil USD of trading volume.
1442    UsdPerMillionUsd = 1,
1443    /// USD per 1 lot - usually used for CFDs and futures for commodities, and indices. Example: 15 USD for 1 contract.
1444    UsdPerLot = 2,
1445    /// Percentage of trading volume - usually used for Equities. Example: 0.005% of notional trading volume. Multiplied by 100,000.
1446    PercentageOfValue = 3,
1447    /// Quote ccy of Symbol per 1 lot - will be used for CFDs and futures for commodities, and indices. Example: 15 EUR for 1 contract of DAX.
1448    QuoteCcyPerLot = 4,
1449}
1450impl ProtoOaCommissionType {
1451    /// String value of the enum field names used in the ProtoBuf definition.
1452    ///
1453    /// The values are not transformed in any way and thus are considered stable
1454    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1455    pub fn as_str_name(&self) -> &'static str {
1456        match self {
1457            Self::UsdPerMillionUsd => "USD_PER_MILLION_USD",
1458            Self::UsdPerLot => "USD_PER_LOT",
1459            Self::PercentageOfValue => "PERCENTAGE_OF_VALUE",
1460            Self::QuoteCcyPerLot => "QUOTE_CCY_PER_LOT",
1461        }
1462    }
1463    /// Creates an enum from field names used in the ProtoBuf definition.
1464    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1465        match value {
1466            "USD_PER_MILLION_USD" => Some(Self::UsdPerMillionUsd),
1467            "USD_PER_LOT" => Some(Self::UsdPerLot),
1468            "PERCENTAGE_OF_VALUE" => Some(Self::PercentageOfValue),
1469            "QUOTE_CCY_PER_LOT" => Some(Self::QuoteCcyPerLot),
1470            _ => None,
1471        }
1472    }
1473}
1474/// * Enum for specifying stop loss and take profit distances.
1475#[derive(serde::Serialize, serde::Deserialize)]
1476#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1477#[repr(i32)]
1478pub enum ProtoOaSymbolDistanceType {
1479    SymbolDistanceInPoints = 1,
1480    SymbolDistanceInPercentage = 2,
1481}
1482impl ProtoOaSymbolDistanceType {
1483    /// String value of the enum field names used in the ProtoBuf definition.
1484    ///
1485    /// The values are not transformed in any way and thus are considered stable
1486    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1487    pub fn as_str_name(&self) -> &'static str {
1488        match self {
1489            Self::SymbolDistanceInPoints => "SYMBOL_DISTANCE_IN_POINTS",
1490            Self::SymbolDistanceInPercentage => "SYMBOL_DISTANCE_IN_PERCENTAGE",
1491        }
1492    }
1493    /// Creates an enum from field names used in the ProtoBuf definition.
1494    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1495        match value {
1496            "SYMBOL_DISTANCE_IN_POINTS" => Some(Self::SymbolDistanceInPoints),
1497            "SYMBOL_DISTANCE_IN_PERCENTAGE" => Some(Self::SymbolDistanceInPercentage),
1498            _ => None,
1499        }
1500    }
1501}
1502/// * Enum for specifying type of minimum trading commission.
1503#[derive(serde::Serialize, serde::Deserialize)]
1504#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1505#[repr(i32)]
1506pub enum ProtoOaMinCommissionType {
1507    Currency = 1,
1508    QuoteCurrency = 2,
1509}
1510impl ProtoOaMinCommissionType {
1511    /// String value of the enum field names used in the ProtoBuf definition.
1512    ///
1513    /// The values are not transformed in any way and thus are considered stable
1514    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1515    pub fn as_str_name(&self) -> &'static str {
1516        match self {
1517            Self::Currency => "CURRENCY",
1518            Self::QuoteCurrency => "QUOTE_CURRENCY",
1519        }
1520    }
1521    /// Creates an enum from field names used in the ProtoBuf definition.
1522    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1523        match value {
1524            "CURRENCY" => Some(Self::Currency),
1525            "QUOTE_CURRENCY" => Some(Self::QuoteCurrency),
1526            _ => None,
1527        }
1528    }
1529}
1530/// * Enum for specifying symbol trading mode.
1531#[derive(serde::Serialize, serde::Deserialize)]
1532#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1533#[repr(i32)]
1534pub enum ProtoOaTradingMode {
1535    Enabled = 0,
1536    DisabledWithoutPendingsExecution = 1,
1537    DisabledWithPendingsExecution = 2,
1538    CloseOnlyMode = 3,
1539}
1540impl ProtoOaTradingMode {
1541    /// String value of the enum field names used in the ProtoBuf definition.
1542    ///
1543    /// The values are not transformed in any way and thus are considered stable
1544    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1545    pub fn as_str_name(&self) -> &'static str {
1546        match self {
1547            Self::Enabled => "ENABLED",
1548            Self::DisabledWithoutPendingsExecution => {
1549                "DISABLED_WITHOUT_PENDINGS_EXECUTION"
1550            }
1551            Self::DisabledWithPendingsExecution => "DISABLED_WITH_PENDINGS_EXECUTION",
1552            Self::CloseOnlyMode => "CLOSE_ONLY_MODE",
1553        }
1554    }
1555    /// Creates an enum from field names used in the ProtoBuf definition.
1556    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1557        match value {
1558            "ENABLED" => Some(Self::Enabled),
1559            "DISABLED_WITHOUT_PENDINGS_EXECUTION" => {
1560                Some(Self::DisabledWithoutPendingsExecution)
1561            }
1562            "DISABLED_WITH_PENDINGS_EXECUTION" => {
1563                Some(Self::DisabledWithPendingsExecution)
1564            }
1565            "CLOSE_ONLY_MODE" => Some(Self::CloseOnlyMode),
1566            _ => None,
1567        }
1568    }
1569}
1570/// * Enum for specifying SWAP calculation type for symbol.
1571#[derive(serde::Serialize, serde::Deserialize)]
1572#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1573#[repr(i32)]
1574pub enum ProtoOaSwapCalculationType {
1575    /// Specifies type of SWAP computation as PIPS (0)
1576    Pips = 0,
1577    /// Specifies type of SWAP computation as PERCENTAGE (1, annual, in percent)
1578    Percentage = 1,
1579    /// Specifies type of SWAP computation as POINTS (2)
1580    Points = 2,
1581}
1582impl ProtoOaSwapCalculationType {
1583    /// String value of the enum field names used in the ProtoBuf definition.
1584    ///
1585    /// The values are not transformed in any way and thus are considered stable
1586    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1587    pub fn as_str_name(&self) -> &'static str {
1588        match self {
1589            Self::Pips => "PIPS",
1590            Self::Percentage => "PERCENTAGE",
1591            Self::Points => "POINTS",
1592        }
1593    }
1594    /// Creates an enum from field names used in the ProtoBuf definition.
1595    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1596        match value {
1597            "PIPS" => Some(Self::Pips),
1598            "PERCENTAGE" => Some(Self::Percentage),
1599            "POINTS" => Some(Self::Points),
1600            _ => None,
1601        }
1602    }
1603}
1604/// * Enum for specifying access right for a trader.
1605#[derive(serde::Serialize, serde::Deserialize)]
1606#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1607#[repr(i32)]
1608pub enum ProtoOaAccessRights {
1609    /// Enable all trading.
1610    FullAccess = 0,
1611    /// Only closing trading request are enabled.
1612    CloseOnly = 1,
1613    /// View only access.
1614    NoTrading = 2,
1615    /// No access.
1616    NoLogin = 3,
1617}
1618impl ProtoOaAccessRights {
1619    /// String value of the enum field names used in the ProtoBuf definition.
1620    ///
1621    /// The values are not transformed in any way and thus are considered stable
1622    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1623    pub fn as_str_name(&self) -> &'static str {
1624        match self {
1625            Self::FullAccess => "FULL_ACCESS",
1626            Self::CloseOnly => "CLOSE_ONLY",
1627            Self::NoTrading => "NO_TRADING",
1628            Self::NoLogin => "NO_LOGIN",
1629        }
1630    }
1631    /// Creates an enum from field names used in the ProtoBuf definition.
1632    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1633        match value {
1634            "FULL_ACCESS" => Some(Self::FullAccess),
1635            "CLOSE_ONLY" => Some(Self::CloseOnly),
1636            "NO_TRADING" => Some(Self::NoTrading),
1637            "NO_LOGIN" => Some(Self::NoLogin),
1638            _ => None,
1639        }
1640    }
1641}
1642/// * Enum for specifying margin calculation type for an account.
1643#[derive(serde::Serialize, serde::Deserialize)]
1644#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1645#[repr(i32)]
1646pub enum ProtoOaTotalMarginCalculationType {
1647    Max = 0,
1648    Sum = 1,
1649    Net = 2,
1650}
1651impl ProtoOaTotalMarginCalculationType {
1652    /// String value of the enum field names used in the ProtoBuf definition.
1653    ///
1654    /// The values are not transformed in any way and thus are considered stable
1655    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1656    pub fn as_str_name(&self) -> &'static str {
1657        match self {
1658            Self::Max => "MAX",
1659            Self::Sum => "SUM",
1660            Self::Net => "NET",
1661        }
1662    }
1663    /// Creates an enum from field names used in the ProtoBuf definition.
1664    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1665        match value {
1666            "MAX" => Some(Self::Max),
1667            "SUM" => Some(Self::Sum),
1668            "NET" => Some(Self::Net),
1669            _ => None,
1670        }
1671    }
1672}
1673/// * Enum for specifying type of an account.
1674#[derive(serde::Serialize, serde::Deserialize)]
1675#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1676#[repr(i32)]
1677pub enum ProtoOaAccountType {
1678    /// Allows multiple positions on a trading account for a symbol.
1679    Hedged = 0,
1680    /// Only one position per symbol is allowed on a trading account.
1681    Netted = 1,
1682    /// Spread betting type account.
1683    SpreadBetting = 2,
1684}
1685impl ProtoOaAccountType {
1686    /// String value of the enum field names used in the ProtoBuf definition.
1687    ///
1688    /// The values are not transformed in any way and thus are considered stable
1689    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1690    pub fn as_str_name(&self) -> &'static str {
1691        match self {
1692            Self::Hedged => "HEDGED",
1693            Self::Netted => "NETTED",
1694            Self::SpreadBetting => "SPREAD_BETTING",
1695        }
1696    }
1697    /// Creates an enum from field names used in the ProtoBuf definition.
1698    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1699        match value {
1700            "HEDGED" => Some(Self::Hedged),
1701            "NETTED" => Some(Self::Netted),
1702            "SPREAD_BETTING" => Some(Self::SpreadBetting),
1703            _ => None,
1704        }
1705    }
1706}
1707/// * Position status ENUM.
1708#[derive(serde::Serialize, serde::Deserialize)]
1709#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1710#[repr(i32)]
1711pub enum ProtoOaPositionStatus {
1712    PositionStatusOpen = 1,
1713    PositionStatusClosed = 2,
1714    /// Empty position is created for pending order.
1715    PositionStatusCreated = 3,
1716    PositionStatusError = 4,
1717}
1718impl ProtoOaPositionStatus {
1719    /// String value of the enum field names used in the ProtoBuf definition.
1720    ///
1721    /// The values are not transformed in any way and thus are considered stable
1722    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1723    pub fn as_str_name(&self) -> &'static str {
1724        match self {
1725            Self::PositionStatusOpen => "POSITION_STATUS_OPEN",
1726            Self::PositionStatusClosed => "POSITION_STATUS_CLOSED",
1727            Self::PositionStatusCreated => "POSITION_STATUS_CREATED",
1728            Self::PositionStatusError => "POSITION_STATUS_ERROR",
1729        }
1730    }
1731    /// Creates an enum from field names used in the ProtoBuf definition.
1732    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1733        match value {
1734            "POSITION_STATUS_OPEN" => Some(Self::PositionStatusOpen),
1735            "POSITION_STATUS_CLOSED" => Some(Self::PositionStatusClosed),
1736            "POSITION_STATUS_CREATED" => Some(Self::PositionStatusCreated),
1737            "POSITION_STATUS_ERROR" => Some(Self::PositionStatusError),
1738            _ => None,
1739        }
1740    }
1741}
1742/// * Trader side ENUM. Used for order, position, deal.
1743#[derive(serde::Serialize, serde::Deserialize)]
1744#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1745#[repr(i32)]
1746pub enum ProtoOaTradeSide {
1747    Buy = 1,
1748    Sell = 2,
1749}
1750impl ProtoOaTradeSide {
1751    /// String value of the enum field names used in the ProtoBuf definition.
1752    ///
1753    /// The values are not transformed in any way and thus are considered stable
1754    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1755    pub fn as_str_name(&self) -> &'static str {
1756        match self {
1757            Self::Buy => "BUY",
1758            Self::Sell => "SELL",
1759        }
1760    }
1761    /// Creates an enum from field names used in the ProtoBuf definition.
1762    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1763        match value {
1764            "BUY" => Some(Self::Buy),
1765            "SELL" => Some(Self::Sell),
1766            _ => None,
1767        }
1768    }
1769}
1770/// * Order type ENUM.
1771#[derive(serde::Serialize, serde::Deserialize)]
1772#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1773#[repr(i32)]
1774pub enum ProtoOaOrderType {
1775    Market = 1,
1776    Limit = 2,
1777    Stop = 3,
1778    StopLossTakeProfit = 4,
1779    MarketRange = 5,
1780    StopLimit = 6,
1781}
1782impl ProtoOaOrderType {
1783    /// String value of the enum field names used in the ProtoBuf definition.
1784    ///
1785    /// The values are not transformed in any way and thus are considered stable
1786    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1787    pub fn as_str_name(&self) -> &'static str {
1788        match self {
1789            Self::Market => "MARKET",
1790            Self::Limit => "LIMIT",
1791            Self::Stop => "STOP",
1792            Self::StopLossTakeProfit => "STOP_LOSS_TAKE_PROFIT",
1793            Self::MarketRange => "MARKET_RANGE",
1794            Self::StopLimit => "STOP_LIMIT",
1795        }
1796    }
1797    /// Creates an enum from field names used in the ProtoBuf definition.
1798    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1799        match value {
1800            "MARKET" => Some(Self::Market),
1801            "LIMIT" => Some(Self::Limit),
1802            "STOP" => Some(Self::Stop),
1803            "STOP_LOSS_TAKE_PROFIT" => Some(Self::StopLossTakeProfit),
1804            "MARKET_RANGE" => Some(Self::MarketRange),
1805            "STOP_LIMIT" => Some(Self::StopLimit),
1806            _ => None,
1807        }
1808    }
1809}
1810/// * Order's time in force ENUM.
1811#[derive(serde::Serialize, serde::Deserialize)]
1812#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1813#[repr(i32)]
1814pub enum ProtoOaTimeInForce {
1815    GoodTillDate = 1,
1816    GoodTillCancel = 2,
1817    ImmediateOrCancel = 3,
1818    FillOrKill = 4,
1819    MarketOnOpen = 5,
1820}
1821impl ProtoOaTimeInForce {
1822    /// String value of the enum field names used in the ProtoBuf definition.
1823    ///
1824    /// The values are not transformed in any way and thus are considered stable
1825    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1826    pub fn as_str_name(&self) -> &'static str {
1827        match self {
1828            Self::GoodTillDate => "GOOD_TILL_DATE",
1829            Self::GoodTillCancel => "GOOD_TILL_CANCEL",
1830            Self::ImmediateOrCancel => "IMMEDIATE_OR_CANCEL",
1831            Self::FillOrKill => "FILL_OR_KILL",
1832            Self::MarketOnOpen => "MARKET_ON_OPEN",
1833        }
1834    }
1835    /// Creates an enum from field names used in the ProtoBuf definition.
1836    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1837        match value {
1838            "GOOD_TILL_DATE" => Some(Self::GoodTillDate),
1839            "GOOD_TILL_CANCEL" => Some(Self::GoodTillCancel),
1840            "IMMEDIATE_OR_CANCEL" => Some(Self::ImmediateOrCancel),
1841            "FILL_OR_KILL" => Some(Self::FillOrKill),
1842            "MARKET_ON_OPEN" => Some(Self::MarketOnOpen),
1843            _ => None,
1844        }
1845    }
1846}
1847/// * Order status ENUM.
1848#[derive(serde::Serialize, serde::Deserialize)]
1849#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1850#[repr(i32)]
1851pub enum ProtoOaOrderStatus {
1852    /// Order request validated and accepted for execution.
1853    OrderStatusAccepted = 1,
1854    /// Order is fully filled.
1855    OrderStatusFilled = 2,
1856    /// Order is rejected due to validation.
1857    OrderStatusRejected = 3,
1858    /// Order expired. Might be valid for orders with partially filled volume that were expired on LP.
1859    OrderStatusExpired = 4,
1860    /// Order is cancelled. Might be valid for orders with partially filled volume that were cancelled by LP.
1861    OrderStatusCancelled = 5,
1862}
1863impl ProtoOaOrderStatus {
1864    /// String value of the enum field names used in the ProtoBuf definition.
1865    ///
1866    /// The values are not transformed in any way and thus are considered stable
1867    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1868    pub fn as_str_name(&self) -> &'static str {
1869        match self {
1870            Self::OrderStatusAccepted => "ORDER_STATUS_ACCEPTED",
1871            Self::OrderStatusFilled => "ORDER_STATUS_FILLED",
1872            Self::OrderStatusRejected => "ORDER_STATUS_REJECTED",
1873            Self::OrderStatusExpired => "ORDER_STATUS_EXPIRED",
1874            Self::OrderStatusCancelled => "ORDER_STATUS_CANCELLED",
1875        }
1876    }
1877    /// Creates an enum from field names used in the ProtoBuf definition.
1878    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1879        match value {
1880            "ORDER_STATUS_ACCEPTED" => Some(Self::OrderStatusAccepted),
1881            "ORDER_STATUS_FILLED" => Some(Self::OrderStatusFilled),
1882            "ORDER_STATUS_REJECTED" => Some(Self::OrderStatusRejected),
1883            "ORDER_STATUS_EXPIRED" => Some(Self::OrderStatusExpired),
1884            "ORDER_STATUS_CANCELLED" => Some(Self::OrderStatusCancelled),
1885            _ => None,
1886        }
1887    }
1888}
1889/// * Stop Order and Stop Loss triggering method ENUM.
1890#[derive(serde::Serialize, serde::Deserialize)]
1891#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1892#[repr(i32)]
1893pub enum ProtoOaOrderTriggerMethod {
1894    /// Stop Order: buy is triggered by ask, sell by bid; Stop Loss Order: for buy position is triggered by bid and for sell position by ask.
1895    Trade = 1,
1896    /// Stop Order: buy is triggered by bid, sell by ask; Stop Loss Order: for buy position is triggered by ask and for sell position by bid.
1897    Opposite = 2,
1898    /// The same as TRADE, but trigger is checked after the second consecutive tick.
1899    DoubleTrade = 3,
1900    /// The same as OPPOSITE, but trigger is checked after the second consecutive tick.
1901    DoubleOpposite = 4,
1902}
1903impl ProtoOaOrderTriggerMethod {
1904    /// String value of the enum field names used in the ProtoBuf definition.
1905    ///
1906    /// The values are not transformed in any way and thus are considered stable
1907    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1908    pub fn as_str_name(&self) -> &'static str {
1909        match self {
1910            Self::Trade => "TRADE",
1911            Self::Opposite => "OPPOSITE",
1912            Self::DoubleTrade => "DOUBLE_TRADE",
1913            Self::DoubleOpposite => "DOUBLE_OPPOSITE",
1914        }
1915    }
1916    /// Creates an enum from field names used in the ProtoBuf definition.
1917    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1918        match value {
1919            "TRADE" => Some(Self::Trade),
1920            "OPPOSITE" => Some(Self::Opposite),
1921            "DOUBLE_TRADE" => Some(Self::DoubleTrade),
1922            "DOUBLE_OPPOSITE" => Some(Self::DoubleOpposite),
1923            _ => None,
1924        }
1925    }
1926}
1927/// * Execution event type ENUM.
1928#[derive(serde::Serialize, serde::Deserialize)]
1929#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1930#[repr(i32)]
1931pub enum ProtoOaExecutionType {
1932    /// Order passed validation.
1933    OrderAccepted = 2,
1934    /// Order filled.
1935    OrderFilled = 3,
1936    /// Pending order is changed with a new one.
1937    OrderReplaced = 4,
1938    /// Order cancelled.
1939    OrderCancelled = 5,
1940    /// Order with GTD time in force is expired.
1941    OrderExpired = 6,
1942    /// Order is rejected due to validations.
1943    OrderRejected = 7,
1944    /// Cancel order request is rejected.
1945    OrderCancelRejected = 8,
1946    /// Type related to SWAP execution events.
1947    Swap = 9,
1948    /// Type related to event of deposit or withdrawal cash flow operation.
1949    DepositWithdraw = 10,
1950    /// Order is partially filled.
1951    OrderPartialFill = 11,
1952    /// Type related to event of bonus deposit or bonus withdrawal.
1953    BonusDepositWithdraw = 12,
1954}
1955impl ProtoOaExecutionType {
1956    /// String value of the enum field names used in the ProtoBuf definition.
1957    ///
1958    /// The values are not transformed in any way and thus are considered stable
1959    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1960    pub fn as_str_name(&self) -> &'static str {
1961        match self {
1962            Self::OrderAccepted => "ORDER_ACCEPTED",
1963            Self::OrderFilled => "ORDER_FILLED",
1964            Self::OrderReplaced => "ORDER_REPLACED",
1965            Self::OrderCancelled => "ORDER_CANCELLED",
1966            Self::OrderExpired => "ORDER_EXPIRED",
1967            Self::OrderRejected => "ORDER_REJECTED",
1968            Self::OrderCancelRejected => "ORDER_CANCEL_REJECTED",
1969            Self::Swap => "SWAP",
1970            Self::DepositWithdraw => "DEPOSIT_WITHDRAW",
1971            Self::OrderPartialFill => "ORDER_PARTIAL_FILL",
1972            Self::BonusDepositWithdraw => "BONUS_DEPOSIT_WITHDRAW",
1973        }
1974    }
1975    /// Creates an enum from field names used in the ProtoBuf definition.
1976    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1977        match value {
1978            "ORDER_ACCEPTED" => Some(Self::OrderAccepted),
1979            "ORDER_FILLED" => Some(Self::OrderFilled),
1980            "ORDER_REPLACED" => Some(Self::OrderReplaced),
1981            "ORDER_CANCELLED" => Some(Self::OrderCancelled),
1982            "ORDER_EXPIRED" => Some(Self::OrderExpired),
1983            "ORDER_REJECTED" => Some(Self::OrderRejected),
1984            "ORDER_CANCEL_REJECTED" => Some(Self::OrderCancelRejected),
1985            "SWAP" => Some(Self::Swap),
1986            "DEPOSIT_WITHDRAW" => Some(Self::DepositWithdraw),
1987            "ORDER_PARTIAL_FILL" => Some(Self::OrderPartialFill),
1988            "BONUS_DEPOSIT_WITHDRAW" => Some(Self::BonusDepositWithdraw),
1989            _ => None,
1990        }
1991    }
1992}
1993/// * Bonus operation type ENUM.
1994#[derive(serde::Serialize, serde::Deserialize)]
1995#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1996#[repr(i32)]
1997pub enum ProtoOaChangeBonusType {
1998    BonusDeposit = 0,
1999    BonusWithdraw = 1,
2000}
2001impl ProtoOaChangeBonusType {
2002    /// String value of the enum field names used in the ProtoBuf definition.
2003    ///
2004    /// The values are not transformed in any way and thus are considered stable
2005    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2006    pub fn as_str_name(&self) -> &'static str {
2007        match self {
2008            Self::BonusDeposit => "BONUS_DEPOSIT",
2009            Self::BonusWithdraw => "BONUS_WITHDRAW",
2010        }
2011    }
2012    /// Creates an enum from field names used in the ProtoBuf definition.
2013    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2014        match value {
2015            "BONUS_DEPOSIT" => Some(Self::BonusDeposit),
2016            "BONUS_WITHDRAW" => Some(Self::BonusWithdraw),
2017            _ => None,
2018        }
2019    }
2020}
2021/// * Balance operation entity. Covers all cash movement operations related to account, trading, IB operations, mirroring, etc.
2022#[derive(serde::Serialize, serde::Deserialize)]
2023#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2024#[repr(i32)]
2025pub enum ProtoOaChangeBalanceType {
2026    /// Cash deposit.
2027    BalanceDeposit = 0,
2028    /// Cash withdrawal.
2029    BalanceWithdraw = 1,
2030    /// Received mirroring commission.
2031    BalanceDepositStrategyCommissionInner = 3,
2032    /// Paid mirroring commission.
2033    BalanceWithdrawStrategyCommissionInner = 4,
2034    /// For IB account. Commissions paid by trader.
2035    BalanceDepositIbCommissions = 5,
2036    /// For IB account. Withdrawal of commissions shared with broker.
2037    BalanceWithdrawIbSharedPercentage = 6,
2038    /// For IB account. Commissions paid by sub-ibs.
2039    BalanceDepositIbSharedPercentageFromSubIb = 7,
2040    /// For IB account. Commissions paid by broker.
2041    BalanceDepositIbSharedPercentageFromBroker = 8,
2042    /// Deposit rebate for trading volume for period.
2043    BalanceDepositRebate = 9,
2044    /// Withdrawal of rebate.
2045    BalanceWithdrawRebate = 10,
2046    /// Mirroring commission.
2047    BalanceDepositStrategyCommissionOuter = 11,
2048    /// Mirroring commission.
2049    BalanceWithdrawStrategyCommissionOuter = 12,
2050    /// For IB account. Share commission with the Broker.
2051    BalanceWithdrawBonusCompensation = 13,
2052    /// IB commissions.
2053    BalanceWithdrawIbSharedPercentageToBroker = 14,
2054    /// Deposit dividends payments.
2055    BalanceDepositDividends = 15,
2056    /// Negative dividend charge for short position.
2057    BalanceWithdrawDividends = 16,
2058    /// Charge for guaranteedStopLoss.
2059    BalanceWithdrawGslCharge = 17,
2060    /// Charge of rollover fee for Shariah compliant accounts.
2061    BalanceWithdrawRollover = 18,
2062    /// Broker's operation to deposit bonus.
2063    BalanceDepositNonwithdrawableBonus = 19,
2064    /// Broker's operation to withdrawal bonus.
2065    BalanceWithdrawNonwithdrawableBonus = 20,
2066    /// Deposits of negative SWAP.
2067    BalanceDepositSwap = 21,
2068    /// SWAP charges.
2069    BalanceWithdrawSwap = 22,
2070    /// Mirroring commission.
2071    BalanceDepositManagementFee = 27,
2072    /// Mirroring commission. Deprecated since 7.1 in favor of BALANCE_WITHDRAW_COPY_FEE (34).
2073    BalanceWithdrawManagementFee = 28,
2074    /// Mirroring commission.
2075    BalanceDepositPerformanceFee = 29,
2076    /// Withdraw for subaccount creation (cTrader Copy).
2077    BalanceWithdrawForSubaccount = 30,
2078    /// Deposit to subaccount on creation (cTrader Copy).
2079    BalanceDepositToSubaccount = 31,
2080    /// Manual user's withdraw from subaccount (cTrader Copy), to parent account.
2081    BalanceWithdrawFromSubaccount = 32,
2082    /// Manual user's deposit to subaccount (cTrader Copy), from parent account.
2083    BalanceDepositFromSubaccount = 33,
2084    /// Withdrawal fees to Strategy Provider.
2085    BalanceWithdrawCopyFee = 34,
2086    /// Withdraw of inactivity fee from the balance.
2087    BalanceWithdrawInactivityFee = 35,
2088    /// Deposit within the same server (from another account).
2089    BalanceDepositTransfer = 36,
2090    /// Withdraw within the same server (to another account).
2091    BalanceWithdrawTransfer = 37,
2092    /// Bonus being converted from virtual bonus to real deposit.
2093    BalanceDepositConvertedBonus = 38,
2094    /// Applies if negative balance protection is configured by broker, should make balance = 0.
2095    BalanceDepositNegativeBalanceProtection = 39,
2096}
2097impl ProtoOaChangeBalanceType {
2098    /// String value of the enum field names used in the ProtoBuf definition.
2099    ///
2100    /// The values are not transformed in any way and thus are considered stable
2101    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2102    pub fn as_str_name(&self) -> &'static str {
2103        match self {
2104            Self::BalanceDeposit => "BALANCE_DEPOSIT",
2105            Self::BalanceWithdraw => "BALANCE_WITHDRAW",
2106            Self::BalanceDepositStrategyCommissionInner => {
2107                "BALANCE_DEPOSIT_STRATEGY_COMMISSION_INNER"
2108            }
2109            Self::BalanceWithdrawStrategyCommissionInner => {
2110                "BALANCE_WITHDRAW_STRATEGY_COMMISSION_INNER"
2111            }
2112            Self::BalanceDepositIbCommissions => "BALANCE_DEPOSIT_IB_COMMISSIONS",
2113            Self::BalanceWithdrawIbSharedPercentage => {
2114                "BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE"
2115            }
2116            Self::BalanceDepositIbSharedPercentageFromSubIb => {
2117                "BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_SUB_IB"
2118            }
2119            Self::BalanceDepositIbSharedPercentageFromBroker => {
2120                "BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_BROKER"
2121            }
2122            Self::BalanceDepositRebate => "BALANCE_DEPOSIT_REBATE",
2123            Self::BalanceWithdrawRebate => "BALANCE_WITHDRAW_REBATE",
2124            Self::BalanceDepositStrategyCommissionOuter => {
2125                "BALANCE_DEPOSIT_STRATEGY_COMMISSION_OUTER"
2126            }
2127            Self::BalanceWithdrawStrategyCommissionOuter => {
2128                "BALANCE_WITHDRAW_STRATEGY_COMMISSION_OUTER"
2129            }
2130            Self::BalanceWithdrawBonusCompensation => {
2131                "BALANCE_WITHDRAW_BONUS_COMPENSATION"
2132            }
2133            Self::BalanceWithdrawIbSharedPercentageToBroker => {
2134                "BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE_TO_BROKER"
2135            }
2136            Self::BalanceDepositDividends => "BALANCE_DEPOSIT_DIVIDENDS",
2137            Self::BalanceWithdrawDividends => "BALANCE_WITHDRAW_DIVIDENDS",
2138            Self::BalanceWithdrawGslCharge => "BALANCE_WITHDRAW_GSL_CHARGE",
2139            Self::BalanceWithdrawRollover => "BALANCE_WITHDRAW_ROLLOVER",
2140            Self::BalanceDepositNonwithdrawableBonus => {
2141                "BALANCE_DEPOSIT_NONWITHDRAWABLE_BONUS"
2142            }
2143            Self::BalanceWithdrawNonwithdrawableBonus => {
2144                "BALANCE_WITHDRAW_NONWITHDRAWABLE_BONUS"
2145            }
2146            Self::BalanceDepositSwap => "BALANCE_DEPOSIT_SWAP",
2147            Self::BalanceWithdrawSwap => "BALANCE_WITHDRAW_SWAP",
2148            Self::BalanceDepositManagementFee => "BALANCE_DEPOSIT_MANAGEMENT_FEE",
2149            Self::BalanceWithdrawManagementFee => "BALANCE_WITHDRAW_MANAGEMENT_FEE",
2150            Self::BalanceDepositPerformanceFee => "BALANCE_DEPOSIT_PERFORMANCE_FEE",
2151            Self::BalanceWithdrawForSubaccount => "BALANCE_WITHDRAW_FOR_SUBACCOUNT",
2152            Self::BalanceDepositToSubaccount => "BALANCE_DEPOSIT_TO_SUBACCOUNT",
2153            Self::BalanceWithdrawFromSubaccount => "BALANCE_WITHDRAW_FROM_SUBACCOUNT",
2154            Self::BalanceDepositFromSubaccount => "BALANCE_DEPOSIT_FROM_SUBACCOUNT",
2155            Self::BalanceWithdrawCopyFee => "BALANCE_WITHDRAW_COPY_FEE",
2156            Self::BalanceWithdrawInactivityFee => "BALANCE_WITHDRAW_INACTIVITY_FEE",
2157            Self::BalanceDepositTransfer => "BALANCE_DEPOSIT_TRANSFER",
2158            Self::BalanceWithdrawTransfer => "BALANCE_WITHDRAW_TRANSFER",
2159            Self::BalanceDepositConvertedBonus => "BALANCE_DEPOSIT_CONVERTED_BONUS",
2160            Self::BalanceDepositNegativeBalanceProtection => {
2161                "BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION"
2162            }
2163        }
2164    }
2165    /// Creates an enum from field names used in the ProtoBuf definition.
2166    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2167        match value {
2168            "BALANCE_DEPOSIT" => Some(Self::BalanceDeposit),
2169            "BALANCE_WITHDRAW" => Some(Self::BalanceWithdraw),
2170            "BALANCE_DEPOSIT_STRATEGY_COMMISSION_INNER" => {
2171                Some(Self::BalanceDepositStrategyCommissionInner)
2172            }
2173            "BALANCE_WITHDRAW_STRATEGY_COMMISSION_INNER" => {
2174                Some(Self::BalanceWithdrawStrategyCommissionInner)
2175            }
2176            "BALANCE_DEPOSIT_IB_COMMISSIONS" => Some(Self::BalanceDepositIbCommissions),
2177            "BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE" => {
2178                Some(Self::BalanceWithdrawIbSharedPercentage)
2179            }
2180            "BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_SUB_IB" => {
2181                Some(Self::BalanceDepositIbSharedPercentageFromSubIb)
2182            }
2183            "BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_BROKER" => {
2184                Some(Self::BalanceDepositIbSharedPercentageFromBroker)
2185            }
2186            "BALANCE_DEPOSIT_REBATE" => Some(Self::BalanceDepositRebate),
2187            "BALANCE_WITHDRAW_REBATE" => Some(Self::BalanceWithdrawRebate),
2188            "BALANCE_DEPOSIT_STRATEGY_COMMISSION_OUTER" => {
2189                Some(Self::BalanceDepositStrategyCommissionOuter)
2190            }
2191            "BALANCE_WITHDRAW_STRATEGY_COMMISSION_OUTER" => {
2192                Some(Self::BalanceWithdrawStrategyCommissionOuter)
2193            }
2194            "BALANCE_WITHDRAW_BONUS_COMPENSATION" => {
2195                Some(Self::BalanceWithdrawBonusCompensation)
2196            }
2197            "BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE_TO_BROKER" => {
2198                Some(Self::BalanceWithdrawIbSharedPercentageToBroker)
2199            }
2200            "BALANCE_DEPOSIT_DIVIDENDS" => Some(Self::BalanceDepositDividends),
2201            "BALANCE_WITHDRAW_DIVIDENDS" => Some(Self::BalanceWithdrawDividends),
2202            "BALANCE_WITHDRAW_GSL_CHARGE" => Some(Self::BalanceWithdrawGslCharge),
2203            "BALANCE_WITHDRAW_ROLLOVER" => Some(Self::BalanceWithdrawRollover),
2204            "BALANCE_DEPOSIT_NONWITHDRAWABLE_BONUS" => {
2205                Some(Self::BalanceDepositNonwithdrawableBonus)
2206            }
2207            "BALANCE_WITHDRAW_NONWITHDRAWABLE_BONUS" => {
2208                Some(Self::BalanceWithdrawNonwithdrawableBonus)
2209            }
2210            "BALANCE_DEPOSIT_SWAP" => Some(Self::BalanceDepositSwap),
2211            "BALANCE_WITHDRAW_SWAP" => Some(Self::BalanceWithdrawSwap),
2212            "BALANCE_DEPOSIT_MANAGEMENT_FEE" => Some(Self::BalanceDepositManagementFee),
2213            "BALANCE_WITHDRAW_MANAGEMENT_FEE" => Some(Self::BalanceWithdrawManagementFee),
2214            "BALANCE_DEPOSIT_PERFORMANCE_FEE" => Some(Self::BalanceDepositPerformanceFee),
2215            "BALANCE_WITHDRAW_FOR_SUBACCOUNT" => Some(Self::BalanceWithdrawForSubaccount),
2216            "BALANCE_DEPOSIT_TO_SUBACCOUNT" => Some(Self::BalanceDepositToSubaccount),
2217            "BALANCE_WITHDRAW_FROM_SUBACCOUNT" => {
2218                Some(Self::BalanceWithdrawFromSubaccount)
2219            }
2220            "BALANCE_DEPOSIT_FROM_SUBACCOUNT" => Some(Self::BalanceDepositFromSubaccount),
2221            "BALANCE_WITHDRAW_COPY_FEE" => Some(Self::BalanceWithdrawCopyFee),
2222            "BALANCE_WITHDRAW_INACTIVITY_FEE" => Some(Self::BalanceWithdrawInactivityFee),
2223            "BALANCE_DEPOSIT_TRANSFER" => Some(Self::BalanceDepositTransfer),
2224            "BALANCE_WITHDRAW_TRANSFER" => Some(Self::BalanceWithdrawTransfer),
2225            "BALANCE_DEPOSIT_CONVERTED_BONUS" => Some(Self::BalanceDepositConvertedBonus),
2226            "BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION" => {
2227                Some(Self::BalanceDepositNegativeBalanceProtection)
2228            }
2229            _ => None,
2230        }
2231    }
2232}
2233/// * Deal status ENUM.
2234#[derive(serde::Serialize, serde::Deserialize)]
2235#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2236#[repr(i32)]
2237pub enum ProtoOaDealStatus {
2238    /// Deal filled.
2239    Filled = 2,
2240    /// Deal is partially filled.
2241    PartiallyFilled = 3,
2242    /// Deal is correct but was rejected by liquidity provider (e.g. no liquidity).
2243    Rejected = 4,
2244    /// Deal rejected by server (e.g. no price quotes).
2245    InternallyRejected = 5,
2246    /// Deal is rejected by LP due to error (e.g. symbol is unknown).
2247    Error = 6,
2248    /// Liquidity provider did not sent response on the deal during specified execution time period.
2249    Missed = 7,
2250}
2251impl ProtoOaDealStatus {
2252    /// String value of the enum field names used in the ProtoBuf definition.
2253    ///
2254    /// The values are not transformed in any way and thus are considered stable
2255    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2256    pub fn as_str_name(&self) -> &'static str {
2257        match self {
2258            Self::Filled => "FILLED",
2259            Self::PartiallyFilled => "PARTIALLY_FILLED",
2260            Self::Rejected => "REJECTED",
2261            Self::InternallyRejected => "INTERNALLY_REJECTED",
2262            Self::Error => "ERROR",
2263            Self::Missed => "MISSED",
2264        }
2265    }
2266    /// Creates an enum from field names used in the ProtoBuf definition.
2267    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2268        match value {
2269            "FILLED" => Some(Self::Filled),
2270            "PARTIALLY_FILLED" => Some(Self::PartiallyFilled),
2271            "REJECTED" => Some(Self::Rejected),
2272            "INTERNALLY_REJECTED" => Some(Self::InternallyRejected),
2273            "ERROR" => Some(Self::Error),
2274            "MISSED" => Some(Self::Missed),
2275            _ => None,
2276        }
2277    }
2278}
2279/// * Trendbar period ENUM.
2280#[derive(serde::Serialize, serde::Deserialize)]
2281#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2282#[repr(i32)]
2283pub enum ProtoOaTrendbarPeriod {
2284    M1 = 1,
2285    M2 = 2,
2286    M3 = 3,
2287    M4 = 4,
2288    M5 = 5,
2289    M10 = 6,
2290    M15 = 7,
2291    M30 = 8,
2292    H1 = 9,
2293    H4 = 10,
2294    H12 = 11,
2295    D1 = 12,
2296    W1 = 13,
2297    Mn1 = 14,
2298}
2299impl ProtoOaTrendbarPeriod {
2300    /// String value of the enum field names used in the ProtoBuf definition.
2301    ///
2302    /// The values are not transformed in any way and thus are considered stable
2303    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2304    pub fn as_str_name(&self) -> &'static str {
2305        match self {
2306            Self::M1 => "M1",
2307            Self::M2 => "M2",
2308            Self::M3 => "M3",
2309            Self::M4 => "M4",
2310            Self::M5 => "M5",
2311            Self::M10 => "M10",
2312            Self::M15 => "M15",
2313            Self::M30 => "M30",
2314            Self::H1 => "H1",
2315            Self::H4 => "H4",
2316            Self::H12 => "H12",
2317            Self::D1 => "D1",
2318            Self::W1 => "W1",
2319            Self::Mn1 => "MN1",
2320        }
2321    }
2322    /// Creates an enum from field names used in the ProtoBuf definition.
2323    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2324        match value {
2325            "M1" => Some(Self::M1),
2326            "M2" => Some(Self::M2),
2327            "M3" => Some(Self::M3),
2328            "M4" => Some(Self::M4),
2329            "M5" => Some(Self::M5),
2330            "M10" => Some(Self::M10),
2331            "M15" => Some(Self::M15),
2332            "M30" => Some(Self::M30),
2333            "H1" => Some(Self::H1),
2334            "H4" => Some(Self::H4),
2335            "H12" => Some(Self::H12),
2336            "D1" => Some(Self::D1),
2337            "W1" => Some(Self::W1),
2338            "MN1" => Some(Self::Mn1),
2339            _ => None,
2340        }
2341    }
2342}
2343/// * Price quote type.
2344#[derive(serde::Serialize, serde::Deserialize)]
2345#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2346#[repr(i32)]
2347pub enum ProtoOaQuoteType {
2348    Bid = 1,
2349    Ask = 2,
2350}
2351impl ProtoOaQuoteType {
2352    /// String value of the enum field names used in the ProtoBuf definition.
2353    ///
2354    /// The values are not transformed in any way and thus are considered stable
2355    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2356    pub fn as_str_name(&self) -> &'static str {
2357        match self {
2358            Self::Bid => "BID",
2359            Self::Ask => "ASK",
2360        }
2361    }
2362    /// Creates an enum from field names used in the ProtoBuf definition.
2363    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2364        match value {
2365            "BID" => Some(Self::Bid),
2366            "ASK" => Some(Self::Ask),
2367            _ => None,
2368        }
2369    }
2370}
2371/// * Open API application permission in regards to token ENUM.
2372#[derive(serde::Serialize, serde::Deserialize)]
2373#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2374#[repr(i32)]
2375pub enum ProtoOaClientPermissionScope {
2376    /// Allows to use only view commends. Trade is prohibited.
2377    ScopeView = 0,
2378    /// Allows to use all commands.
2379    ScopeTrade = 1,
2380}
2381impl ProtoOaClientPermissionScope {
2382    /// String value of the enum field names used in the ProtoBuf definition.
2383    ///
2384    /// The values are not transformed in any way and thus are considered stable
2385    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2386    pub fn as_str_name(&self) -> &'static str {
2387        match self {
2388            Self::ScopeView => "SCOPE_VIEW",
2389            Self::ScopeTrade => "SCOPE_TRADE",
2390        }
2391    }
2392    /// Creates an enum from field names used in the ProtoBuf definition.
2393    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2394        match value {
2395            "SCOPE_VIEW" => Some(Self::ScopeView),
2396            "SCOPE_TRADE" => Some(Self::ScopeTrade),
2397            _ => None,
2398        }
2399    }
2400}
2401/// * Type of notification, currently only 3 instances of marginCall are supported.
2402#[derive(serde::Serialize, serde::Deserialize)]
2403#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2404#[repr(i32)]
2405pub enum ProtoOaNotificationType {
2406    /// one of three margin calls, they are all similar.
2407    MarginLevelThreshold1 = 61,
2408    /// one of three margin calls, they are all similar.
2409    MarginLevelThreshold2 = 62,
2410    /// one of three margin calls, they are all similar.
2411    MarginLevelThreshold3 = 63,
2412}
2413impl ProtoOaNotificationType {
2414    /// String value of the enum field names used in the ProtoBuf definition.
2415    ///
2416    /// The values are not transformed in any way and thus are considered stable
2417    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2418    pub fn as_str_name(&self) -> &'static str {
2419        match self {
2420            Self::MarginLevelThreshold1 => "MARGIN_LEVEL_THRESHOLD_1",
2421            Self::MarginLevelThreshold2 => "MARGIN_LEVEL_THRESHOLD_2",
2422            Self::MarginLevelThreshold3 => "MARGIN_LEVEL_THRESHOLD_3",
2423        }
2424    }
2425    /// Creates an enum from field names used in the ProtoBuf definition.
2426    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2427        match value {
2428            "MARGIN_LEVEL_THRESHOLD_1" => Some(Self::MarginLevelThreshold1),
2429            "MARGIN_LEVEL_THRESHOLD_2" => Some(Self::MarginLevelThreshold2),
2430            "MARGIN_LEVEL_THRESHOLD_3" => Some(Self::MarginLevelThreshold3),
2431            _ => None,
2432        }
2433    }
2434}
2435/// * Error code ENUM.
2436#[derive(serde::Serialize, serde::Deserialize)]
2437#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2438#[repr(i32)]
2439pub enum ProtoOaErrorCode {
2440    /// Authorization
2441    ///
2442    /// When token used for account authorization is expired.
2443    OaAuthTokenExpired = 1,
2444    /// When account is not authorized.
2445    AccountNotAuthorized = 2,
2446    /// When such account no longer exists.
2447    RetNoSuchLogin = 12,
2448    /// When client tries to authorize after it was already authorized.
2449    AlreadyLoggedIn = 14,
2450    /// When account is disabled.
2451    RetAccountDisabled = 64,
2452    /// Open API client is not activated or wrong client credentials.
2453    ChClientAuthFailure = 101,
2454    /// When a command is sent for not authorized Open API client.
2455    ChClientNotAuthenticated = 102,
2456    /// Client is trying to authenticate twice.
2457    ChClientAlreadyAuthenticated = 103,
2458    /// Access token is invalid.
2459    ChAccessTokenInvalid = 104,
2460    /// Trading service is not available.
2461    ChServerNotReachable = 105,
2462    /// Trading account is not found.
2463    ChCtidTraderAccountNotFound = 106,
2464    /// Could not find this client id.
2465    ChOaClientNotFound = 107,
2466    /// General
2467    ///
2468    /// Request frequency is reached.
2469    RequestFrequencyExceeded = 108,
2470    /// Server is under maintenance.
2471    ServerIsUnderMaintenance = 109,
2472    /// Operations are not allowed for this account.
2473    ChannelIsBlocked = 110,
2474    /// Limit of connections is reached for this Open API client.
2475    ConnectionsLimitExceeded = 67,
2476    /// Not allowed to increase risk for Positions with Guaranteed Stop Loss.
2477    WorseGslNotAllowed = 68,
2478    /// Trading disabled because symbol has holiday.
2479    SymbolHasHoliday = 69,
2480    /// Pricing
2481    ///
2482    /// When trying to subscribe to depth, trendbars, etc. without spot subscription.
2483    NotSubscribedToSpots = 112,
2484    /// When subscription is requested for an active.
2485    AlreadySubscribed = 113,
2486    /// Symbol not found.
2487    SymbolNotFound = 114,
2488    /// Note: to be merged with SYMBOL_NOT_FOUND.
2489    UnknownSymbol = 115,
2490    /// When requested period (from,to) is too large or invalid values are set to from/to.
2491    IncorrectBoundaries = 35,
2492    /// Trading
2493    ///
2494    /// Trading cannot be done as not quotes are available. Applicable for Book B.
2495    NoQuotes = 117,
2496    /// Not enough funds to allocate margin.
2497    NotEnoughMoney = 118,
2498    /// Max exposure limit is reached for a {trader, symbol, side}.
2499    MaxExposureReached = 119,
2500    /// Position not found.
2501    PositionNotFound = 120,
2502    /// Order not found.
2503    OrderNotFound = 121,
2504    /// When trying to close a position that it is not open.
2505    PositionNotOpen = 122,
2506    /// Position in the state that does not allow to perform an operation.
2507    PositionLocked = 123,
2508    /// Trading account reached its limit for max number of open positions and orders.
2509    TooManyPositions = 124,
2510    /// Invalid volume.
2511    TradingBadVolume = 125,
2512    /// Invalid stop price.
2513    TradingBadStops = 126,
2514    /// Invalid price (e.g. negative).
2515    TradingBadPrices = 127,
2516    /// Invalid stake volume (e.g. negative).
2517    TradingBadStake = 128,
2518    /// Invalid protection prices.
2519    ProtectionIsTooCloseToMarket = 129,
2520    /// Invalid expiration.
2521    TradingBadExpirationDate = 130,
2522    /// Unable to apply changes as position has an order under execution.
2523    PendingExecution = 131,
2524    /// Trading is blocked for the symbol.
2525    TradingDisabled = 132,
2526    /// Trading account is in read only mode.
2527    TradingNotAllowed = 133,
2528    /// Unable to cancel order.
2529    UnableToCancelOrder = 134,
2530    /// Unable to amend order.
2531    UnableToAmendOrder = 135,
2532    /// Short selling is not allowed.
2533    ShortSellingNotAllowed = 136,
2534}
2535impl ProtoOaErrorCode {
2536    /// String value of the enum field names used in the ProtoBuf definition.
2537    ///
2538    /// The values are not transformed in any way and thus are considered stable
2539    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2540    pub fn as_str_name(&self) -> &'static str {
2541        match self {
2542            Self::OaAuthTokenExpired => "OA_AUTH_TOKEN_EXPIRED",
2543            Self::AccountNotAuthorized => "ACCOUNT_NOT_AUTHORIZED",
2544            Self::RetNoSuchLogin => "RET_NO_SUCH_LOGIN",
2545            Self::AlreadyLoggedIn => "ALREADY_LOGGED_IN",
2546            Self::RetAccountDisabled => "RET_ACCOUNT_DISABLED",
2547            Self::ChClientAuthFailure => "CH_CLIENT_AUTH_FAILURE",
2548            Self::ChClientNotAuthenticated => "CH_CLIENT_NOT_AUTHENTICATED",
2549            Self::ChClientAlreadyAuthenticated => "CH_CLIENT_ALREADY_AUTHENTICATED",
2550            Self::ChAccessTokenInvalid => "CH_ACCESS_TOKEN_INVALID",
2551            Self::ChServerNotReachable => "CH_SERVER_NOT_REACHABLE",
2552            Self::ChCtidTraderAccountNotFound => "CH_CTID_TRADER_ACCOUNT_NOT_FOUND",
2553            Self::ChOaClientNotFound => "CH_OA_CLIENT_NOT_FOUND",
2554            Self::RequestFrequencyExceeded => "REQUEST_FREQUENCY_EXCEEDED",
2555            Self::ServerIsUnderMaintenance => "SERVER_IS_UNDER_MAINTENANCE",
2556            Self::ChannelIsBlocked => "CHANNEL_IS_BLOCKED",
2557            Self::ConnectionsLimitExceeded => "CONNECTIONS_LIMIT_EXCEEDED",
2558            Self::WorseGslNotAllowed => "WORSE_GSL_NOT_ALLOWED",
2559            Self::SymbolHasHoliday => "SYMBOL_HAS_HOLIDAY",
2560            Self::NotSubscribedToSpots => "NOT_SUBSCRIBED_TO_SPOTS",
2561            Self::AlreadySubscribed => "ALREADY_SUBSCRIBED",
2562            Self::SymbolNotFound => "SYMBOL_NOT_FOUND",
2563            Self::UnknownSymbol => "UNKNOWN_SYMBOL",
2564            Self::IncorrectBoundaries => "INCORRECT_BOUNDARIES",
2565            Self::NoQuotes => "NO_QUOTES",
2566            Self::NotEnoughMoney => "NOT_ENOUGH_MONEY",
2567            Self::MaxExposureReached => "MAX_EXPOSURE_REACHED",
2568            Self::PositionNotFound => "POSITION_NOT_FOUND",
2569            Self::OrderNotFound => "ORDER_NOT_FOUND",
2570            Self::PositionNotOpen => "POSITION_NOT_OPEN",
2571            Self::PositionLocked => "POSITION_LOCKED",
2572            Self::TooManyPositions => "TOO_MANY_POSITIONS",
2573            Self::TradingBadVolume => "TRADING_BAD_VOLUME",
2574            Self::TradingBadStops => "TRADING_BAD_STOPS",
2575            Self::TradingBadPrices => "TRADING_BAD_PRICES",
2576            Self::TradingBadStake => "TRADING_BAD_STAKE",
2577            Self::ProtectionIsTooCloseToMarket => "PROTECTION_IS_TOO_CLOSE_TO_MARKET",
2578            Self::TradingBadExpirationDate => "TRADING_BAD_EXPIRATION_DATE",
2579            Self::PendingExecution => "PENDING_EXECUTION",
2580            Self::TradingDisabled => "TRADING_DISABLED",
2581            Self::TradingNotAllowed => "TRADING_NOT_ALLOWED",
2582            Self::UnableToCancelOrder => "UNABLE_TO_CANCEL_ORDER",
2583            Self::UnableToAmendOrder => "UNABLE_TO_AMEND_ORDER",
2584            Self::ShortSellingNotAllowed => "SHORT_SELLING_NOT_ALLOWED",
2585        }
2586    }
2587    /// Creates an enum from field names used in the ProtoBuf definition.
2588    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2589        match value {
2590            "OA_AUTH_TOKEN_EXPIRED" => Some(Self::OaAuthTokenExpired),
2591            "ACCOUNT_NOT_AUTHORIZED" => Some(Self::AccountNotAuthorized),
2592            "RET_NO_SUCH_LOGIN" => Some(Self::RetNoSuchLogin),
2593            "ALREADY_LOGGED_IN" => Some(Self::AlreadyLoggedIn),
2594            "RET_ACCOUNT_DISABLED" => Some(Self::RetAccountDisabled),
2595            "CH_CLIENT_AUTH_FAILURE" => Some(Self::ChClientAuthFailure),
2596            "CH_CLIENT_NOT_AUTHENTICATED" => Some(Self::ChClientNotAuthenticated),
2597            "CH_CLIENT_ALREADY_AUTHENTICATED" => Some(Self::ChClientAlreadyAuthenticated),
2598            "CH_ACCESS_TOKEN_INVALID" => Some(Self::ChAccessTokenInvalid),
2599            "CH_SERVER_NOT_REACHABLE" => Some(Self::ChServerNotReachable),
2600            "CH_CTID_TRADER_ACCOUNT_NOT_FOUND" => Some(Self::ChCtidTraderAccountNotFound),
2601            "CH_OA_CLIENT_NOT_FOUND" => Some(Self::ChOaClientNotFound),
2602            "REQUEST_FREQUENCY_EXCEEDED" => Some(Self::RequestFrequencyExceeded),
2603            "SERVER_IS_UNDER_MAINTENANCE" => Some(Self::ServerIsUnderMaintenance),
2604            "CHANNEL_IS_BLOCKED" => Some(Self::ChannelIsBlocked),
2605            "CONNECTIONS_LIMIT_EXCEEDED" => Some(Self::ConnectionsLimitExceeded),
2606            "WORSE_GSL_NOT_ALLOWED" => Some(Self::WorseGslNotAllowed),
2607            "SYMBOL_HAS_HOLIDAY" => Some(Self::SymbolHasHoliday),
2608            "NOT_SUBSCRIBED_TO_SPOTS" => Some(Self::NotSubscribedToSpots),
2609            "ALREADY_SUBSCRIBED" => Some(Self::AlreadySubscribed),
2610            "SYMBOL_NOT_FOUND" => Some(Self::SymbolNotFound),
2611            "UNKNOWN_SYMBOL" => Some(Self::UnknownSymbol),
2612            "INCORRECT_BOUNDARIES" => Some(Self::IncorrectBoundaries),
2613            "NO_QUOTES" => Some(Self::NoQuotes),
2614            "NOT_ENOUGH_MONEY" => Some(Self::NotEnoughMoney),
2615            "MAX_EXPOSURE_REACHED" => Some(Self::MaxExposureReached),
2616            "POSITION_NOT_FOUND" => Some(Self::PositionNotFound),
2617            "ORDER_NOT_FOUND" => Some(Self::OrderNotFound),
2618            "POSITION_NOT_OPEN" => Some(Self::PositionNotOpen),
2619            "POSITION_LOCKED" => Some(Self::PositionLocked),
2620            "TOO_MANY_POSITIONS" => Some(Self::TooManyPositions),
2621            "TRADING_BAD_VOLUME" => Some(Self::TradingBadVolume),
2622            "TRADING_BAD_STOPS" => Some(Self::TradingBadStops),
2623            "TRADING_BAD_PRICES" => Some(Self::TradingBadPrices),
2624            "TRADING_BAD_STAKE" => Some(Self::TradingBadStake),
2625            "PROTECTION_IS_TOO_CLOSE_TO_MARKET" => {
2626                Some(Self::ProtectionIsTooCloseToMarket)
2627            }
2628            "TRADING_BAD_EXPIRATION_DATE" => Some(Self::TradingBadExpirationDate),
2629            "PENDING_EXECUTION" => Some(Self::PendingExecution),
2630            "TRADING_DISABLED" => Some(Self::TradingDisabled),
2631            "TRADING_NOT_ALLOWED" => Some(Self::TradingNotAllowed),
2632            "UNABLE_TO_CANCEL_ORDER" => Some(Self::UnableToCancelOrder),
2633            "UNABLE_TO_AMEND_ORDER" => Some(Self::UnableToAmendOrder),
2634            "SHORT_SELLING_NOT_ALLOWED" => Some(Self::ShortSellingNotAllowed),
2635            _ => None,
2636        }
2637    }
2638}
2639#[derive(serde::Serialize, serde::Deserialize)]
2640#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2641#[repr(i32)]
2642pub enum ProtoOaLimitedRiskMarginCalculationStrategy {
2643    AccordingToLeverage = 0,
2644    AccordingToGsl = 1,
2645    AccordingToGslAndLeverage = 2,
2646}
2647impl ProtoOaLimitedRiskMarginCalculationStrategy {
2648    /// String value of the enum field names used in the ProtoBuf definition.
2649    ///
2650    /// The values are not transformed in any way and thus are considered stable
2651    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2652    pub fn as_str_name(&self) -> &'static str {
2653        match self {
2654            Self::AccordingToLeverage => "ACCORDING_TO_LEVERAGE",
2655            Self::AccordingToGsl => "ACCORDING_TO_GSL",
2656            Self::AccordingToGslAndLeverage => "ACCORDING_TO_GSL_AND_LEVERAGE",
2657        }
2658    }
2659    /// Creates an enum from field names used in the ProtoBuf definition.
2660    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2661        match value {
2662            "ACCORDING_TO_LEVERAGE" => Some(Self::AccordingToLeverage),
2663            "ACCORDING_TO_GSL" => Some(Self::AccordingToGsl),
2664            "ACCORDING_TO_GSL_AND_LEVERAGE" => Some(Self::AccordingToGslAndLeverage),
2665            _ => None,
2666        }
2667    }
2668}
2669/// The strategy for choosing which Position to close during a Stop Out
2670#[derive(serde::Serialize, serde::Deserialize)]
2671#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2672#[repr(i32)]
2673pub enum ProtoOaStopOutStrategy {
2674    /// A Stop Out strategy that closes a Position with the largest Used Margin
2675    MostMarginUsedFirst = 0,
2676    /// A Stop Out strategy that closes a Position with the least PnL
2677    MostLosingFirst = 1,
2678}
2679impl ProtoOaStopOutStrategy {
2680    /// String value of the enum field names used in the ProtoBuf definition.
2681    ///
2682    /// The values are not transformed in any way and thus are considered stable
2683    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2684    pub fn as_str_name(&self) -> &'static str {
2685        match self {
2686            Self::MostMarginUsedFirst => "MOST_MARGIN_USED_FIRST",
2687            Self::MostLosingFirst => "MOST_LOSING_FIRST",
2688        }
2689    }
2690    /// Creates an enum from field names used in the ProtoBuf definition.
2691    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2692        match value {
2693            "MOST_MARGIN_USED_FIRST" => Some(Self::MostMarginUsedFirst),
2694            "MOST_LOSING_FIRST" => Some(Self::MostLosingFirst),
2695            _ => None,
2696        }
2697    }
2698}
2699/// * Request for the authorizing an application to work with the cTrader platform Proxies.
2700#[derive(serde::Serialize, serde::Deserialize)]
2701#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2702pub struct ProtoOaApplicationAuthReq {
2703    #[prost(
2704        enumeration = "ProtoOaPayloadType",
2705        optional,
2706        tag = "1",
2707        default = "ProtoOaApplicationAuthReq"
2708    )]
2709    pub payload_type: ::core::option::Option<i32>,
2710    /// The unique Client ID provided during the registration.
2711    #[prost(string, required, tag = "2")]
2712    pub client_id: ::prost::alloc::string::String,
2713    /// The unique Client Secret provided during the registration.
2714    #[prost(string, required, tag = "3")]
2715    pub client_secret: ::prost::alloc::string::String,
2716}
2717/// * Response to the ProtoOAApplicationAuthReq request.
2718#[derive(serde::Serialize, serde::Deserialize)]
2719#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2720pub struct ProtoOaApplicationAuthRes {
2721    #[prost(
2722        enumeration = "ProtoOaPayloadType",
2723        optional,
2724        tag = "1",
2725        default = "ProtoOaApplicationAuthRes"
2726    )]
2727    pub payload_type: ::core::option::Option<i32>,
2728}
2729/// * Request for authorizing of the trading account session. Requires established authorized connection with the client application using ProtoOAApplicationAuthReq.
2730#[derive(serde::Serialize, serde::Deserialize)]
2731#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2732pub struct ProtoOaAccountAuthReq {
2733    #[prost(
2734        enumeration = "ProtoOaPayloadType",
2735        optional,
2736        tag = "1",
2737        default = "ProtoOaAccountAuthReq"
2738    )]
2739    pub payload_type: ::core::option::Option<i32>,
2740    /// The unique identifier of the trader's account in cTrader platform.
2741    #[prost(int64, required, tag = "2")]
2742    pub ctid_trader_account_id: i64,
2743    /// The Access Token issued for providing access to the Trader's Account.
2744    #[prost(string, required, tag = "3")]
2745    pub access_token: ::prost::alloc::string::String,
2746}
2747/// * Response to the ProtoOAApplicationAuthRes request.
2748#[derive(serde::Serialize, serde::Deserialize)]
2749#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2750pub struct ProtoOaAccountAuthRes {
2751    #[prost(
2752        enumeration = "ProtoOaPayloadType",
2753        optional,
2754        tag = "1",
2755        default = "ProtoOaAccountAuthRes"
2756    )]
2757    pub payload_type: ::core::option::Option<i32>,
2758    /// The unique identifier of the trader's account in cTrader platform.
2759    #[prost(int64, required, tag = "2")]
2760    pub ctid_trader_account_id: i64,
2761}
2762/// * Generic response when an ERROR occurred.
2763#[derive(serde::Serialize, serde::Deserialize)]
2764#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2765pub struct ProtoOaErrorRes {
2766    #[prost(
2767        enumeration = "ProtoOaPayloadType",
2768        optional,
2769        tag = "1",
2770        default = "ProtoOaErrorRes"
2771    )]
2772    pub payload_type: ::core::option::Option<i32>,
2773    /// The unique identifier of the trader's account in cTrader platform.
2774    #[prost(int64, optional, tag = "2")]
2775    pub ctid_trader_account_id: ::core::option::Option<i64>,
2776    /// The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode).
2777    #[prost(string, required, tag = "3")]
2778    pub error_code: ::prost::alloc::string::String,
2779    /// The error description.
2780    #[prost(string, optional, tag = "4")]
2781    pub description: ::core::option::Option<::prost::alloc::string::String>,
2782    /// The Unix time in seconds when the current maintenance session will be ended.
2783    #[prost(int64, optional, tag = "5")]
2784    pub maintenance_end_timestamp: ::core::option::Option<i64>,
2785    /// When you hit rate limit with errorCode=BLOCKED_PAYLOAD_TYPE, this field will contain amount of seconds until related payload type will be unlocked.
2786    #[prost(uint64, optional, tag = "6")]
2787    pub retry_after: ::core::option::Option<u64>,
2788}
2789/// * Event that is sent when the connection with the client application is cancelled by the server. All the sessions for the traders' accounts will be terminated.
2790#[derive(serde::Serialize, serde::Deserialize)]
2791#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2792pub struct ProtoOaClientDisconnectEvent {
2793    #[prost(
2794        enumeration = "ProtoOaPayloadType",
2795        optional,
2796        tag = "1",
2797        default = "ProtoOaClientDisconnectEvent"
2798    )]
2799    pub payload_type: ::core::option::Option<i32>,
2800    /// The disconnection reason explained. For example: The application access was blocked by cTrader Administrator.
2801    #[prost(string, optional, tag = "2")]
2802    pub reason: ::core::option::Option<::prost::alloc::string::String>,
2803}
2804/// * Event that is sent when a session to a specific trader's account is terminated by the server but the existing connections with the other trader's accounts are maintained. Reasons to trigger: account was deleted, cTID was deleted, token was refreshed, token was revoked.
2805#[derive(serde::Serialize, serde::Deserialize)]
2806#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2807pub struct ProtoOaAccountsTokenInvalidatedEvent {
2808    #[prost(
2809        enumeration = "ProtoOaPayloadType",
2810        optional,
2811        tag = "1",
2812        default = "ProtoOaAccountsTokenInvalidatedEvent"
2813    )]
2814    pub payload_type: ::core::option::Option<i32>,
2815    /// The unique identifier of the trader's account in cTrader platform.
2816    #[prost(int64, repeated, packed = "false", tag = "2")]
2817    pub ctid_trader_account_ids: ::prost::alloc::vec::Vec<i64>,
2818    /// The disconnection reason explained. For example: Access Token is expired or recalled.
2819    #[prost(string, optional, tag = "3")]
2820    pub reason: ::core::option::Option<::prost::alloc::string::String>,
2821}
2822/// * Request for getting the proxy version. Can be used to check the current version of the Open API scheme.
2823#[derive(serde::Serialize, serde::Deserialize)]
2824#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2825pub struct ProtoOaVersionReq {
2826    #[prost(
2827        enumeration = "ProtoOaPayloadType",
2828        optional,
2829        tag = "1",
2830        default = "ProtoOaVersionReq"
2831    )]
2832    pub payload_type: ::core::option::Option<i32>,
2833}
2834/// * Response to the ProtoOAVersionReq request.
2835#[derive(serde::Serialize, serde::Deserialize)]
2836#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2837pub struct ProtoOaVersionRes {
2838    #[prost(
2839        enumeration = "ProtoOaPayloadType",
2840        optional,
2841        tag = "1",
2842        default = "ProtoOaVersionRes"
2843    )]
2844    pub payload_type: ::core::option::Option<i32>,
2845    /// The current version of the server application.
2846    #[prost(string, required, tag = "2")]
2847    pub version: ::prost::alloc::string::String,
2848}
2849/// * Request for sending a new trading order. Allowed only if the accessToken has the "trade" permissions for the trading account.
2850#[derive(serde::Serialize, serde::Deserialize)]
2851#[derive(Clone, PartialEq, ::prost::Message)]
2852pub struct ProtoOaNewOrderReq {
2853    #[prost(
2854        enumeration = "ProtoOaPayloadType",
2855        optional,
2856        tag = "1",
2857        default = "ProtoOaNewOrderReq"
2858    )]
2859    pub payload_type: ::core::option::Option<i32>,
2860    /// The unique identifier of the trader's account in cTrader platform.
2861    #[prost(int64, required, tag = "2")]
2862    pub ctid_trader_account_id: i64,
2863    /// The unique identifier of a symbol in cTrader platform.
2864    #[prost(int64, required, tag = "3")]
2865    pub symbol_id: i64,
2866    /// The type of an order - MARKET, LIMIT, STOP, MARKET_RANGE, STOP_LIMIT.
2867    #[prost(enumeration = "ProtoOaOrderType", required, tag = "4")]
2868    pub order_type: i32,
2869    /// The trade direction - BUY or SELL.
2870    #[prost(enumeration = "ProtoOaTradeSide", required, tag = "5")]
2871    pub trade_side: i32,
2872    /// The volume represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units).
2873    #[prost(int64, required, tag = "6")]
2874    pub volume: i64,
2875    /// The limit price, can be specified for the LIMIT order only.
2876    #[prost(double, optional, tag = "7")]
2877    pub limit_price: ::core::option::Option<f64>,
2878    /// Stop Price, can be specified for the STOP and the STOP_LIMIT orders only.
2879    #[prost(double, optional, tag = "8")]
2880    pub stop_price: ::core::option::Option<f64>,
2881    /// The specific order execution or expiration instruction - GOOD_TILL_DATE, GOOD_TILL_CANCEL, IMMEDIATE_OR_CANCEL, FILL_OR_KILL, MARKET_ON_OPEN.
2882    #[prost(
2883        enumeration = "ProtoOaTimeInForce",
2884        optional,
2885        tag = "9",
2886        default = "GoodTillCancel"
2887    )]
2888    pub time_in_force: ::core::option::Option<i32>,
2889    /// The Unix time in milliseconds of Order expiration. Should be set for the Good Till Date orders.
2890    #[prost(int64, optional, tag = "10")]
2891    pub expiration_timestamp: ::core::option::Option<i64>,
2892    /// The absolute Stop Loss price (1.23456 for example). Not supported for MARKET orders.
2893    #[prost(double, optional, tag = "11")]
2894    pub stop_loss: ::core::option::Option<f64>,
2895    /// The absolute Take Profit price (1.23456 for example). Unsupported for MARKET orders.
2896    #[prost(double, optional, tag = "12")]
2897    pub take_profit: ::core::option::Option<f64>,
2898    /// User-specified comment. MaxLength = 512.
2899    #[prost(string, optional, tag = "13")]
2900    pub comment: ::core::option::Option<::prost::alloc::string::String>,
2901    /// Base price to calculate relative slippage price for MARKET_RANGE order.
2902    #[prost(double, optional, tag = "14")]
2903    pub base_slippage_price: ::core::option::Option<f64>,
2904    /// Slippage distance for MARKET_RANGE and STOP_LIMIT order.
2905    #[prost(int32, optional, tag = "15")]
2906    pub slippage_in_points: ::core::option::Option<i32>,
2907    /// User-specified label. MaxLength = 100.
2908    #[prost(string, optional, tag = "16")]
2909    pub label: ::core::option::Option<::prost::alloc::string::String>,
2910    /// Reference to the existing position if the Order is intended to modify it.
2911    #[prost(int64, optional, tag = "17")]
2912    pub position_id: ::core::option::Option<i64>,
2913    /// Optional user-specific clientOrderId (similar to FIX ClOrderID). MaxLength = 50.
2914    #[prost(string, optional, tag = "18")]
2915    pub client_order_id: ::core::option::Option<::prost::alloc::string::String>,
2916    /// Relative Stop Loss that can be specified instead of the absolute as one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss.
2917    #[prost(int64, optional, tag = "19")]
2918    pub relative_stop_loss: ::core::option::Option<i64>,
2919    /// Relative Take Profit that can be specified instead of the absolute one. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit.
2920    #[prost(int64, optional, tag = "20")]
2921    pub relative_take_profit: ::core::option::Option<i64>,
2922    /// If TRUE then stopLoss is guaranteed. Required to be set to TRUE for the Limited Risk accounts (ProtoOATrader.isLimitedRisk=true).
2923    #[prost(bool, optional, tag = "21")]
2924    pub guaranteed_stop_loss: ::core::option::Option<bool>,
2925    /// If TRUE then the Stop Loss is Trailing.
2926    #[prost(bool, optional, tag = "22")]
2927    pub trailing_stop_loss: ::core::option::Option<bool>,
2928    /// Trigger method for the STOP or the STOP_LIMIT pending order.
2929    #[prost(
2930        enumeration = "ProtoOaOrderTriggerMethod",
2931        optional,
2932        tag = "23",
2933        default = "Trade"
2934    )]
2935    pub stop_trigger_method: ::core::option::Option<i32>,
2936}
2937/// * Event that is sent following the successful order acceptance or execution by the server. Acts as response to the ProtoOANewOrderReq, ProtoOACancelOrderReq, ProtoOAAmendOrderReq, ProtoOAAmendPositionSLTPReq, ProtoOAClosePositionReq requests. Also, the event is sent when a Deposit/Withdrawal took place.
2938#[derive(serde::Serialize, serde::Deserialize)]
2939#[derive(Clone, PartialEq, ::prost::Message)]
2940pub struct ProtoOaExecutionEvent {
2941    #[prost(
2942        enumeration = "ProtoOaPayloadType",
2943        optional,
2944        tag = "1",
2945        default = "ProtoOaExecutionEvent"
2946    )]
2947    pub payload_type: ::core::option::Option<i32>,
2948    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
2949    #[prost(int64, required, tag = "2")]
2950    pub ctid_trader_account_id: i64,
2951    /// Type of the order operation. For example: ACCEPTED, FILLED, etc.
2952    #[prost(enumeration = "ProtoOaExecutionType", required, tag = "3")]
2953    pub execution_type: i32,
2954    /// Reference to the position linked with the execution
2955    #[prost(message, optional, tag = "4")]
2956    pub position: ::core::option::Option<ProtoOaPosition>,
2957    /// Reference to the initial order.
2958    #[prost(message, optional, tag = "5")]
2959    pub order: ::core::option::Option<ProtoOaOrder>,
2960    /// Reference to the deal (execution).
2961    #[prost(message, optional, tag = "6")]
2962    pub deal: ::core::option::Option<ProtoOaDeal>,
2963    /// Reference to the Bonus Deposit or Withdrawal operation.
2964    #[prost(message, optional, tag = "7")]
2965    pub bonus_deposit_withdraw: ::core::option::Option<ProtoOaBonusDepositWithdraw>,
2966    /// Reference to the Deposit or Withdrawal operation.
2967    #[prost(message, optional, tag = "8")]
2968    pub deposit_withdraw: ::core::option::Option<ProtoOaDepositWithdraw>,
2969    /// The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode).
2970    #[prost(string, optional, tag = "9")]
2971    pub error_code: ::core::option::Option<::prost::alloc::string::String>,
2972    /// If TRUE then the event generated by the server logic instead of the trader's request. (e.g. stop-out).
2973    #[prost(bool, optional, tag = "10")]
2974    pub is_server_event: ::core::option::Option<bool>,
2975}
2976/// * Request for cancelling existing pending order. Allowed only if the accessToken has "trade" permissions for the trading account.
2977#[derive(serde::Serialize, serde::Deserialize)]
2978#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2979pub struct ProtoOaCancelOrderReq {
2980    #[prost(
2981        enumeration = "ProtoOaPayloadType",
2982        optional,
2983        tag = "1",
2984        default = "ProtoOaCancelOrderReq"
2985    )]
2986    pub payload_type: ::core::option::Option<i32>,
2987    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
2988    #[prost(int64, required, tag = "2")]
2989    pub ctid_trader_account_id: i64,
2990    /// The unique ID of the order.
2991    #[prost(int64, required, tag = "3")]
2992    pub order_id: i64,
2993}
2994/// * Request for amending the existing pending order. Allowed only if the Access Token has "trade" permissions for the trading account.
2995#[derive(serde::Serialize, serde::Deserialize)]
2996#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2997pub struct ProtoOaAmendOrderReq {
2998    #[prost(
2999        enumeration = "ProtoOaPayloadType",
3000        optional,
3001        tag = "1",
3002        default = "ProtoOaAmendOrderReq"
3003    )]
3004    pub payload_type: ::core::option::Option<i32>,
3005    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3006    #[prost(int64, required, tag = "2")]
3007    pub ctid_trader_account_id: i64,
3008    /// The unique ID of the order.
3009    #[prost(int64, required, tag = "3")]
3010    pub order_id: i64,
3011    /// Volume, represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units).
3012    #[prost(int64, optional, tag = "4")]
3013    pub volume: ::core::option::Option<i64>,
3014    /// The Limit Price, can be specified for the LIMIT order only.
3015    #[prost(double, optional, tag = "5")]
3016    pub limit_price: ::core::option::Option<f64>,
3017    /// The Stop Price, can be specified for the STOP and the STOP_LIMIT orders.
3018    #[prost(double, optional, tag = "6")]
3019    pub stop_price: ::core::option::Option<f64>,
3020    /// The Unix timestamp in milliseconds of Order expiration. Should be set for the Good Till Date orders.
3021    #[prost(int64, optional, tag = "7")]
3022    pub expiration_timestamp: ::core::option::Option<i64>,
3023    /// The absolute Stop Loss price (e.g. 1.23456). Not supported for MARKET orders.
3024    #[prost(double, optional, tag = "8")]
3025    pub stop_loss: ::core::option::Option<f64>,
3026    /// The absolute Take Profit price (e.g. 1.23456). Not supported for MARKET orders.
3027    #[prost(double, optional, tag = "9")]
3028    pub take_profit: ::core::option::Option<f64>,
3029    /// Slippage distance for the MARKET_RANGE and the STOP_LIMIT orders.
3030    #[prost(int32, optional, tag = "10")]
3031    pub slippage_in_points: ::core::option::Option<i32>,
3032    /// The relative Stop Loss can be specified instead of the absolute one. Specified in 1/100000 of a unit of price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY stopLoss = entryPrice - relativeStopLoss, for SELL stopLoss = entryPrice + relativeStopLoss.
3033    #[prost(int64, optional, tag = "11")]
3034    pub relative_stop_loss: ::core::option::Option<i64>,
3035    /// The relative Take Profit can be specified instead of the absolute one. Specified in 1/100000 of a unit of price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782) For BUY takeProfit = entryPrice + relativeTakeProfit, for SELL takeProfit = entryPrice - relativeTakeProfit.
3036    #[prost(int64, optional, tag = "12")]
3037    pub relative_take_profit: ::core::option::Option<i64>,
3038    /// If TRUE then the Stop Loss is guaranteed. Available for the French Risk or the Guaranteed Stop Loss Accounts.
3039    #[prost(bool, optional, tag = "13")]
3040    pub guaranteed_stop_loss: ::core::option::Option<bool>,
3041    /// If TRUE then the Trailing Stop Loss is applied.
3042    #[prost(bool, optional, tag = "14")]
3043    pub trailing_stop_loss: ::core::option::Option<bool>,
3044    /// Trigger method for the STOP or the STOP_LIMIT pending order.
3045    #[prost(
3046        enumeration = "ProtoOaOrderTriggerMethod",
3047        optional,
3048        tag = "15",
3049        default = "Trade"
3050    )]
3051    pub stop_trigger_method: ::core::option::Option<i32>,
3052}
3053/// * Request for amending StopLoss and TakeProfit of existing position. Allowed only if the accessToken has "trade" permissions for the trading account.
3054#[derive(serde::Serialize, serde::Deserialize)]
3055#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3056pub struct ProtoOaAmendPositionSltpReq {
3057    #[prost(
3058        enumeration = "ProtoOaPayloadType",
3059        optional,
3060        tag = "1",
3061        default = "ProtoOaAmendPositionSltpReq"
3062    )]
3063    pub payload_type: ::core::option::Option<i32>,
3064    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3065    #[prost(int64, required, tag = "2")]
3066    pub ctid_trader_account_id: i64,
3067    /// The unique ID of the position to amend.
3068    #[prost(int64, required, tag = "3")]
3069    pub position_id: i64,
3070    /// Absolute Stop Loss price (1.23456 for example).
3071    #[prost(double, optional, tag = "4")]
3072    pub stop_loss: ::core::option::Option<f64>,
3073    /// Absolute Take Profit price (1.26543 for example).
3074    #[prost(double, optional, tag = "5")]
3075    pub take_profit: ::core::option::Option<f64>,
3076    /// If TRUE then the Stop Loss is guaranteed. Available for the French Risk or the Guaranteed Stop Loss Accounts.
3077    #[prost(bool, optional, tag = "7")]
3078    pub guaranteed_stop_loss: ::core::option::Option<bool>,
3079    /// If TRUE then the Trailing Stop Loss is applied.
3080    #[prost(bool, optional, tag = "8")]
3081    pub trailing_stop_loss: ::core::option::Option<bool>,
3082    /// The Stop trigger method for the Stop Loss/Take Profit order.
3083    #[prost(
3084        enumeration = "ProtoOaOrderTriggerMethod",
3085        optional,
3086        tag = "9",
3087        default = "Trade"
3088    )]
3089    pub stop_loss_trigger_method: ::core::option::Option<i32>,
3090}
3091/// * Request for closing or partially closing of an existing position. Allowed only if the accessToken has "trade" permissions for the trading account.
3092#[derive(serde::Serialize, serde::Deserialize)]
3093#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3094pub struct ProtoOaClosePositionReq {
3095    #[prost(
3096        enumeration = "ProtoOaPayloadType",
3097        optional,
3098        tag = "1",
3099        default = "ProtoOaClosePositionReq"
3100    )]
3101    pub payload_type: ::core::option::Option<i32>,
3102    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3103    #[prost(int64, required, tag = "2")]
3104    pub ctid_trader_account_id: i64,
3105    /// The unique ID of the position to close.
3106    #[prost(int64, required, tag = "3")]
3107    pub position_id: i64,
3108    /// Volume to close, represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units).
3109    #[prost(int64, required, tag = "4")]
3110    pub volume: i64,
3111}
3112/// * Event that is sent when the level of the Trailing Stop Loss is changed due to the price level changes.
3113#[derive(serde::Serialize, serde::Deserialize)]
3114#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3115pub struct ProtoOaTrailingSlChangedEvent {
3116    #[prost(
3117        enumeration = "ProtoOaPayloadType",
3118        optional,
3119        tag = "1",
3120        default = "ProtoOaTrailingSlChangedEvent"
3121    )]
3122    pub payload_type: ::core::option::Option<i32>,
3123    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3124    #[prost(int64, required, tag = "2")]
3125    pub ctid_trader_account_id: i64,
3126    /// The unique ID of the position.
3127    #[prost(int64, required, tag = "3")]
3128    pub position_id: i64,
3129    /// The unique ID of the order.
3130    #[prost(int64, required, tag = "4")]
3131    pub order_id: i64,
3132    /// New value of the Stop Loss price.
3133    #[prost(double, required, tag = "5")]
3134    pub stop_price: f64,
3135    /// The Unix time in milliseconds when the Stop Loss was updated.
3136    #[prost(int64, required, tag = "6")]
3137    pub utc_last_update_timestamp: i64,
3138}
3139/// * Request for the list of assets available for a trader's account.
3140#[derive(serde::Serialize, serde::Deserialize)]
3141#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3142pub struct ProtoOaAssetListReq {
3143    #[prost(
3144        enumeration = "ProtoOaPayloadType",
3145        optional,
3146        tag = "1",
3147        default = "ProtoOaAssetListReq"
3148    )]
3149    pub payload_type: ::core::option::Option<i32>,
3150    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3151    #[prost(int64, required, tag = "2")]
3152    pub ctid_trader_account_id: i64,
3153}
3154/// * Response to the ProtoOAAssetListReq request.
3155#[derive(serde::Serialize, serde::Deserialize)]
3156#[derive(Clone, PartialEq, ::prost::Message)]
3157pub struct ProtoOaAssetListRes {
3158    #[prost(
3159        enumeration = "ProtoOaPayloadType",
3160        optional,
3161        tag = "1",
3162        default = "ProtoOaAssetListRes"
3163    )]
3164    pub payload_type: ::core::option::Option<i32>,
3165    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3166    #[prost(int64, required, tag = "2")]
3167    pub ctid_trader_account_id: i64,
3168    /// The list of assets.
3169    #[prost(message, repeated, tag = "3")]
3170    pub asset: ::prost::alloc::vec::Vec<ProtoOaAsset>,
3171}
3172/// * Request for a list of symbols available for a trading account. Symbol entries are returned with the limited set of fields.
3173#[derive(serde::Serialize, serde::Deserialize)]
3174#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3175pub struct ProtoOaSymbolsListReq {
3176    #[prost(
3177        enumeration = "ProtoOaPayloadType",
3178        optional,
3179        tag = "1",
3180        default = "ProtoOaSymbolsListReq"
3181    )]
3182    pub payload_type: ::core::option::Option<i32>,
3183    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3184    #[prost(int64, required, tag = "2")]
3185    pub ctid_trader_account_id: i64,
3186    /// Whether to include old archived symbols into response.
3187    #[prost(bool, optional, tag = "3", default = "false")]
3188    pub include_archived_symbols: ::core::option::Option<bool>,
3189}
3190/// * Response to the ProtoOASymbolsListReq request.
3191#[derive(serde::Serialize, serde::Deserialize)]
3192#[derive(Clone, PartialEq, ::prost::Message)]
3193pub struct ProtoOaSymbolsListRes {
3194    #[prost(
3195        enumeration = "ProtoOaPayloadType",
3196        optional,
3197        tag = "1",
3198        default = "ProtoOaSymbolsListRes"
3199    )]
3200    pub payload_type: ::core::option::Option<i32>,
3201    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3202    #[prost(int64, required, tag = "2")]
3203    pub ctid_trader_account_id: i64,
3204    /// The list of symbols.
3205    #[prost(message, repeated, tag = "3")]
3206    pub symbol: ::prost::alloc::vec::Vec<ProtoOaLightSymbol>,
3207    /// The list of archived symbols.
3208    #[prost(message, repeated, tag = "4")]
3209    pub archived_symbol: ::prost::alloc::vec::Vec<ProtoOaArchivedSymbol>,
3210}
3211/// * Request for getting a full symbol entity.
3212#[derive(serde::Serialize, serde::Deserialize)]
3213#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3214pub struct ProtoOaSymbolByIdReq {
3215    #[prost(
3216        enumeration = "ProtoOaPayloadType",
3217        optional,
3218        tag = "1",
3219        default = "ProtoOaSymbolByIdReq"
3220    )]
3221    pub payload_type: ::core::option::Option<i32>,
3222    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3223    #[prost(int64, required, tag = "2")]
3224    pub ctid_trader_account_id: i64,
3225    /// Unique identifier of the symbol in cTrader platform.
3226    #[prost(int64, repeated, packed = "false", tag = "3")]
3227    pub symbol_id: ::prost::alloc::vec::Vec<i64>,
3228}
3229/// * Response to the ProtoOASymbolByIdReq request.
3230#[derive(serde::Serialize, serde::Deserialize)]
3231#[derive(Clone, PartialEq, ::prost::Message)]
3232pub struct ProtoOaSymbolByIdRes {
3233    #[prost(
3234        enumeration = "ProtoOaPayloadType",
3235        optional,
3236        tag = "1",
3237        default = "ProtoOaSymbolByIdRes"
3238    )]
3239    pub payload_type: ::core::option::Option<i32>,
3240    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3241    #[prost(int64, required, tag = "2")]
3242    pub ctid_trader_account_id: i64,
3243    /// Symbol entity with the full set of fields.
3244    #[prost(message, repeated, tag = "3")]
3245    pub symbol: ::prost::alloc::vec::Vec<ProtoOaSymbol>,
3246    /// Archived symbols.
3247    #[prost(message, repeated, tag = "4")]
3248    pub archived_symbol: ::prost::alloc::vec::Vec<ProtoOaArchivedSymbol>,
3249}
3250/// * Request for getting a conversion chain between two assets that consists of several symbols. Use when no direct quote is available.
3251#[derive(serde::Serialize, serde::Deserialize)]
3252#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3253pub struct ProtoOaSymbolsForConversionReq {
3254    #[prost(
3255        enumeration = "ProtoOaPayloadType",
3256        optional,
3257        tag = "1",
3258        default = "ProtoOaSymbolsForConversionReq"
3259    )]
3260    pub payload_type: ::core::option::Option<i32>,
3261    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3262    #[prost(int64, required, tag = "2")]
3263    pub ctid_trader_account_id: i64,
3264    /// The ID of the firs asset in the conversation chain. e.g.: for EUR/USD the firstAssetId is EUR ID and lastAssetId is USD ID.
3265    #[prost(int64, required, tag = "3")]
3266    pub first_asset_id: i64,
3267    /// The ID of the last asset in the conversation chain. e.g.: for EUR/USD the firstAssetId is EUR ID and lastAssetId is USD ID.
3268    #[prost(int64, required, tag = "4")]
3269    pub last_asset_id: i64,
3270}
3271/// * Response to the ProtoOASymbolsForConversionReq request.
3272#[derive(serde::Serialize, serde::Deserialize)]
3273#[derive(Clone, PartialEq, ::prost::Message)]
3274pub struct ProtoOaSymbolsForConversionRes {
3275    #[prost(
3276        enumeration = "ProtoOaPayloadType",
3277        optional,
3278        tag = "1",
3279        default = "ProtoOaSymbolsForConversionRes"
3280    )]
3281    pub payload_type: ::core::option::Option<i32>,
3282    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3283    #[prost(int64, required, tag = "2")]
3284    pub ctid_trader_account_id: i64,
3285    /// Conversion chain of the symbols (e.g. EUR/USD, USD/JPY, GBP/JPY -> EUR/GBP).
3286    #[prost(message, repeated, tag = "3")]
3287    pub symbol: ::prost::alloc::vec::Vec<ProtoOaLightSymbol>,
3288}
3289/// * Event that is sent when the symbol is changed on the Server side.
3290#[derive(serde::Serialize, serde::Deserialize)]
3291#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3292pub struct ProtoOaSymbolChangedEvent {
3293    #[prost(
3294        enumeration = "ProtoOaPayloadType",
3295        optional,
3296        tag = "1",
3297        default = "ProtoOaSymbolChangedEvent"
3298    )]
3299    pub payload_type: ::core::option::Option<i32>,
3300    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3301    #[prost(int64, required, tag = "2")]
3302    pub ctid_trader_account_id: i64,
3303    /// Unique identifier of the Symbol in cTrader platform.
3304    #[prost(int64, repeated, packed = "false", tag = "3")]
3305    pub symbol_id: ::prost::alloc::vec::Vec<i64>,
3306}
3307/// * Request for a list of asset classes available for the trader's account.
3308#[derive(serde::Serialize, serde::Deserialize)]
3309#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3310pub struct ProtoOaAssetClassListReq {
3311    #[prost(
3312        enumeration = "ProtoOaPayloadType",
3313        optional,
3314        tag = "1",
3315        default = "ProtoOaAssetClassListReq"
3316    )]
3317    pub payload_type: ::core::option::Option<i32>,
3318    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3319    #[prost(int64, required, tag = "2")]
3320    pub ctid_trader_account_id: i64,
3321}
3322/// * Response to the ProtoOAAssetListReq request.
3323#[derive(serde::Serialize, serde::Deserialize)]
3324#[derive(Clone, PartialEq, ::prost::Message)]
3325pub struct ProtoOaAssetClassListRes {
3326    #[prost(
3327        enumeration = "ProtoOaPayloadType",
3328        optional,
3329        tag = "1",
3330        default = "ProtoOaAssetClassListRes"
3331    )]
3332    pub payload_type: ::core::option::Option<i32>,
3333    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3334    #[prost(int64, required, tag = "2")]
3335    pub ctid_trader_account_id: i64,
3336    /// List of the asset classes.
3337    #[prost(message, repeated, tag = "3")]
3338    pub asset_class: ::prost::alloc::vec::Vec<ProtoOaAssetClass>,
3339}
3340/// * Request for getting data of Trader's Account.
3341#[derive(serde::Serialize, serde::Deserialize)]
3342#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3343pub struct ProtoOaTraderReq {
3344    #[prost(
3345        enumeration = "ProtoOaPayloadType",
3346        optional,
3347        tag = "1",
3348        default = "ProtoOaTraderReq"
3349    )]
3350    pub payload_type: ::core::option::Option<i32>,
3351    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3352    #[prost(int64, required, tag = "2")]
3353    pub ctid_trader_account_id: i64,
3354}
3355/// * Response to the ProtoOATraderReq request.
3356#[derive(serde::Serialize, serde::Deserialize)]
3357#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3358pub struct ProtoOaTraderRes {
3359    #[prost(
3360        enumeration = "ProtoOaPayloadType",
3361        optional,
3362        tag = "1",
3363        default = "ProtoOaTraderRes"
3364    )]
3365    pub payload_type: ::core::option::Option<i32>,
3366    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3367    #[prost(int64, required, tag = "2")]
3368    pub ctid_trader_account_id: i64,
3369    /// The Trader account information.
3370    #[prost(message, required, tag = "3")]
3371    pub trader: ProtoOaTrader,
3372}
3373/// * Event that is sent when a Trader is updated on Server side.
3374#[derive(serde::Serialize, serde::Deserialize)]
3375#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3376pub struct ProtoOaTraderUpdatedEvent {
3377    #[prost(
3378        enumeration = "ProtoOaPayloadType",
3379        optional,
3380        tag = "1",
3381        default = "ProtoOaTraderUpdateEvent"
3382    )]
3383    pub payload_type: ::core::option::Option<i32>,
3384    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3385    #[prost(int64, required, tag = "2")]
3386    pub ctid_trader_account_id: i64,
3387    /// The Trader account information.
3388    #[prost(message, required, tag = "3")]
3389    pub trader: ProtoOaTrader,
3390}
3391/// * Request for getting Trader's current open positions and pending orders data.
3392#[derive(serde::Serialize, serde::Deserialize)]
3393#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3394pub struct ProtoOaReconcileReq {
3395    #[prost(
3396        enumeration = "ProtoOaPayloadType",
3397        optional,
3398        tag = "1",
3399        default = "ProtoOaReconcileReq"
3400    )]
3401    pub payload_type: ::core::option::Option<i32>,
3402    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3403    #[prost(int64, required, tag = "2")]
3404    pub ctid_trader_account_id: i64,
3405    /// If TRUE, then current protection orders are returned separately, otherwise you can use position.stopLoss and position.takeProfit fields.
3406    #[prost(bool, optional, tag = "3")]
3407    pub return_protection_orders: ::core::option::Option<bool>,
3408}
3409/// * The response to the ProtoOAReconcileReq request.
3410#[derive(serde::Serialize, serde::Deserialize)]
3411#[derive(Clone, PartialEq, ::prost::Message)]
3412pub struct ProtoOaReconcileRes {
3413    #[prost(
3414        enumeration = "ProtoOaPayloadType",
3415        optional,
3416        tag = "1",
3417        default = "ProtoOaReconcileRes"
3418    )]
3419    pub payload_type: ::core::option::Option<i32>,
3420    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3421    #[prost(int64, required, tag = "2")]
3422    pub ctid_trader_account_id: i64,
3423    /// The list of trader's account open positions.
3424    #[prost(message, repeated, tag = "3")]
3425    pub position: ::prost::alloc::vec::Vec<ProtoOaPosition>,
3426    /// The list of trader's account pending orders.
3427    #[prost(message, repeated, tag = "4")]
3428    pub order: ::prost::alloc::vec::Vec<ProtoOaOrder>,
3429}
3430/// * Event that is sent when errors occur during the order requests.
3431#[derive(serde::Serialize, serde::Deserialize)]
3432#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3433pub struct ProtoOaOrderErrorEvent {
3434    #[prost(
3435        enumeration = "ProtoOaPayloadType",
3436        optional,
3437        tag = "1",
3438        default = "ProtoOaOrderErrorEvent"
3439    )]
3440    pub payload_type: ::core::option::Option<i32>,
3441    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3442    #[prost(int64, required, tag = "5")]
3443    pub ctid_trader_account_id: i64,
3444    /// The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode).
3445    #[prost(string, required, tag = "2")]
3446    pub error_code: ::prost::alloc::string::String,
3447    /// The unique ID of the order.
3448    #[prost(int64, optional, tag = "3")]
3449    pub order_id: ::core::option::Option<i64>,
3450    /// The unique ID of the position.
3451    #[prost(int64, optional, tag = "6")]
3452    pub position_id: ::core::option::Option<i64>,
3453    /// The error description.
3454    #[prost(string, optional, tag = "7")]
3455    pub description: ::core::option::Option<::prost::alloc::string::String>,
3456}
3457/// * Request for getting Trader's deals historical data (execution details).
3458#[derive(serde::Serialize, serde::Deserialize)]
3459#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3460pub struct ProtoOaDealListReq {
3461    #[prost(
3462        enumeration = "ProtoOaPayloadType",
3463        optional,
3464        tag = "1",
3465        default = "ProtoOaDealListReq"
3466    )]
3467    pub payload_type: ::core::option::Option<i32>,
3468    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3469    #[prost(int64, required, tag = "2")]
3470    pub ctid_trader_account_id: i64,
3471    /// The Unix time from which the search starts >=0 (1st Jan 1970).
3472    #[prost(int64, optional, tag = "3")]
3473    pub from_timestamp: ::core::option::Option<i64>,
3474    /// The Unix time where to stop searching \<= 2147483646000 (19th Jan 2038).
3475    #[prost(int64, optional, tag = "4")]
3476    pub to_timestamp: ::core::option::Option<i64>,
3477    /// The maximum number of the deals to return.
3478    #[prost(int32, optional, tag = "5")]
3479    pub max_rows: ::core::option::Option<i32>,
3480}
3481/// * The response to the ProtoOADealListRes request.
3482#[derive(serde::Serialize, serde::Deserialize)]
3483#[derive(Clone, PartialEq, ::prost::Message)]
3484pub struct ProtoOaDealListRes {
3485    #[prost(
3486        enumeration = "ProtoOaPayloadType",
3487        optional,
3488        tag = "1",
3489        default = "ProtoOaDealListRes"
3490    )]
3491    pub payload_type: ::core::option::Option<i32>,
3492    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3493    #[prost(int64, required, tag = "2")]
3494    pub ctid_trader_account_id: i64,
3495    /// The list of the deals.
3496    #[prost(message, repeated, tag = "3")]
3497    pub deal: ::prost::alloc::vec::Vec<ProtoOaDeal>,
3498    /// If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize.
3499    #[prost(bool, required, tag = "4")]
3500    pub has_more: bool,
3501}
3502/// * Request for getting Trader's orders filtered by timestamp
3503#[derive(serde::Serialize, serde::Deserialize)]
3504#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3505pub struct ProtoOaOrderListReq {
3506    #[prost(
3507        enumeration = "ProtoOaPayloadType",
3508        optional,
3509        tag = "1",
3510        default = "ProtoOaOrderListReq"
3511    )]
3512    pub payload_type: ::core::option::Option<i32>,
3513    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3514    #[prost(int64, required, tag = "2")]
3515    pub ctid_trader_account_id: i64,
3516    /// The Unix time from which the search starts >=0 (1st Jan 1970).
3517    #[prost(int64, optional, tag = "3")]
3518    pub from_timestamp: ::core::option::Option<i64>,
3519    /// The Unix time where to stop searching \<= 2147483646000 (19th Jan 2038).
3520    #[prost(int64, optional, tag = "4")]
3521    pub to_timestamp: ::core::option::Option<i64>,
3522}
3523/// * The response to the ProtoOAOrderListReq request.
3524#[derive(serde::Serialize, serde::Deserialize)]
3525#[derive(Clone, PartialEq, ::prost::Message)]
3526pub struct ProtoOaOrderListRes {
3527    #[prost(
3528        enumeration = "ProtoOaPayloadType",
3529        optional,
3530        tag = "1",
3531        default = "ProtoOaOrderListRes"
3532    )]
3533    pub payload_type: ::core::option::Option<i32>,
3534    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3535    #[prost(int64, required, tag = "2")]
3536    pub ctid_trader_account_id: i64,
3537    /// The list of the orders.
3538    #[prost(message, repeated, tag = "3")]
3539    pub order: ::prost::alloc::vec::Vec<ProtoOaOrder>,
3540    /// If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize.
3541    #[prost(bool, required, tag = "4")]
3542    pub has_more: bool,
3543}
3544/// * Request for getting the margin estimate according to leverage profiles. Can be used before sending a new order request. This doesn't consider ACCORDING_TO_GSL margin calculation type, as this calculation is trivial: usedMargin = (VWAP price of the position - GSL price) * volume * Quote2Deposit.
3545#[derive(serde::Serialize, serde::Deserialize)]
3546#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3547pub struct ProtoOaExpectedMarginReq {
3548    #[prost(
3549        enumeration = "ProtoOaPayloadType",
3550        optional,
3551        tag = "1",
3552        default = "ProtoOaExpectedMarginReq"
3553    )]
3554    pub payload_type: ::core::option::Option<i32>,
3555    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3556    #[prost(int64, required, tag = "2")]
3557    pub ctid_trader_account_id: i64,
3558    /// Unique identifier of the Symbol in cTrader platform.
3559    #[prost(int64, required, tag = "3")]
3560    pub symbol_id: i64,
3561    /// Volume represented in 0.01 of a unit (e.g. 1000 in protocol means 10.00 units).
3562    #[prost(int64, repeated, packed = "false", tag = "4")]
3563    pub volume: ::prost::alloc::vec::Vec<i64>,
3564}
3565/// * The response to the ProtoOAExpectedMarginReq request.
3566#[derive(serde::Serialize, serde::Deserialize)]
3567#[derive(Clone, PartialEq, ::prost::Message)]
3568pub struct ProtoOaExpectedMarginRes {
3569    #[prost(
3570        enumeration = "ProtoOaPayloadType",
3571        optional,
3572        tag = "1",
3573        default = "ProtoOaExpectedMarginRes"
3574    )]
3575    pub payload_type: ::core::option::Option<i32>,
3576    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3577    #[prost(int64, required, tag = "2")]
3578    pub ctid_trader_account_id: i64,
3579    /// The buy and sell margin estimate.
3580    #[prost(message, repeated, tag = "3")]
3581    pub margin: ::prost::alloc::vec::Vec<ProtoOaExpectedMargin>,
3582    /// Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects margin.buyMargin, margin.sellMargin.
3583    #[prost(uint32, optional, tag = "4")]
3584    pub money_digits: ::core::option::Option<u32>,
3585}
3586/// * Event that is sent when the margin allocated to a specific position is changed.
3587#[derive(serde::Serialize, serde::Deserialize)]
3588#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3589pub struct ProtoOaMarginChangedEvent {
3590    #[prost(
3591        enumeration = "ProtoOaPayloadType",
3592        optional,
3593        tag = "1",
3594        default = "ProtoOaMarginChangedEvent"
3595    )]
3596    pub payload_type: ::core::option::Option<i32>,
3597    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3598    #[prost(int64, required, tag = "2")]
3599    pub ctid_trader_account_id: i64,
3600    /// The unique ID of the position.
3601    #[prost(uint64, required, tag = "3")]
3602    pub position_id: u64,
3603    /// The new value of the margin used.
3604    #[prost(uint64, required, tag = "4")]
3605    pub used_margin: u64,
3606    /// Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects usedMargin.
3607    #[prost(uint32, optional, tag = "5")]
3608    pub money_digits: ::core::option::Option<u32>,
3609}
3610/// * Request for getting Trader's historical data of deposits and withdrawals.
3611#[derive(serde::Serialize, serde::Deserialize)]
3612#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3613pub struct ProtoOaCashFlowHistoryListReq {
3614    #[prost(
3615        enumeration = "ProtoOaPayloadType",
3616        optional,
3617        tag = "1",
3618        default = "ProtoOaCashFlowHistoryListReq"
3619    )]
3620    pub payload_type: ::core::option::Option<i32>,
3621    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3622    #[prost(int64, required, tag = "2")]
3623    pub ctid_trader_account_id: i64,
3624    /// The Unix time from which the search starts >=0 (1st Jan 1970). Validation: toTimestamp - fromTimestamp \<= 604800000 (1 week).
3625    #[prost(int64, required, tag = "3")]
3626    pub from_timestamp: i64,
3627    /// The Unix time where to stop searching \<= 2147483646000 (19th Jan 2038).
3628    #[prost(int64, required, tag = "4")]
3629    pub to_timestamp: i64,
3630}
3631/// * Response to the ProtoOACashFlowHistoryListReq request.
3632#[derive(serde::Serialize, serde::Deserialize)]
3633#[derive(Clone, PartialEq, ::prost::Message)]
3634pub struct ProtoOaCashFlowHistoryListRes {
3635    #[prost(
3636        enumeration = "ProtoOaPayloadType",
3637        optional,
3638        tag = "1",
3639        default = "ProtoOaCashFlowHistoryListRes"
3640    )]
3641    pub payload_type: ::core::option::Option<i32>,
3642    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3643    #[prost(int64, required, tag = "2")]
3644    pub ctid_trader_account_id: i64,
3645    /// The list of deposit and withdrawal operations.
3646    #[prost(message, repeated, tag = "3")]
3647    pub deposit_withdraw: ::prost::alloc::vec::Vec<ProtoOaDepositWithdraw>,
3648}
3649/// * Request for getting the list of granted trader's account for the access token.
3650#[derive(serde::Serialize, serde::Deserialize)]
3651#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3652pub struct ProtoOaGetAccountListByAccessTokenReq {
3653    #[prost(
3654        enumeration = "ProtoOaPayloadType",
3655        optional,
3656        tag = "1",
3657        default = "ProtoOaGetAccountsByAccessTokenReq"
3658    )]
3659    pub payload_type: ::core::option::Option<i32>,
3660    /// The Access Token issued for providing access to the Trader's Account.
3661    #[prost(string, required, tag = "2")]
3662    pub access_token: ::prost::alloc::string::String,
3663}
3664/// * Response to the ProtoOAGetAccountListByAccessTokenReq request.
3665#[derive(serde::Serialize, serde::Deserialize)]
3666#[derive(Clone, PartialEq, ::prost::Message)]
3667pub struct ProtoOaGetAccountListByAccessTokenRes {
3668    #[prost(
3669        enumeration = "ProtoOaPayloadType",
3670        optional,
3671        tag = "1",
3672        default = "ProtoOaGetAccountsByAccessTokenRes"
3673    )]
3674    pub payload_type: ::core::option::Option<i32>,
3675    /// The Access Token issued for providing access to the Trader's Account.
3676    #[prost(string, required, tag = "2")]
3677    pub access_token: ::prost::alloc::string::String,
3678    /// SCOPE_VIEW, SCOPE_TRADE.
3679    #[prost(enumeration = "ProtoOaClientPermissionScope", optional, tag = "3")]
3680    pub permission_scope: ::core::option::Option<i32>,
3681    /// The list of the accounts.
3682    #[prost(message, repeated, tag = "4")]
3683    pub ctid_trader_account: ::prost::alloc::vec::Vec<ProtoOaCtidTraderAccount>,
3684}
3685/// * Request to refresh the access token using refresh token of granted trader's account.
3686#[derive(serde::Serialize, serde::Deserialize)]
3687#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3688pub struct ProtoOaRefreshTokenReq {
3689    #[prost(
3690        enumeration = "ProtoOaPayloadType",
3691        optional,
3692        tag = "1",
3693        default = "ProtoOaRefreshTokenReq"
3694    )]
3695    pub payload_type: ::core::option::Option<i32>,
3696    /// The Refresh Token issued for updating Access Token.
3697    #[prost(string, required, tag = "2")]
3698    pub refresh_token: ::prost::alloc::string::String,
3699}
3700/// * Response to the ProtoOARefreshTokenReq request.
3701#[derive(serde::Serialize, serde::Deserialize)]
3702#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3703pub struct ProtoOaRefreshTokenRes {
3704    #[prost(
3705        enumeration = "ProtoOaPayloadType",
3706        optional,
3707        tag = "1",
3708        default = "ProtoOaRefreshTokenRes"
3709    )]
3710    pub payload_type: ::core::option::Option<i32>,
3711    /// The Access Token issued for providing access to the Trader's Account.
3712    #[prost(string, required, tag = "2")]
3713    pub access_token: ::prost::alloc::string::String,
3714    /// bearer
3715    #[prost(string, required, tag = "3")]
3716    pub token_type: ::prost::alloc::string::String,
3717    /// Access Token expiration in seconds.
3718    #[prost(int64, required, tag = "4")]
3719    pub expires_in: i64,
3720    /// Your new Refresh Token.
3721    #[prost(string, required, tag = "5")]
3722    pub refresh_token: ::prost::alloc::string::String,
3723}
3724/// * Request for subscribing on spot events of the specified symbol. After successful subscription you'll receive technical ProtoOASpotEvent with latest price, after which you'll start receiving updates on prices via consequent ProtoOASpotEvents.
3725#[derive(serde::Serialize, serde::Deserialize)]
3726#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3727pub struct ProtoOaSubscribeSpotsReq {
3728    #[prost(
3729        enumeration = "ProtoOaPayloadType",
3730        optional,
3731        tag = "1",
3732        default = "ProtoOaSubscribeSpotsReq"
3733    )]
3734    pub payload_type: ::core::option::Option<i32>,
3735    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3736    #[prost(int64, required, tag = "2")]
3737    pub ctid_trader_account_id: i64,
3738    /// Unique identifier of the Symbol in cTrader platform.
3739    #[prost(int64, repeated, packed = "false", tag = "3")]
3740    pub symbol_id: ::prost::alloc::vec::Vec<i64>,
3741    /// If TRUE you will also receive the timestamp in ProtoOASpotEvent.
3742    #[prost(bool, optional, tag = "4")]
3743    pub subscribe_to_spot_timestamp: ::core::option::Option<bool>,
3744}
3745/// * Response to the ProtoOASubscribeSpotsReq request. Reflects that your request to subscribe for symbol has been added to queue. You'll receive technical ProtoOASpotEvent with current price shortly after this response.
3746#[derive(serde::Serialize, serde::Deserialize)]
3747#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3748pub struct ProtoOaSubscribeSpotsRes {
3749    #[prost(
3750        enumeration = "ProtoOaPayloadType",
3751        optional,
3752        tag = "1",
3753        default = "ProtoOaSubscribeSpotsRes"
3754    )]
3755    pub payload_type: ::core::option::Option<i32>,
3756    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3757    #[prost(int64, required, tag = "2")]
3758    pub ctid_trader_account_id: i64,
3759}
3760/// * Request for unsubscribing from the spot events of the specified symbol. Request to stop receiving ProtoOASpotEvents related to particular symbols. Unsubscription is useful to minimize traffic, especially during high volatility events.
3761#[derive(serde::Serialize, serde::Deserialize)]
3762#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3763pub struct ProtoOaUnsubscribeSpotsReq {
3764    #[prost(
3765        enumeration = "ProtoOaPayloadType",
3766        optional,
3767        tag = "1",
3768        default = "ProtoOaUnsubscribeSpotsReq"
3769    )]
3770    pub payload_type: ::core::option::Option<i32>,
3771    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3772    #[prost(int64, required, tag = "2")]
3773    pub ctid_trader_account_id: i64,
3774    /// Unique identifier of the Symbol in cTrader platform.
3775    #[prost(int64, repeated, packed = "false", tag = "3")]
3776    pub symbol_id: ::prost::alloc::vec::Vec<i64>,
3777}
3778/// * Response to the ProtoOASubscribeSpotsRes request. Reflects that your request to unsubscribe will has been added to queue and will be completed shortly. You may still occasionally receive ProtoOASpotEvents until request processing is complete.
3779#[derive(serde::Serialize, serde::Deserialize)]
3780#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3781pub struct ProtoOaUnsubscribeSpotsRes {
3782    #[prost(
3783        enumeration = "ProtoOaPayloadType",
3784        optional,
3785        tag = "1",
3786        default = "ProtoOaUnsubscribeSpotsRes"
3787    )]
3788    pub payload_type: ::core::option::Option<i32>,
3789    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3790    #[prost(int64, required, tag = "2")]
3791    pub ctid_trader_account_id: i64,
3792}
3793/// * Event that is sent when a new spot event is generated on the server side. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq. First event, received after subscription will contain latest spot prices even if market is closed.
3794#[derive(serde::Serialize, serde::Deserialize)]
3795#[derive(Clone, PartialEq, ::prost::Message)]
3796pub struct ProtoOaSpotEvent {
3797    #[prost(
3798        enumeration = "ProtoOaPayloadType",
3799        optional,
3800        tag = "1",
3801        default = "ProtoOaSpotEvent"
3802    )]
3803    pub payload_type: ::core::option::Option<i32>,
3804    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3805    #[prost(int64, required, tag = "2")]
3806    pub ctid_trader_account_id: i64,
3807    /// Unique identifier of the Symbol in cTrader platform.
3808    #[prost(int64, required, tag = "3")]
3809    pub symbol_id: i64,
3810    /// Bid price. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782)
3811    #[prost(uint64, optional, tag = "4")]
3812    pub bid: ::core::option::Option<u64>,
3813    /// Ask price. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782)
3814    #[prost(uint64, optional, tag = "5")]
3815    pub ask: ::core::option::Option<u64>,
3816    /// Returns live trend bar. Requires subscription on the trend bars.
3817    #[prost(message, repeated, tag = "6")]
3818    pub trendbar: ::prost::alloc::vec::Vec<ProtoOaTrendbar>,
3819    /// Last session close. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782)
3820    #[prost(uint64, optional, tag = "7")]
3821    pub session_close: ::core::option::Option<u64>,
3822    /// The Unix time for spot.
3823    #[prost(int64, optional, tag = "8")]
3824    pub timestamp: ::core::option::Option<i64>,
3825}
3826/// * Request for subscribing for live trend bars. Requires subscription on the spot events, see ProtoOASubscribeSpotsReq.
3827#[derive(serde::Serialize, serde::Deserialize)]
3828#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3829pub struct ProtoOaSubscribeLiveTrendbarReq {
3830    #[prost(
3831        enumeration = "ProtoOaPayloadType",
3832        optional,
3833        tag = "1",
3834        default = "ProtoOaSubscribeLiveTrendbarReq"
3835    )]
3836    pub payload_type: ::core::option::Option<i32>,
3837    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3838    #[prost(int64, required, tag = "2")]
3839    pub ctid_trader_account_id: i64,
3840    /// Specifies period of trend bar series (e.g. M1, M10, etc.).
3841    #[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "3")]
3842    pub period: i32,
3843    /// Unique identifier of the Symbol in cTrader platform.
3844    #[prost(int64, required, tag = "4")]
3845    pub symbol_id: i64,
3846}
3847/// * Response to the ProtoOASubscribeLiveTrendbarReq request.
3848#[derive(serde::Serialize, serde::Deserialize)]
3849#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3850pub struct ProtoOaSubscribeLiveTrendbarRes {
3851    #[prost(
3852        enumeration = "ProtoOaPayloadType",
3853        optional,
3854        tag = "1",
3855        default = "ProtoOaSubscribeLiveTrendbarRes"
3856    )]
3857    pub payload_type: ::core::option::Option<i32>,
3858    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3859    #[prost(int64, required, tag = "2")]
3860    pub ctid_trader_account_id: i64,
3861}
3862/// * Request for unsubscribing from the live trend bars.
3863#[derive(serde::Serialize, serde::Deserialize)]
3864#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3865pub struct ProtoOaUnsubscribeLiveTrendbarReq {
3866    #[prost(
3867        enumeration = "ProtoOaPayloadType",
3868        optional,
3869        tag = "1",
3870        default = "ProtoOaUnsubscribeLiveTrendbarReq"
3871    )]
3872    pub payload_type: ::core::option::Option<i32>,
3873    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3874    #[prost(int64, required, tag = "2")]
3875    pub ctid_trader_account_id: i64,
3876    /// Specifies period of trend bar series (e.g. M1, M10, etc.).
3877    #[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "3")]
3878    pub period: i32,
3879    /// Unique identifier of the Symbol in cTrader platform.
3880    #[prost(int64, required, tag = "4")]
3881    pub symbol_id: i64,
3882}
3883/// * Response to the ProtoOASubscribeLiveTrendbarReq request.
3884#[derive(serde::Serialize, serde::Deserialize)]
3885#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3886pub struct ProtoOaUnsubscribeLiveTrendbarRes {
3887    #[prost(
3888        enumeration = "ProtoOaPayloadType",
3889        optional,
3890        tag = "1",
3891        default = "ProtoOaUnsubscribeLiveTrendbarRes"
3892    )]
3893    pub payload_type: ::core::option::Option<i32>,
3894    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3895    #[prost(int64, required, tag = "2")]
3896    pub ctid_trader_account_id: i64,
3897}
3898/// * Request for getting historical trend bars for the symbol.
3899#[derive(serde::Serialize, serde::Deserialize)]
3900#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3901pub struct ProtoOaGetTrendbarsReq {
3902    #[prost(
3903        enumeration = "ProtoOaPayloadType",
3904        optional,
3905        tag = "1",
3906        default = "ProtoOaGetTrendbarsReq"
3907    )]
3908    pub payload_type: ::core::option::Option<i32>,
3909    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3910    #[prost(int64, required, tag = "2")]
3911    pub ctid_trader_account_id: i64,
3912    /// The Unix time in milliseconds from which the search starts. Must be bigger or equal to zero (1st Jan 1970).
3913    #[prost(int64, optional, tag = "3")]
3914    pub from_timestamp: ::core::option::Option<i64>,
3915    /// The Unix time in milliseconds of finishing the search. Smaller or equal to 2147483646000 (19th Jan 2038).
3916    #[prost(int64, optional, tag = "4")]
3917    pub to_timestamp: ::core::option::Option<i64>,
3918    /// Specifies period of trend bar series (e.g. M1, M10, etc.).
3919    #[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "5")]
3920    pub period: i32,
3921    /// Unique identifier of the Symbol in cTrader platform.
3922    #[prost(int64, required, tag = "6")]
3923    pub symbol_id: i64,
3924    /// Limit number of trend bars in response back from toTimestamp.
3925    #[prost(uint32, optional, tag = "7")]
3926    pub count: ::core::option::Option<u32>,
3927}
3928/// * Response to the ProtoOAGetTrendbarsReq request.
3929#[derive(serde::Serialize, serde::Deserialize)]
3930#[derive(Clone, PartialEq, ::prost::Message)]
3931pub struct ProtoOaGetTrendbarsRes {
3932    #[prost(
3933        enumeration = "ProtoOaPayloadType",
3934        optional,
3935        tag = "1",
3936        default = "ProtoOaGetTrendbarsRes"
3937    )]
3938    pub payload_type: ::core::option::Option<i32>,
3939    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3940    #[prost(int64, required, tag = "2")]
3941    pub ctid_trader_account_id: i64,
3942    /// Specifies period of trend bar series (e.g. M1, M10, etc.).
3943    #[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "3")]
3944    pub period: i32,
3945    /// Simply don't use this field, as your original request already contains toTimestamp.
3946    #[deprecated]
3947    #[prost(int64, optional, tag = "4")]
3948    pub timestamp: ::core::option::Option<i64>,
3949    /// The list of trend bars.
3950    #[prost(message, repeated, tag = "5")]
3951    pub trendbar: ::prost::alloc::vec::Vec<ProtoOaTrendbar>,
3952    /// Unique identifier of the Symbol in cTrader platform.
3953    #[prost(int64, optional, tag = "6")]
3954    pub symbol_id: ::core::option::Option<i64>,
3955    /// If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize.
3956    #[prost(bool, optional, tag = "7")]
3957    pub has_more: ::core::option::Option<bool>,
3958}
3959/// * Request for getting historical tick data for the symbol.
3960#[derive(serde::Serialize, serde::Deserialize)]
3961#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3962pub struct ProtoOaGetTickDataReq {
3963    #[prost(
3964        enumeration = "ProtoOaPayloadType",
3965        optional,
3966        tag = "1",
3967        default = "ProtoOaGetTickdataReq"
3968    )]
3969    pub payload_type: ::core::option::Option<i32>,
3970    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3971    #[prost(int64, required, tag = "2")]
3972    pub ctid_trader_account_id: i64,
3973    /// Unique identifier of the Symbol in cTrader platform.
3974    #[prost(int64, required, tag = "3")]
3975    pub symbol_id: i64,
3976    /// Bid/Ask (1/2).
3977    #[prost(enumeration = "ProtoOaQuoteType", required, tag = "4")]
3978    pub r#type: i32,
3979    /// The Unix time in milliseconds of starting the search. Must be bigger or equal to zero (1st Jan 1970).
3980    #[prost(int64, optional, tag = "5")]
3981    pub from_timestamp: ::core::option::Option<i64>,
3982    /// The Unix time in milliseconds of finishing the search. \<= 2147483646000 (19th Jan 2038).
3983    #[prost(int64, optional, tag = "6")]
3984    pub to_timestamp: ::core::option::Option<i64>,
3985}
3986/// * Response to the ProtoOAGetTickDataReq request.
3987#[derive(serde::Serialize, serde::Deserialize)]
3988#[derive(Clone, PartialEq, ::prost::Message)]
3989pub struct ProtoOaGetTickDataRes {
3990    #[prost(
3991        enumeration = "ProtoOaPayloadType",
3992        optional,
3993        tag = "1",
3994        default = "ProtoOaGetTickdataRes"
3995    )]
3996    pub payload_type: ::core::option::Option<i32>,
3997    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
3998    #[prost(int64, required, tag = "2")]
3999    pub ctid_trader_account_id: i64,
4000    /// The list of ticks is in chronological order (newest first). The first tick contains Unix time in milliseconds while all subsequent ticks have the time difference in milliseconds between the previous and the current one.
4001    #[prost(message, repeated, tag = "3")]
4002    pub tick_data: ::prost::alloc::vec::Vec<ProtoOaTickData>,
4003    /// If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize.
4004    #[prost(bool, required, tag = "4")]
4005    pub has_more: bool,
4006}
4007/// * Request for getting details of Trader's profile. Limited due to GDRP requirements.
4008#[derive(serde::Serialize, serde::Deserialize)]
4009#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4010pub struct ProtoOaGetCtidProfileByTokenReq {
4011    #[prost(
4012        enumeration = "ProtoOaPayloadType",
4013        optional,
4014        tag = "1",
4015        default = "ProtoOaGetCtidProfileByTokenReq"
4016    )]
4017    pub payload_type: ::core::option::Option<i32>,
4018    /// The Access Token issued for providing access to the Trader's Account.
4019    #[prost(string, required, tag = "2")]
4020    pub access_token: ::prost::alloc::string::String,
4021}
4022/// * Response to the ProtoOAGetCtidProfileByTokenReq request.
4023#[derive(serde::Serialize, serde::Deserialize)]
4024#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4025pub struct ProtoOaGetCtidProfileByTokenRes {
4026    #[prost(
4027        enumeration = "ProtoOaPayloadType",
4028        optional,
4029        tag = "1",
4030        default = "ProtoOaGetCtidProfileByTokenRes"
4031    )]
4032    pub payload_type: ::core::option::Option<i32>,
4033    /// Trader's profile.
4034    #[prost(message, required, tag = "2")]
4035    pub profile: ProtoOaCtidProfile,
4036}
4037/// * Event that is sent when the structure of depth of market is changed. Requires subscription on the depth of markets for the symbol, see ProtoOASubscribeDepthQuotesReq.
4038#[derive(serde::Serialize, serde::Deserialize)]
4039#[derive(Clone, PartialEq, ::prost::Message)]
4040pub struct ProtoOaDepthEvent {
4041    #[prost(
4042        enumeration = "ProtoOaPayloadType",
4043        optional,
4044        tag = "1",
4045        default = "ProtoOaDepthEvent"
4046    )]
4047    pub payload_type: ::core::option::Option<i32>,
4048    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4049    #[prost(int64, required, tag = "2")]
4050    pub ctid_trader_account_id: i64,
4051    /// Unique identifier of the Symbol in cTrader platform.
4052    #[prost(uint64, required, tag = "3")]
4053    pub symbol_id: u64,
4054    /// The list of changes in the depth of market quotes.
4055    #[prost(message, repeated, tag = "4")]
4056    pub new_quotes: ::prost::alloc::vec::Vec<ProtoOaDepthQuote>,
4057    /// The list of quotes to delete.
4058    #[prost(uint64, repeated, tag = "5")]
4059    pub deleted_quotes: ::prost::alloc::vec::Vec<u64>,
4060}
4061/// * Request for subscribing on depth of market of the specified symbol.
4062#[derive(serde::Serialize, serde::Deserialize)]
4063#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4064pub struct ProtoOaSubscribeDepthQuotesReq {
4065    #[prost(
4066        enumeration = "ProtoOaPayloadType",
4067        optional,
4068        tag = "1",
4069        default = "ProtoOaSubscribeDepthQuotesReq"
4070    )]
4071    pub payload_type: ::core::option::Option<i32>,
4072    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4073    #[prost(int64, required, tag = "2")]
4074    pub ctid_trader_account_id: i64,
4075    /// Unique identifier of the Symbol in cTrader platform.
4076    #[prost(int64, repeated, packed = "false", tag = "3")]
4077    pub symbol_id: ::prost::alloc::vec::Vec<i64>,
4078}
4079/// * Response to the ProtoOASubscribeDepthQuotesReq request.
4080#[derive(serde::Serialize, serde::Deserialize)]
4081#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4082pub struct ProtoOaSubscribeDepthQuotesRes {
4083    #[prost(
4084        enumeration = "ProtoOaPayloadType",
4085        optional,
4086        tag = "1",
4087        default = "ProtoOaSubscribeDepthQuotesRes"
4088    )]
4089    pub payload_type: ::core::option::Option<i32>,
4090    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4091    #[prost(int64, required, tag = "2")]
4092    pub ctid_trader_account_id: i64,
4093}
4094/// * Request for unsubscribing from the depth of market of the specified symbol.
4095#[derive(serde::Serialize, serde::Deserialize)]
4096#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4097pub struct ProtoOaUnsubscribeDepthQuotesReq {
4098    #[prost(
4099        enumeration = "ProtoOaPayloadType",
4100        optional,
4101        tag = "1",
4102        default = "ProtoOaUnsubscribeDepthQuotesReq"
4103    )]
4104    pub payload_type: ::core::option::Option<i32>,
4105    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4106    #[prost(int64, required, tag = "2")]
4107    pub ctid_trader_account_id: i64,
4108    /// Unique identifier of the Symbol in cTrader platform.
4109    #[prost(int64, repeated, packed = "false", tag = "3")]
4110    pub symbol_id: ::prost::alloc::vec::Vec<i64>,
4111}
4112/// * Response to the ProtoOAUnsubscribeDepthQuotesReq request.
4113#[derive(serde::Serialize, serde::Deserialize)]
4114#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4115pub struct ProtoOaUnsubscribeDepthQuotesRes {
4116    #[prost(
4117        enumeration = "ProtoOaPayloadType",
4118        optional,
4119        tag = "1",
4120        default = "ProtoOaUnsubscribeDepthQuotesRes"
4121    )]
4122    pub payload_type: ::core::option::Option<i32>,
4123    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4124    #[prost(int64, required, tag = "2")]
4125    pub ctid_trader_account_id: i64,
4126}
4127/// * Request for a list of symbol categories available for a trading account.
4128#[derive(serde::Serialize, serde::Deserialize)]
4129#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4130pub struct ProtoOaSymbolCategoryListReq {
4131    #[prost(
4132        enumeration = "ProtoOaPayloadType",
4133        optional,
4134        tag = "1",
4135        default = "ProtoOaSymbolCategoryReq"
4136    )]
4137    pub payload_type: ::core::option::Option<i32>,
4138    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4139    #[prost(int64, required, tag = "2")]
4140    pub ctid_trader_account_id: i64,
4141}
4142/// * Response to the ProtoSymbolCategoryListReq request.
4143#[derive(serde::Serialize, serde::Deserialize)]
4144#[derive(Clone, PartialEq, ::prost::Message)]
4145pub struct ProtoOaSymbolCategoryListRes {
4146    #[prost(
4147        enumeration = "ProtoOaPayloadType",
4148        optional,
4149        tag = "1",
4150        default = "ProtoOaSymbolCategoryRes"
4151    )]
4152    pub payload_type: ::core::option::Option<i32>,
4153    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4154    #[prost(int64, required, tag = "2")]
4155    pub ctid_trader_account_id: i64,
4156    /// The list of symbol categories.
4157    #[prost(message, repeated, tag = "3")]
4158    pub symbol_category: ::prost::alloc::vec::Vec<ProtoOaSymbolCategory>,
4159}
4160/// * Request for logout of trading account session.
4161#[derive(serde::Serialize, serde::Deserialize)]
4162#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4163pub struct ProtoOaAccountLogoutReq {
4164    #[prost(
4165        enumeration = "ProtoOaPayloadType",
4166        optional,
4167        tag = "1",
4168        default = "ProtoOaAccountLogoutReq"
4169    )]
4170    pub payload_type: ::core::option::Option<i32>,
4171    /// The unique identifier of the trader's account in cTrader platform.
4172    #[prost(int64, required, tag = "2")]
4173    pub ctid_trader_account_id: i64,
4174}
4175/// * Response to the ProtoOAAccountLogoutReq request. Actual logout of trading account will be completed on ProtoOAAccountDisconnectEvent.
4176#[derive(serde::Serialize, serde::Deserialize)]
4177#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4178pub struct ProtoOaAccountLogoutRes {
4179    #[prost(
4180        enumeration = "ProtoOaPayloadType",
4181        optional,
4182        tag = "1",
4183        default = "ProtoOaAccountLogoutRes"
4184    )]
4185    pub payload_type: ::core::option::Option<i32>,
4186    /// The unique identifier of the trader's account in cTrader platform.
4187    #[prost(int64, required, tag = "2")]
4188    pub ctid_trader_account_id: i64,
4189}
4190/// * Event that is sent when the established session for an account is dropped on the server side. A new session must be authorized for the account.
4191#[derive(serde::Serialize, serde::Deserialize)]
4192#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4193pub struct ProtoOaAccountDisconnectEvent {
4194    #[prost(
4195        enumeration = "ProtoOaPayloadType",
4196        optional,
4197        tag = "1",
4198        default = "ProtoOaAccountDisconnectEvent"
4199    )]
4200    pub payload_type: ::core::option::Option<i32>,
4201    /// The unique identifier of the trader's account in cTrader platform.
4202    #[prost(int64, required, tag = "2")]
4203    pub ctid_trader_account_id: i64,
4204}
4205/// * Request for a list of existing margin call thresholds configured for a user.
4206#[derive(serde::Serialize, serde::Deserialize)]
4207#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4208pub struct ProtoOaMarginCallListReq {
4209    #[prost(
4210        enumeration = "ProtoOaPayloadType",
4211        optional,
4212        tag = "1",
4213        default = "ProtoOaMarginCallListReq"
4214    )]
4215    pub payload_type: ::core::option::Option<i32>,
4216    #[prost(int64, required, tag = "2")]
4217    pub ctid_trader_account_id: i64,
4218}
4219/// * Response with a list of existing user Margin Calls, usually contains 3 items.
4220#[derive(serde::Serialize, serde::Deserialize)]
4221#[derive(Clone, PartialEq, ::prost::Message)]
4222pub struct ProtoOaMarginCallListRes {
4223    #[prost(
4224        enumeration = "ProtoOaPayloadType",
4225        optional,
4226        tag = "1",
4227        default = "ProtoOaMarginCallListRes"
4228    )]
4229    pub payload_type: ::core::option::Option<i32>,
4230    #[prost(message, repeated, tag = "2")]
4231    pub margin_call: ::prost::alloc::vec::Vec<ProtoOaMarginCall>,
4232}
4233/// * Request to modify marginLevelThreshold of specified marginCallType for ctidTraderAccountId.
4234#[derive(serde::Serialize, serde::Deserialize)]
4235#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4236pub struct ProtoOaMarginCallUpdateReq {
4237    #[prost(
4238        enumeration = "ProtoOaPayloadType",
4239        optional,
4240        tag = "1",
4241        default = "ProtoOaMarginCallUpdateReq"
4242    )]
4243    pub payload_type: ::core::option::Option<i32>,
4244    #[prost(int64, required, tag = "2")]
4245    pub ctid_trader_account_id: i64,
4246    #[prost(message, required, tag = "3")]
4247    pub margin_call: ProtoOaMarginCall,
4248}
4249/// * If this response received, it means that margin call was successfully updated.
4250#[derive(serde::Serialize, serde::Deserialize)]
4251#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4252pub struct ProtoOaMarginCallUpdateRes {
4253    #[prost(
4254        enumeration = "ProtoOaPayloadType",
4255        optional,
4256        tag = "1",
4257        default = "ProtoOaMarginCallUpdateRes"
4258    )]
4259    pub payload_type: ::core::option::Option<i32>,
4260}
4261/// * Event that is sent when a Margin Call threshold configuration is updated.
4262#[derive(serde::Serialize, serde::Deserialize)]
4263#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4264pub struct ProtoOaMarginCallUpdateEvent {
4265    #[prost(
4266        enumeration = "ProtoOaPayloadType",
4267        optional,
4268        tag = "1",
4269        default = "ProtoOaMarginCallUpdateEvent"
4270    )]
4271    pub payload_type: ::core::option::Option<i32>,
4272    #[prost(int64, required, tag = "2")]
4273    pub ctid_trader_account_id: i64,
4274    #[prost(message, required, tag = "3")]
4275    pub margin_call: ProtoOaMarginCall,
4276}
4277/// * Event that is sent when account margin level reaches target marginLevelThreshold. Event is sent no more than once every 10 minutes to avoid spamming.
4278#[derive(serde::Serialize, serde::Deserialize)]
4279#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4280pub struct ProtoOaMarginCallTriggerEvent {
4281    #[prost(
4282        enumeration = "ProtoOaPayloadType",
4283        optional,
4284        tag = "1",
4285        default = "ProtoOaMarginCallTriggerEvent"
4286    )]
4287    pub payload_type: ::core::option::Option<i32>,
4288    #[prost(int64, required, tag = "2")]
4289    pub ctid_trader_account_id: i64,
4290    #[prost(message, required, tag = "3")]
4291    pub margin_call: ProtoOaMarginCall,
4292}
4293/// * Request for getting a dynamic leverage entity referenced in ProtoOASymbol.leverageId.
4294#[derive(serde::Serialize, serde::Deserialize)]
4295#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4296pub struct ProtoOaGetDynamicLeverageByIdReq {
4297    #[prost(
4298        enumeration = "ProtoOaPayloadType",
4299        optional,
4300        tag = "1",
4301        default = "ProtoOaGetDynamicLeverageReq"
4302    )]
4303    pub payload_type: ::core::option::Option<i32>,
4304    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4305    #[prost(int64, required, tag = "2")]
4306    pub ctid_trader_account_id: i64,
4307    #[prost(int64, required, tag = "3")]
4308    pub leverage_id: i64,
4309}
4310/// * Response to the ProtoOAGetDynamicLeverageByIDReq request.
4311#[derive(serde::Serialize, serde::Deserialize)]
4312#[derive(Clone, PartialEq, ::prost::Message)]
4313pub struct ProtoOaGetDynamicLeverageByIdRes {
4314    #[prost(
4315        enumeration = "ProtoOaPayloadType",
4316        optional,
4317        tag = "1",
4318        default = "ProtoOaGetDynamicLeverageRes"
4319    )]
4320    pub payload_type: ::core::option::Option<i32>,
4321    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4322    #[prost(int64, required, tag = "2")]
4323    pub ctid_trader_account_id: i64,
4324    #[prost(message, required, tag = "3")]
4325    pub leverage: ProtoOaDynamicLeverage,
4326}
4327/// * Request for retrieving the deals related to a position.
4328#[derive(serde::Serialize, serde::Deserialize)]
4329#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4330pub struct ProtoOaDealListByPositionIdReq {
4331    #[prost(
4332        enumeration = "ProtoOaPayloadType",
4333        optional,
4334        tag = "1",
4335        default = "ProtoOaDealListByPositionIdReq"
4336    )]
4337    pub payload_type: ::core::option::Option<i32>,
4338    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4339    #[prost(int64, required, tag = "2")]
4340    pub ctid_trader_account_id: i64,
4341    /// The unique ID of the position.
4342    #[prost(int64, required, tag = "3")]
4343    pub position_id: i64,
4344    /// The Unix time in milliseconds of starting the search. Must be bigger or equal to zero (1st Jan 1970).
4345    #[prost(int64, optional, tag = "4")]
4346    pub from_timestamp: ::core::option::Option<i64>,
4347    /// The Unix time in milliseconds of finishing the search. \<= 2147483646000 (19th Jan 2038).
4348    #[prost(int64, optional, tag = "5")]
4349    pub to_timestamp: ::core::option::Option<i64>,
4350}
4351/// * Response to the ProtoOADealListByPositionIdReq request.
4352#[derive(serde::Serialize, serde::Deserialize)]
4353#[derive(Clone, PartialEq, ::prost::Message)]
4354pub struct ProtoOaDealListByPositionIdRes {
4355    #[prost(
4356        enumeration = "ProtoOaPayloadType",
4357        optional,
4358        tag = "1",
4359        default = "ProtoOaDealListByPositionIdRes"
4360    )]
4361    pub payload_type: ::core::option::Option<i32>,
4362    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4363    #[prost(int64, required, tag = "2")]
4364    pub ctid_trader_account_id: i64,
4365    /// The list of deals.
4366    #[prost(message, repeated, tag = "3")]
4367    pub deal: ::prost::alloc::vec::Vec<ProtoOaDeal>,
4368    /// If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize.
4369    #[prost(bool, required, tag = "4")]
4370    pub has_more: bool,
4371}
4372/// * Request for getting Order and its related Deals.
4373#[derive(serde::Serialize, serde::Deserialize)]
4374#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4375pub struct ProtoOaOrderDetailsReq {
4376    #[prost(
4377        enumeration = "ProtoOaPayloadType",
4378        optional,
4379        tag = "1",
4380        default = "ProtoOaOrderDetailsReq"
4381    )]
4382    pub payload_type: ::core::option::Option<i32>,
4383    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4384    #[prost(int64, required, tag = "2")]
4385    pub ctid_trader_account_id: i64,
4386    /// The unique ID of the Order.
4387    #[prost(int64, required, tag = "3")]
4388    pub order_id: i64,
4389}
4390/// * Response to the ProtoOAOrderDetailsReq request.
4391#[derive(serde::Serialize, serde::Deserialize)]
4392#[derive(Clone, PartialEq, ::prost::Message)]
4393pub struct ProtoOaOrderDetailsRes {
4394    #[prost(
4395        enumeration = "ProtoOaPayloadType",
4396        optional,
4397        tag = "1",
4398        default = "ProtoOaOrderDetailsRes"
4399    )]
4400    pub payload_type: ::core::option::Option<i32>,
4401    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4402    #[prost(int64, required, tag = "2")]
4403    pub ctid_trader_account_id: i64,
4404    /// Order details.
4405    #[prost(message, required, tag = "3")]
4406    pub order: ProtoOaOrder,
4407    /// All Deals created by filling the specified Order.
4408    #[prost(message, repeated, tag = "4")]
4409    pub deal: ::prost::alloc::vec::Vec<ProtoOaDeal>,
4410}
4411/// * Request for retrieving Orders related to a Position by using Position ID. Filtered by utcLastUpdateTimestamp.
4412#[derive(serde::Serialize, serde::Deserialize)]
4413#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4414pub struct ProtoOaOrderListByPositionIdReq {
4415    #[prost(
4416        enumeration = "ProtoOaPayloadType",
4417        optional,
4418        tag = "1",
4419        default = "ProtoOaOrderListByPositionIdReq"
4420    )]
4421    pub payload_type: ::core::option::Option<i32>,
4422    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4423    #[prost(int64, required, tag = "2")]
4424    pub ctid_trader_account_id: i64,
4425    /// The unique ID of the Position.
4426    #[prost(int64, required, tag = "3")]
4427    pub position_id: i64,
4428    /// The Unix time from which the search starts >=0 (1st Jan 1970). Search by utcLastUpdateTimestamp of the Order.
4429    #[prost(int64, optional, tag = "4")]
4430    pub from_timestamp: ::core::option::Option<i64>,
4431    /// The Unix time where to stop searching \<= 2147483646000 (19th Jan 2038). Search by utcLastUpdateTimestamp of the Order.
4432    #[prost(int64, optional, tag = "5")]
4433    pub to_timestamp: ::core::option::Option<i64>,
4434}
4435/// * Response to ProtoOAOrderListByPositionIdReq request.
4436#[derive(serde::Serialize, serde::Deserialize)]
4437#[derive(Clone, PartialEq, ::prost::Message)]
4438pub struct ProtoOaOrderListByPositionIdRes {
4439    #[prost(
4440        enumeration = "ProtoOaPayloadType",
4441        optional,
4442        tag = "1",
4443        default = "ProtoOaOrderListByPositionIdRes"
4444    )]
4445    pub payload_type: ::core::option::Option<i32>,
4446    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4447    #[prost(int64, required, tag = "2")]
4448    pub ctid_trader_account_id: i64,
4449    /// Orders related to the specified Position, sorted by utcLastUpdateTimestamp in descending order (newest first).
4450    #[prost(message, repeated, tag = "3")]
4451    pub order: ::prost::alloc::vec::Vec<ProtoOaOrder>,
4452    /// If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize.
4453    #[prost(bool, required, tag = "4")]
4454    pub has_more: bool,
4455}
4456/// * Request for getting sets of Deals that were offset by a specific Deal and that are offsetting the Deal.
4457#[derive(serde::Serialize, serde::Deserialize)]
4458#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4459pub struct ProtoOaDealOffsetListReq {
4460    #[prost(
4461        enumeration = "ProtoOaPayloadType",
4462        optional,
4463        tag = "1",
4464        default = "ProtoOaDealOffsetListReq"
4465    )]
4466    pub payload_type: ::core::option::Option<i32>,
4467    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4468    #[prost(int64, required, tag = "2")]
4469    pub ctid_trader_account_id: i64,
4470    /// The unique ID of the Deal.
4471    #[prost(int64, required, tag = "3")]
4472    pub deal_id: i64,
4473}
4474/// * Response for ProtoOADealOffsetListReq.
4475#[derive(serde::Serialize, serde::Deserialize)]
4476#[derive(Clone, PartialEq, ::prost::Message)]
4477pub struct ProtoOaDealOffsetListRes {
4478    #[prost(
4479        enumeration = "ProtoOaPayloadType",
4480        optional,
4481        tag = "1",
4482        default = "ProtoOaDealOffsetListRes"
4483    )]
4484    pub payload_type: ::core::option::Option<i32>,
4485    /// Unique identifier of the trader's account. Used to match responses to trader's accounts.
4486    #[prost(int64, required, tag = "2")]
4487    pub ctid_trader_account_id: i64,
4488    /// Deals which closed the specified deal.
4489    #[prost(message, repeated, tag = "3")]
4490    pub offset_by: ::prost::alloc::vec::Vec<ProtoOaDealOffset>,
4491    /// Deals which were closed by the specified deal.
4492    #[prost(message, repeated, tag = "4")]
4493    pub offsetting: ::prost::alloc::vec::Vec<ProtoOaDealOffset>,
4494}
4495/// * Request for getting trader's positions' unrealized PnLs.
4496#[derive(serde::Serialize, serde::Deserialize)]
4497#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4498pub struct ProtoOaGetPositionUnrealizedPnLReq {
4499    #[prost(
4500        enumeration = "ProtoOaPayloadType",
4501        optional,
4502        tag = "1",
4503        default = "ProtoOaGetPositionUnrealizedPnlReq"
4504    )]
4505    pub payload_type: ::core::option::Option<i32>,
4506    /// The unique identifier of the trader's account in cTrader platform.
4507    #[prost(int64, required, tag = "2")]
4508    pub ctid_trader_account_id: i64,
4509}
4510/// * Response to ProtoOAGetPositionUnrealizedPnLReq request.
4511#[derive(serde::Serialize, serde::Deserialize)]
4512#[derive(Clone, PartialEq, ::prost::Message)]
4513pub struct ProtoOaGetPositionUnrealizedPnLRes {
4514    #[prost(
4515        enumeration = "ProtoOaPayloadType",
4516        optional,
4517        tag = "1",
4518        default = "ProtoOaGetPositionUnrealizedPnlRes"
4519    )]
4520    pub payload_type: ::core::option::Option<i32>,
4521    /// The unique identifier of the trader's account in cTrader platform.
4522    #[prost(int64, required, tag = "2")]
4523    pub ctid_trader_account_id: i64,
4524    /// Information about trader's positions' unrealized PnLs.
4525    #[prost(message, repeated, tag = "3")]
4526    pub position_unrealized_pn_l: ::prost::alloc::vec::Vec<ProtoOaPositionUnrealizedPnL>,
4527    /// Specifies the exponent of various monetary values. E.g., moneyDigits = 8 should be interpreted as the value multiplied by 10^8 with the 'real' value equal to 10053099944 / 10^8 = 100.53099944. Affects positionUnrealizedPnL.grossUnrealizedPnL, positionUnrealizedPnL.netUnrealizedPnL.
4528    #[prost(uint32, required, tag = "4")]
4529    pub money_digits: u32,
4530}