1#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3#[repr(i32)]
4pub enum ProtoPayloadType {
5 ProtoMessage = 5,
6 ErrorRes = 50,
7 HeartbeatEvent = 51,
8}
9impl ProtoPayloadType {
10 pub fn as_str_name(&self) -> &'static str {
15 match self {
16 Self::ProtoMessage => "PROTO_MESSAGE",
17 Self::ErrorRes => "ERROR_RES",
18 Self::HeartbeatEvent => "HEARTBEAT_EVENT",
19 }
20 }
21 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
23 match value {
24 "PROTO_MESSAGE" => Some(Self::ProtoMessage),
25 "ERROR_RES" => Some(Self::ErrorRes),
26 "HEARTBEAT_EVENT" => Some(Self::HeartbeatEvent),
27 _ => None,
28 }
29 }
30}
31#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
32#[repr(i32)]
33pub enum ProtoErrorCode {
34 UnknownError = 1,
35 UnsupportedMessage = 2,
36 InvalidRequest = 3,
37 TimeoutError = 5,
38 EntityNotFound = 6,
39 CantRouteRequest = 7,
40 FrameTooLong = 8,
41 MarketClosed = 9,
42 ConcurrentModification = 10,
43 BlockedPayloadType = 11,
44}
45impl ProtoErrorCode {
46 pub fn as_str_name(&self) -> &'static str {
51 match self {
52 Self::UnknownError => "UNKNOWN_ERROR",
53 Self::UnsupportedMessage => "UNSUPPORTED_MESSAGE",
54 Self::InvalidRequest => "INVALID_REQUEST",
55 Self::TimeoutError => "TIMEOUT_ERROR",
56 Self::EntityNotFound => "ENTITY_NOT_FOUND",
57 Self::CantRouteRequest => "CANT_ROUTE_REQUEST",
58 Self::FrameTooLong => "FRAME_TOO_LONG",
59 Self::MarketClosed => "MARKET_CLOSED",
60 Self::ConcurrentModification => "CONCURRENT_MODIFICATION",
61 Self::BlockedPayloadType => "BLOCKED_PAYLOAD_TYPE",
62 }
63 }
64 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
66 match value {
67 "UNKNOWN_ERROR" => Some(Self::UnknownError),
68 "UNSUPPORTED_MESSAGE" => Some(Self::UnsupportedMessage),
69 "INVALID_REQUEST" => Some(Self::InvalidRequest),
70 "TIMEOUT_ERROR" => Some(Self::TimeoutError),
71 "ENTITY_NOT_FOUND" => Some(Self::EntityNotFound),
72 "CANT_ROUTE_REQUEST" => Some(Self::CantRouteRequest),
73 "FRAME_TOO_LONG" => Some(Self::FrameTooLong),
74 "MARKET_CLOSED" => Some(Self::MarketClosed),
75 "CONCURRENT_MODIFICATION" => Some(Self::ConcurrentModification),
76 "BLOCKED_PAYLOAD_TYPE" => Some(Self::BlockedPayloadType),
77 _ => None,
78 }
79 }
80}
81#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
82pub struct ProtoMessage {
83 #[prost(uint32, required, tag = "1")]
84 pub payload_type: u32,
85 #[prost(bytes = "vec", optional, tag = "2")]
86 pub payload: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
87 #[prost(string, optional, tag = "3")]
88 pub client_msg_id: ::core::option::Option<::prost::alloc::string::String>,
89}
90#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
91pub struct ProtoErrorRes {
92 #[prost(enumeration = "ProtoPayloadType", optional, tag = "1", default = "ErrorRes")]
93 pub payload_type: ::core::option::Option<i32>,
94 #[prost(string, required, tag = "2")]
95 pub error_code: ::prost::alloc::string::String,
96 #[prost(string, optional, tag = "3")]
97 pub description: ::core::option::Option<::prost::alloc::string::String>,
98 #[prost(uint64, optional, tag = "4")]
99 pub maintenance_end_timestamp: ::core::option::Option<u64>,
100}
101#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
102pub struct ProtoHeartbeatEvent {
103 #[prost(
104 enumeration = "ProtoPayloadType",
105 optional,
106 tag = "1",
107 default = "HeartbeatEvent"
108 )]
109 pub payload_type: ::core::option::Option<i32>,
110}
111#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
112pub struct ProtoOaAsset {
113 #[prost(int64, required, tag = "1")]
114 pub asset_id: i64,
115 #[prost(string, required, tag = "2")]
116 pub name: ::prost::alloc::string::String,
117 #[prost(string, optional, tag = "3")]
118 pub display_name: ::core::option::Option<::prost::alloc::string::String>,
119 #[prost(int32, optional, tag = "4")]
120 pub digits: ::core::option::Option<i32>,
121}
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct ProtoOaSymbol {
124 #[prost(int64, required, tag = "1")]
125 pub symbol_id: i64,
126 #[prost(int32, required, tag = "2")]
127 pub digits: i32,
128 #[prost(int32, required, tag = "3")]
129 pub pip_position: i32,
130 #[prost(bool, optional, tag = "4")]
131 pub enable_short_selling: ::core::option::Option<bool>,
132 #[prost(bool, optional, tag = "5")]
133 pub guaranteed_stop_loss: ::core::option::Option<bool>,
134 #[prost(enumeration = "ProtoOaDayOfWeek", optional, tag = "6", default = "Monday")]
135 pub swap_rollover3_days: ::core::option::Option<i32>,
136 #[prost(double, optional, tag = "7")]
137 pub swap_long: ::core::option::Option<f64>,
138 #[prost(double, optional, tag = "8")]
139 pub swap_short: ::core::option::Option<f64>,
140 #[prost(int64, optional, tag = "9")]
141 pub max_volume: ::core::option::Option<i64>,
142 #[prost(int64, optional, tag = "10")]
143 pub min_volume: ::core::option::Option<i64>,
144 #[prost(int64, optional, tag = "11")]
145 pub step_volume: ::core::option::Option<i64>,
146 #[prost(uint64, optional, tag = "12")]
147 pub max_exposure: ::core::option::Option<u64>,
148 #[prost(message, repeated, tag = "13")]
149 pub schedule: ::prost::alloc::vec::Vec<ProtoOaInterval>,
150 #[deprecated]
151 #[prost(int64, optional, tag = "14")]
152 pub commission: ::core::option::Option<i64>,
153 #[prost(
154 enumeration = "ProtoOaCommissionType",
155 optional,
156 tag = "15",
157 default = "UsdPerMillionUsd"
158 )]
159 pub commission_type: ::core::option::Option<i32>,
160 #[prost(uint32, optional, tag = "16")]
161 pub sl_distance: ::core::option::Option<u32>,
162 #[prost(uint32, optional, tag = "17")]
163 pub tp_distance: ::core::option::Option<u32>,
164 #[prost(uint32, optional, tag = "18")]
165 pub gsl_distance: ::core::option::Option<u32>,
166 #[prost(int64, optional, tag = "19")]
167 pub gsl_charge: ::core::option::Option<i64>,
168 #[prost(
169 enumeration = "ProtoOaSymbolDistanceType",
170 optional,
171 tag = "20",
172 default = "SymbolDistanceInPoints"
173 )]
174 pub distance_set_in: ::core::option::Option<i32>,
175 #[deprecated]
176 #[prost(int64, optional, tag = "21")]
177 pub min_commission: ::core::option::Option<i64>,
178 #[prost(
179 enumeration = "ProtoOaMinCommissionType",
180 optional,
181 tag = "22",
182 default = "Currency"
183 )]
184 pub min_commission_type: ::core::option::Option<i32>,
185 #[prost(string, optional, tag = "23", default = "USD")]
186 pub min_commission_asset: ::core::option::Option<::prost::alloc::string::String>,
187 #[prost(int64, optional, tag = "24")]
188 pub rollover_commission: ::core::option::Option<i64>,
189 #[prost(int32, optional, tag = "25")]
190 pub skip_rollover_days: ::core::option::Option<i32>,
191 #[prost(string, optional, tag = "26")]
192 pub schedule_time_zone: ::core::option::Option<::prost::alloc::string::String>,
193 #[prost(
194 enumeration = "ProtoOaTradingMode",
195 optional,
196 tag = "27",
197 default = "Enabled"
198 )]
199 pub trading_mode: ::core::option::Option<i32>,
200 #[prost(enumeration = "ProtoOaDayOfWeek", optional, tag = "28", default = "Monday")]
201 pub rollover_commission3_days: ::core::option::Option<i32>,
202 #[prost(
203 enumeration = "ProtoOaSwapCalculationType",
204 optional,
205 tag = "29",
206 default = "Pips"
207 )]
208 pub swap_calculation_type: ::core::option::Option<i32>,
209 #[prost(int64, optional, tag = "30")]
210 pub lot_size: ::core::option::Option<i64>,
211 #[prost(int64, optional, tag = "31")]
212 pub precise_trading_commission_rate: ::core::option::Option<i64>,
213 #[prost(int64, optional, tag = "32")]
214 pub precise_min_commission: ::core::option::Option<i64>,
215 #[prost(message, repeated, tag = "33")]
216 pub holiday: ::prost::alloc::vec::Vec<ProtoOaHoliday>,
217 #[prost(int32, optional, tag = "34")]
218 pub pnl_conversion_fee_rate: ::core::option::Option<i32>,
219 #[prost(int64, optional, tag = "35")]
220 pub leverage_id: ::core::option::Option<i64>,
221 #[prost(int32, optional, tag = "36")]
222 pub swap_period: ::core::option::Option<i32>,
223 #[prost(int32, optional, tag = "37")]
224 pub swap_time: ::core::option::Option<i32>,
225 #[prost(int32, optional, tag = "38")]
226 pub skip_swap_periods: ::core::option::Option<i32>,
227 #[prost(bool, optional, tag = "39")]
228 pub charge_swap_at_weekends: ::core::option::Option<bool>,
229 #[prost(string, optional, tag = "40")]
230 pub measurement_units: ::core::option::Option<::prost::alloc::string::String>,
231}
232#[derive(Clone, PartialEq, ::prost::Message)]
233pub struct ProtoOaLightSymbol {
234 #[prost(int64, required, tag = "1")]
235 pub symbol_id: i64,
236 #[prost(string, optional, tag = "2")]
237 pub symbol_name: ::core::option::Option<::prost::alloc::string::String>,
238 #[prost(bool, optional, tag = "3")]
239 pub enabled: ::core::option::Option<bool>,
240 #[prost(int64, optional, tag = "4")]
241 pub base_asset_id: ::core::option::Option<i64>,
242 #[prost(int64, optional, tag = "5")]
243 pub quote_asset_id: ::core::option::Option<i64>,
244 #[prost(int64, optional, tag = "6")]
245 pub symbol_category_id: ::core::option::Option<i64>,
246 #[prost(string, optional, tag = "7")]
247 pub description: ::core::option::Option<::prost::alloc::string::String>,
248 #[prost(double, optional, tag = "8")]
249 pub sorting_number: ::core::option::Option<f64>,
250}
251#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
252pub struct ProtoOaArchivedSymbol {
253 #[prost(int64, required, tag = "1")]
254 pub symbol_id: i64,
255 #[prost(string, required, tag = "2")]
256 pub name: ::prost::alloc::string::String,
257 #[prost(int64, required, tag = "3")]
258 pub utc_last_update_timestamp: i64,
259 #[prost(string, optional, tag = "4")]
260 pub description: ::core::option::Option<::prost::alloc::string::String>,
261}
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct ProtoOaSymbolCategory {
264 #[prost(int64, required, tag = "1")]
265 pub id: i64,
266 #[prost(int64, required, tag = "2")]
267 pub asset_class_id: i64,
268 #[prost(string, required, tag = "3")]
269 pub name: ::prost::alloc::string::String,
270 #[prost(double, optional, tag = "4")]
271 pub sorting_number: ::core::option::Option<f64>,
272}
273#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
274pub struct ProtoOaInterval {
275 #[prost(uint32, required, tag = "3")]
276 pub start_second: u32,
277 #[prost(uint32, required, tag = "4")]
278 pub end_second: u32,
279}
280#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
281pub struct ProtoOaTrader {
282 #[prost(int64, required, tag = "1")]
283 pub ctid_trader_account_id: i64,
284 #[prost(int64, required, tag = "2")]
285 pub balance: i64,
286 #[prost(int64, optional, tag = "3")]
287 pub balance_version: ::core::option::Option<i64>,
288 #[prost(int64, optional, tag = "4")]
289 pub manager_bonus: ::core::option::Option<i64>,
290 #[prost(int64, optional, tag = "5")]
291 pub ib_bonus: ::core::option::Option<i64>,
292 #[prost(int64, optional, tag = "6")]
293 pub non_withdrawable_bonus: ::core::option::Option<i64>,
294 #[prost(
295 enumeration = "ProtoOaAccessRights",
296 optional,
297 tag = "7",
298 default = "FullAccess"
299 )]
300 pub access_rights: ::core::option::Option<i32>,
301 #[prost(int64, required, tag = "8")]
302 pub deposit_asset_id: i64,
303 #[prost(bool, optional, tag = "9")]
304 pub swap_free: ::core::option::Option<bool>,
305 #[prost(uint32, optional, tag = "10")]
306 pub leverage_in_cents: ::core::option::Option<u32>,
307 #[prost(enumeration = "ProtoOaTotalMarginCalculationType", optional, tag = "11")]
308 pub total_margin_calculation_type: ::core::option::Option<i32>,
309 #[prost(uint32, optional, tag = "12")]
310 pub max_leverage: ::core::option::Option<u32>,
311 #[deprecated]
312 #[prost(bool, optional, tag = "13")]
313 pub french_risk: ::core::option::Option<bool>,
314 #[prost(int64, optional, tag = "14")]
315 pub trader_login: ::core::option::Option<i64>,
316 #[prost(
317 enumeration = "ProtoOaAccountType",
318 optional,
319 tag = "15",
320 default = "Hedged"
321 )]
322 pub account_type: ::core::option::Option<i32>,
323 #[prost(string, optional, tag = "16")]
324 pub broker_name: ::core::option::Option<::prost::alloc::string::String>,
325 #[prost(int64, optional, tag = "17")]
326 pub registration_timestamp: ::core::option::Option<i64>,
327 #[prost(bool, optional, tag = "18")]
328 pub is_limited_risk: ::core::option::Option<bool>,
329 #[prost(
330 enumeration = "ProtoOaLimitedRiskMarginCalculationStrategy",
331 optional,
332 tag = "19",
333 default = "AccordingToLeverage"
334 )]
335 pub limited_risk_margin_calculation_strategy: ::core::option::Option<i32>,
336 #[prost(uint32, optional, tag = "20")]
337 pub money_digits: ::core::option::Option<u32>,
338 #[prost(bool, optional, tag = "21")]
339 pub fair_stop_out: ::core::option::Option<bool>,
340}
341#[derive(Clone, PartialEq, ::prost::Message)]
342pub struct ProtoOaPosition {
343 #[prost(int64, required, tag = "1")]
344 pub position_id: i64,
345 #[prost(message, required, tag = "2")]
346 pub trade_data: ProtoOaTradeData,
347 #[prost(enumeration = "ProtoOaPositionStatus", required, tag = "3")]
348 pub position_status: i32,
349 #[prost(int64, required, tag = "4")]
350 pub swap: i64,
351 #[prost(double, optional, tag = "5")]
352 pub price: ::core::option::Option<f64>,
353 #[prost(double, optional, tag = "6")]
354 pub stop_loss: ::core::option::Option<f64>,
355 #[prost(double, optional, tag = "7")]
356 pub take_profit: ::core::option::Option<f64>,
357 #[prost(int64, optional, tag = "8")]
358 pub utc_last_update_timestamp: ::core::option::Option<i64>,
359 #[prost(int64, optional, tag = "9")]
360 pub commission: ::core::option::Option<i64>,
361 #[prost(double, optional, tag = "10")]
362 pub margin_rate: ::core::option::Option<f64>,
363 #[prost(int64, optional, tag = "11")]
364 pub mirroring_commission: ::core::option::Option<i64>,
365 #[prost(bool, optional, tag = "12")]
366 pub guaranteed_stop_loss: ::core::option::Option<bool>,
367 #[prost(uint64, optional, tag = "13")]
368 pub used_margin: ::core::option::Option<u64>,
369 #[prost(
370 enumeration = "ProtoOaOrderTriggerMethod",
371 optional,
372 tag = "14",
373 default = "Trade"
374 )]
375 pub stop_loss_trigger_method: ::core::option::Option<i32>,
376 #[prost(uint32, optional, tag = "15")]
377 pub money_digits: ::core::option::Option<u32>,
378 #[prost(bool, optional, tag = "16")]
379 pub trailing_stop_loss: ::core::option::Option<bool>,
380}
381#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
382pub struct ProtoOaTradeData {
383 #[prost(int64, required, tag = "1")]
384 pub symbol_id: i64,
385 #[prost(int64, required, tag = "2")]
386 pub volume: i64,
387 #[prost(enumeration = "ProtoOaTradeSide", required, tag = "3")]
388 pub trade_side: i32,
389 #[prost(int64, optional, tag = "4")]
390 pub open_timestamp: ::core::option::Option<i64>,
391 #[prost(string, optional, tag = "5")]
392 pub label: ::core::option::Option<::prost::alloc::string::String>,
393 #[prost(bool, optional, tag = "6")]
394 pub guaranteed_stop_loss: ::core::option::Option<bool>,
395 #[prost(string, optional, tag = "7")]
396 pub comment: ::core::option::Option<::prost::alloc::string::String>,
397 #[prost(string, optional, tag = "8")]
398 pub measurement_units: ::core::option::Option<::prost::alloc::string::String>,
399 #[prost(uint64, optional, tag = "9")]
400 pub close_timestamp: ::core::option::Option<u64>,
401}
402#[derive(Clone, PartialEq, ::prost::Message)]
403pub struct ProtoOaOrder {
404 #[prost(int64, required, tag = "1")]
405 pub order_id: i64,
406 #[prost(message, required, tag = "2")]
407 pub trade_data: ProtoOaTradeData,
408 #[prost(enumeration = "ProtoOaOrderType", required, tag = "3")]
409 pub order_type: i32,
410 #[prost(enumeration = "ProtoOaOrderStatus", required, tag = "4")]
411 pub order_status: i32,
412 #[prost(int64, optional, tag = "6")]
413 pub expiration_timestamp: ::core::option::Option<i64>,
414 #[prost(double, optional, tag = "7")]
415 pub execution_price: ::core::option::Option<f64>,
416 #[prost(int64, optional, tag = "8")]
417 pub executed_volume: ::core::option::Option<i64>,
418 #[prost(int64, optional, tag = "9")]
419 pub utc_last_update_timestamp: ::core::option::Option<i64>,
420 #[prost(double, optional, tag = "10")]
421 pub base_slippage_price: ::core::option::Option<f64>,
422 #[prost(int64, optional, tag = "11")]
423 pub slippage_in_points: ::core::option::Option<i64>,
424 #[prost(bool, optional, tag = "12")]
425 pub closing_order: ::core::option::Option<bool>,
426 #[prost(double, optional, tag = "13")]
427 pub limit_price: ::core::option::Option<f64>,
428 #[prost(double, optional, tag = "14")]
429 pub stop_price: ::core::option::Option<f64>,
430 #[prost(double, optional, tag = "15")]
431 pub stop_loss: ::core::option::Option<f64>,
432 #[prost(double, optional, tag = "16")]
433 pub take_profit: ::core::option::Option<f64>,
434 #[prost(string, optional, tag = "17")]
435 pub client_order_id: ::core::option::Option<::prost::alloc::string::String>,
436 #[prost(
437 enumeration = "ProtoOaTimeInForce",
438 optional,
439 tag = "18",
440 default = "ImmediateOrCancel"
441 )]
442 pub time_in_force: ::core::option::Option<i32>,
443 #[prost(int64, optional, tag = "19")]
444 pub position_id: ::core::option::Option<i64>,
445 #[prost(int64, optional, tag = "20")]
446 pub relative_stop_loss: ::core::option::Option<i64>,
447 #[prost(int64, optional, tag = "21")]
448 pub relative_take_profit: ::core::option::Option<i64>,
449 #[prost(bool, optional, tag = "22")]
450 pub is_stop_out: ::core::option::Option<bool>,
451 #[prost(bool, optional, tag = "23")]
452 pub trailing_stop_loss: ::core::option::Option<bool>,
453 #[prost(
454 enumeration = "ProtoOaOrderTriggerMethod",
455 optional,
456 tag = "24",
457 default = "Trade"
458 )]
459 pub stop_trigger_method: ::core::option::Option<i32>,
460}
461#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
462pub struct ProtoOaBonusDepositWithdraw {
463 #[prost(enumeration = "ProtoOaChangeBonusType", required, tag = "1")]
464 pub operation_type: i32,
465 #[prost(int64, required, tag = "2")]
466 pub bonus_history_id: i64,
467 #[prost(int64, required, tag = "3")]
468 pub manager_bonus: i64,
469 #[prost(int64, required, tag = "4")]
470 pub manager_delta: i64,
471 #[prost(int64, required, tag = "5")]
472 pub ib_bonus: i64,
473 #[prost(int64, required, tag = "6")]
474 pub ib_delta: i64,
475 #[prost(int64, required, tag = "7")]
476 pub change_bonus_timestamp: i64,
477 #[prost(string, optional, tag = "8")]
478 pub external_note: ::core::option::Option<::prost::alloc::string::String>,
479 #[prost(int64, optional, tag = "9")]
480 pub introducing_broker_id: ::core::option::Option<i64>,
481 #[prost(uint32, optional, tag = "10")]
482 pub money_digits: ::core::option::Option<u32>,
483}
484#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
485pub struct ProtoOaDepositWithdraw {
486 #[prost(enumeration = "ProtoOaChangeBalanceType", required, tag = "1")]
487 pub operation_type: i32,
488 #[prost(int64, required, tag = "2")]
489 pub balance_history_id: i64,
490 #[prost(int64, required, tag = "3")]
491 pub balance: i64,
492 #[prost(int64, required, tag = "4")]
493 pub delta: i64,
494 #[prost(int64, required, tag = "5")]
495 pub change_balance_timestamp: i64,
496 #[prost(string, optional, tag = "6")]
497 pub external_note: ::core::option::Option<::prost::alloc::string::String>,
498 #[prost(int64, optional, tag = "7")]
499 pub balance_version: ::core::option::Option<i64>,
500 #[prost(int64, optional, tag = "8")]
501 pub equity: ::core::option::Option<i64>,
502 #[prost(uint32, optional, tag = "9")]
503 pub money_digits: ::core::option::Option<u32>,
504}
505#[derive(Clone, Copy, PartialEq, ::prost::Message)]
506pub struct ProtoOaDeal {
507 #[prost(int64, required, tag = "1")]
508 pub deal_id: i64,
509 #[prost(int64, required, tag = "2")]
510 pub order_id: i64,
511 #[prost(int64, required, tag = "3")]
512 pub position_id: i64,
513 #[prost(int64, required, tag = "4")]
514 pub volume: i64,
515 #[prost(int64, required, tag = "5")]
516 pub filled_volume: i64,
517 #[prost(int64, required, tag = "6")]
518 pub symbol_id: i64,
519 #[prost(int64, required, tag = "7")]
520 pub create_timestamp: i64,
521 #[prost(int64, required, tag = "8")]
522 pub execution_timestamp: i64,
523 #[prost(int64, optional, tag = "9")]
524 pub utc_last_update_timestamp: ::core::option::Option<i64>,
525 #[prost(double, optional, tag = "10")]
526 pub execution_price: ::core::option::Option<f64>,
527 #[prost(enumeration = "ProtoOaTradeSide", required, tag = "11")]
528 pub trade_side: i32,
529 #[prost(enumeration = "ProtoOaDealStatus", required, tag = "12")]
530 pub deal_status: i32,
531 #[prost(double, optional, tag = "13")]
532 pub margin_rate: ::core::option::Option<f64>,
533 #[prost(int64, optional, tag = "14")]
534 pub commission: ::core::option::Option<i64>,
535 #[prost(double, optional, tag = "15")]
536 pub base_to_usd_conversion_rate: ::core::option::Option<f64>,
537 #[prost(message, optional, tag = "16")]
538 pub close_position_detail: ::core::option::Option<ProtoOaClosePositionDetail>,
539 #[prost(uint32, optional, tag = "17")]
540 pub money_digits: ::core::option::Option<u32>,
541}
542#[derive(Clone, Copy, PartialEq, ::prost::Message)]
543pub struct ProtoOaDealOffset {
544 #[prost(int64, required, tag = "1")]
545 pub deal_id: i64,
546 #[prost(int64, required, tag = "2")]
547 pub volume: i64,
548 #[prost(int64, optional, tag = "3")]
549 pub execution_timestamp: ::core::option::Option<i64>,
550 #[prost(double, optional, tag = "4")]
551 pub execution_price: ::core::option::Option<f64>,
552}
553#[derive(Clone, Copy, PartialEq, ::prost::Message)]
554pub struct ProtoOaClosePositionDetail {
555 #[prost(double, required, tag = "1")]
556 pub entry_price: f64,
557 #[prost(int64, required, tag = "2")]
558 pub gross_profit: i64,
559 #[prost(int64, required, tag = "3")]
560 pub swap: i64,
561 #[prost(int64, required, tag = "4")]
562 pub commission: i64,
563 #[prost(int64, required, tag = "5")]
564 pub balance: i64,
565 #[prost(double, optional, tag = "6")]
566 pub quote_to_deposit_conversion_rate: ::core::option::Option<f64>,
567 #[prost(int64, optional, tag = "7")]
568 pub closed_volume: ::core::option::Option<i64>,
569 #[prost(int64, optional, tag = "8")]
570 pub balance_version: ::core::option::Option<i64>,
571 #[prost(uint32, optional, tag = "9")]
572 pub money_digits: ::core::option::Option<u32>,
573 #[prost(int64, optional, tag = "10")]
574 pub pnl_conversion_fee: ::core::option::Option<i64>,
575}
576#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
577pub struct ProtoOaTrendbar {
578 #[prost(int64, required, tag = "3")]
579 pub volume: i64,
580 #[prost(enumeration = "ProtoOaTrendbarPeriod", optional, tag = "4", default = "M1")]
581 pub period: ::core::option::Option<i32>,
582 #[prost(int64, optional, tag = "5")]
583 pub low: ::core::option::Option<i64>,
584 #[prost(uint64, optional, tag = "6")]
585 pub delta_open: ::core::option::Option<u64>,
586 #[prost(uint64, optional, tag = "7")]
587 pub delta_close: ::core::option::Option<u64>,
588 #[prost(uint64, optional, tag = "8")]
589 pub delta_high: ::core::option::Option<u64>,
590 #[prost(uint32, optional, tag = "9")]
591 pub utc_timestamp_in_minutes: ::core::option::Option<u32>,
592}
593#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
594pub struct ProtoOaExpectedMargin {
595 #[prost(int64, required, tag = "1")]
596 pub volume: i64,
597 #[prost(int64, required, tag = "2")]
598 pub buy_margin: i64,
599 #[prost(int64, required, tag = "3")]
600 pub sell_margin: i64,
601}
602#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
603pub struct ProtoOaTickData {
604 #[prost(int64, required, tag = "1")]
605 pub timestamp: i64,
606 #[prost(int64, required, tag = "2")]
607 pub tick: i64,
608}
609#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
610pub struct ProtoOaCtidProfile {
611 #[prost(int64, required, tag = "1")]
612 pub user_id: i64,
613}
614#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
615pub struct ProtoOaCtidTraderAccount {
616 #[prost(uint64, required, tag = "1")]
617 pub ctid_trader_account_id: u64,
618 #[prost(bool, optional, tag = "2")]
619 pub is_live: ::core::option::Option<bool>,
620 #[prost(int64, optional, tag = "3")]
621 pub trader_login: ::core::option::Option<i64>,
622 #[prost(int64, optional, tag = "4")]
623 pub last_closing_deal_timestamp: ::core::option::Option<i64>,
624 #[prost(int64, optional, tag = "5")]
625 pub last_balance_update_timestamp: ::core::option::Option<i64>,
626}
627#[derive(Clone, PartialEq, ::prost::Message)]
628pub struct ProtoOaAssetClass {
629 #[prost(int64, optional, tag = "1")]
630 pub id: ::core::option::Option<i64>,
631 #[prost(string, optional, tag = "2")]
632 pub name: ::core::option::Option<::prost::alloc::string::String>,
633 #[prost(double, optional, tag = "3")]
634 pub sorting_number: ::core::option::Option<f64>,
635}
636#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
637pub struct ProtoOaDepthQuote {
638 #[prost(uint64, required, tag = "1")]
639 pub id: u64,
640 #[prost(uint64, required, tag = "3")]
641 pub size: u64,
642 #[prost(uint64, optional, tag = "4")]
643 pub bid: ::core::option::Option<u64>,
644 #[prost(uint64, optional, tag = "5")]
645 pub ask: ::core::option::Option<u64>,
646}
647#[derive(Clone, Copy, PartialEq, ::prost::Message)]
648pub struct ProtoOaMarginCall {
649 #[prost(enumeration = "ProtoOaNotificationType", required, tag = "1")]
650 pub margin_call_type: i32,
651 #[prost(double, required, tag = "2")]
652 pub margin_level_threshold: f64,
653 #[prost(int64, optional, tag = "3")]
654 pub utc_last_update_timestamp: ::core::option::Option<i64>,
655}
656#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
657pub struct ProtoOaHoliday {
658 #[prost(int64, required, tag = "1")]
659 pub holiday_id: i64,
660 #[prost(string, required, tag = "2")]
661 pub name: ::prost::alloc::string::String,
662 #[prost(string, optional, tag = "3")]
663 pub description: ::core::option::Option<::prost::alloc::string::String>,
664 #[prost(string, required, tag = "4")]
665 pub schedule_time_zone: ::prost::alloc::string::String,
666 #[prost(int64, required, tag = "5")]
667 pub holiday_date: i64,
668 #[prost(bool, required, tag = "6")]
669 pub is_recurring: bool,
670 #[prost(int32, optional, tag = "7")]
671 pub start_second: ::core::option::Option<i32>,
672 #[prost(int32, optional, tag = "8")]
673 pub end_second: ::core::option::Option<i32>,
674}
675#[derive(Clone, PartialEq, ::prost::Message)]
676pub struct ProtoOaDynamicLeverage {
677 #[prost(int64, required, tag = "1")]
678 pub leverage_id: i64,
679 #[prost(message, repeated, tag = "2")]
680 pub tiers: ::prost::alloc::vec::Vec<ProtoOaDynamicLeverageTier>,
681}
682#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
683pub struct ProtoOaDynamicLeverageTier {
684 #[prost(int64, required, tag = "1")]
685 pub volume: i64,
686 #[prost(int32, required, tag = "2")]
687 pub leverage: i32,
688}
689#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
690pub struct ProtoOaPositionUnrealizedPnL {
691 #[prost(int64, required, tag = "1")]
692 pub position_id: i64,
693 #[prost(int64, required, tag = "2")]
694 pub gross_unrealized_pn_l: i64,
695 #[prost(int64, required, tag = "3")]
696 pub net_unrealized_pn_l: i64,
697}
698#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
699#[repr(i32)]
700pub enum ProtoOaPayloadType {
701 ProtoOaApplicationAuthReq = 2100,
702 ProtoOaApplicationAuthRes = 2101,
703 ProtoOaAccountAuthReq = 2102,
704 ProtoOaAccountAuthRes = 2103,
705 ProtoOaVersionReq = 2104,
706 ProtoOaVersionRes = 2105,
707 ProtoOaNewOrderReq = 2106,
708 ProtoOaTrailingSlChangedEvent = 2107,
709 ProtoOaCancelOrderReq = 2108,
710 ProtoOaAmendOrderReq = 2109,
711 ProtoOaAmendPositionSltpReq = 2110,
712 ProtoOaClosePositionReq = 2111,
713 ProtoOaAssetListReq = 2112,
714 ProtoOaAssetListRes = 2113,
715 ProtoOaSymbolsListReq = 2114,
716 ProtoOaSymbolsListRes = 2115,
717 ProtoOaSymbolByIdReq = 2116,
718 ProtoOaSymbolByIdRes = 2117,
719 ProtoOaSymbolsForConversionReq = 2118,
720 ProtoOaSymbolsForConversionRes = 2119,
721 ProtoOaSymbolChangedEvent = 2120,
722 ProtoOaTraderReq = 2121,
723 ProtoOaTraderRes = 2122,
724 ProtoOaTraderUpdateEvent = 2123,
725 ProtoOaReconcileReq = 2124,
726 ProtoOaReconcileRes = 2125,
727 ProtoOaExecutionEvent = 2126,
728 ProtoOaSubscribeSpotsReq = 2127,
729 ProtoOaSubscribeSpotsRes = 2128,
730 ProtoOaUnsubscribeSpotsReq = 2129,
731 ProtoOaUnsubscribeSpotsRes = 2130,
732 ProtoOaSpotEvent = 2131,
733 ProtoOaOrderErrorEvent = 2132,
734 ProtoOaDealListReq = 2133,
735 ProtoOaDealListRes = 2134,
736 ProtoOaSubscribeLiveTrendbarReq = 2135,
737 ProtoOaUnsubscribeLiveTrendbarReq = 2136,
738 ProtoOaGetTrendbarsReq = 2137,
739 ProtoOaGetTrendbarsRes = 2138,
740 ProtoOaExpectedMarginReq = 2139,
741 ProtoOaExpectedMarginRes = 2140,
742 ProtoOaMarginChangedEvent = 2141,
743 ProtoOaErrorRes = 2142,
744 ProtoOaCashFlowHistoryListReq = 2143,
745 ProtoOaCashFlowHistoryListRes = 2144,
746 ProtoOaGetTickdataReq = 2145,
747 ProtoOaGetTickdataRes = 2146,
748 ProtoOaAccountsTokenInvalidatedEvent = 2147,
749 ProtoOaClientDisconnectEvent = 2148,
750 ProtoOaGetAccountsByAccessTokenReq = 2149,
751 ProtoOaGetAccountsByAccessTokenRes = 2150,
752 ProtoOaGetCtidProfileByTokenReq = 2151,
753 ProtoOaGetCtidProfileByTokenRes = 2152,
754 ProtoOaAssetClassListReq = 2153,
755 ProtoOaAssetClassListRes = 2154,
756 ProtoOaDepthEvent = 2155,
757 ProtoOaSubscribeDepthQuotesReq = 2156,
758 ProtoOaSubscribeDepthQuotesRes = 2157,
759 ProtoOaUnsubscribeDepthQuotesReq = 2158,
760 ProtoOaUnsubscribeDepthQuotesRes = 2159,
761 ProtoOaSymbolCategoryReq = 2160,
762 ProtoOaSymbolCategoryRes = 2161,
763 ProtoOaAccountLogoutReq = 2162,
764 ProtoOaAccountLogoutRes = 2163,
765 ProtoOaAccountDisconnectEvent = 2164,
766 ProtoOaSubscribeLiveTrendbarRes = 2165,
767 ProtoOaUnsubscribeLiveTrendbarRes = 2166,
768 ProtoOaMarginCallListReq = 2167,
769 ProtoOaMarginCallListRes = 2168,
770 ProtoOaMarginCallUpdateReq = 2169,
771 ProtoOaMarginCallUpdateRes = 2170,
772 ProtoOaMarginCallUpdateEvent = 2171,
773 ProtoOaMarginCallTriggerEvent = 2172,
774 ProtoOaRefreshTokenReq = 2173,
775 ProtoOaRefreshTokenRes = 2174,
776 ProtoOaOrderListReq = 2175,
777 ProtoOaOrderListRes = 2176,
778 ProtoOaGetDynamicLeverageReq = 2177,
779 ProtoOaGetDynamicLeverageRes = 2178,
780 ProtoOaDealListByPositionIdReq = 2179,
781 ProtoOaDealListByPositionIdRes = 2180,
782 ProtoOaOrderDetailsReq = 2181,
783 ProtoOaOrderDetailsRes = 2182,
784 ProtoOaOrderListByPositionIdReq = 2183,
785 ProtoOaOrderListByPositionIdRes = 2184,
786 ProtoOaDealOffsetListReq = 2185,
787 ProtoOaDealOffsetListRes = 2186,
788 ProtoOaGetPositionUnrealizedPnlReq = 2187,
789 ProtoOaGetPositionUnrealizedPnlRes = 2188,
790}
791impl ProtoOaPayloadType {
792 pub fn as_str_name(&self) -> &'static str {
797 match self {
798 Self::ProtoOaApplicationAuthReq => "PROTO_OA_APPLICATION_AUTH_REQ",
799 Self::ProtoOaApplicationAuthRes => "PROTO_OA_APPLICATION_AUTH_RES",
800 Self::ProtoOaAccountAuthReq => "PROTO_OA_ACCOUNT_AUTH_REQ",
801 Self::ProtoOaAccountAuthRes => "PROTO_OA_ACCOUNT_AUTH_RES",
802 Self::ProtoOaVersionReq => "PROTO_OA_VERSION_REQ",
803 Self::ProtoOaVersionRes => "PROTO_OA_VERSION_RES",
804 Self::ProtoOaNewOrderReq => "PROTO_OA_NEW_ORDER_REQ",
805 Self::ProtoOaTrailingSlChangedEvent => "PROTO_OA_TRAILING_SL_CHANGED_EVENT",
806 Self::ProtoOaCancelOrderReq => "PROTO_OA_CANCEL_ORDER_REQ",
807 Self::ProtoOaAmendOrderReq => "PROTO_OA_AMEND_ORDER_REQ",
808 Self::ProtoOaAmendPositionSltpReq => "PROTO_OA_AMEND_POSITION_SLTP_REQ",
809 Self::ProtoOaClosePositionReq => "PROTO_OA_CLOSE_POSITION_REQ",
810 Self::ProtoOaAssetListReq => "PROTO_OA_ASSET_LIST_REQ",
811 Self::ProtoOaAssetListRes => "PROTO_OA_ASSET_LIST_RES",
812 Self::ProtoOaSymbolsListReq => "PROTO_OA_SYMBOLS_LIST_REQ",
813 Self::ProtoOaSymbolsListRes => "PROTO_OA_SYMBOLS_LIST_RES",
814 Self::ProtoOaSymbolByIdReq => "PROTO_OA_SYMBOL_BY_ID_REQ",
815 Self::ProtoOaSymbolByIdRes => "PROTO_OA_SYMBOL_BY_ID_RES",
816 Self::ProtoOaSymbolsForConversionReq => "PROTO_OA_SYMBOLS_FOR_CONVERSION_REQ",
817 Self::ProtoOaSymbolsForConversionRes => "PROTO_OA_SYMBOLS_FOR_CONVERSION_RES",
818 Self::ProtoOaSymbolChangedEvent => "PROTO_OA_SYMBOL_CHANGED_EVENT",
819 Self::ProtoOaTraderReq => "PROTO_OA_TRADER_REQ",
820 Self::ProtoOaTraderRes => "PROTO_OA_TRADER_RES",
821 Self::ProtoOaTraderUpdateEvent => "PROTO_OA_TRADER_UPDATE_EVENT",
822 Self::ProtoOaReconcileReq => "PROTO_OA_RECONCILE_REQ",
823 Self::ProtoOaReconcileRes => "PROTO_OA_RECONCILE_RES",
824 Self::ProtoOaExecutionEvent => "PROTO_OA_EXECUTION_EVENT",
825 Self::ProtoOaSubscribeSpotsReq => "PROTO_OA_SUBSCRIBE_SPOTS_REQ",
826 Self::ProtoOaSubscribeSpotsRes => "PROTO_OA_SUBSCRIBE_SPOTS_RES",
827 Self::ProtoOaUnsubscribeSpotsReq => "PROTO_OA_UNSUBSCRIBE_SPOTS_REQ",
828 Self::ProtoOaUnsubscribeSpotsRes => "PROTO_OA_UNSUBSCRIBE_SPOTS_RES",
829 Self::ProtoOaSpotEvent => "PROTO_OA_SPOT_EVENT",
830 Self::ProtoOaOrderErrorEvent => "PROTO_OA_ORDER_ERROR_EVENT",
831 Self::ProtoOaDealListReq => "PROTO_OA_DEAL_LIST_REQ",
832 Self::ProtoOaDealListRes => "PROTO_OA_DEAL_LIST_RES",
833 Self::ProtoOaSubscribeLiveTrendbarReq => {
834 "PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_REQ"
835 }
836 Self::ProtoOaUnsubscribeLiveTrendbarReq => {
837 "PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_REQ"
838 }
839 Self::ProtoOaGetTrendbarsReq => "PROTO_OA_GET_TRENDBARS_REQ",
840 Self::ProtoOaGetTrendbarsRes => "PROTO_OA_GET_TRENDBARS_RES",
841 Self::ProtoOaExpectedMarginReq => "PROTO_OA_EXPECTED_MARGIN_REQ",
842 Self::ProtoOaExpectedMarginRes => "PROTO_OA_EXPECTED_MARGIN_RES",
843 Self::ProtoOaMarginChangedEvent => "PROTO_OA_MARGIN_CHANGED_EVENT",
844 Self::ProtoOaErrorRes => "PROTO_OA_ERROR_RES",
845 Self::ProtoOaCashFlowHistoryListReq => "PROTO_OA_CASH_FLOW_HISTORY_LIST_REQ",
846 Self::ProtoOaCashFlowHistoryListRes => "PROTO_OA_CASH_FLOW_HISTORY_LIST_RES",
847 Self::ProtoOaGetTickdataReq => "PROTO_OA_GET_TICKDATA_REQ",
848 Self::ProtoOaGetTickdataRes => "PROTO_OA_GET_TICKDATA_RES",
849 Self::ProtoOaAccountsTokenInvalidatedEvent => {
850 "PROTO_OA_ACCOUNTS_TOKEN_INVALIDATED_EVENT"
851 }
852 Self::ProtoOaClientDisconnectEvent => "PROTO_OA_CLIENT_DISCONNECT_EVENT",
853 Self::ProtoOaGetAccountsByAccessTokenReq => {
854 "PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_REQ"
855 }
856 Self::ProtoOaGetAccountsByAccessTokenRes => {
857 "PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_RES"
858 }
859 Self::ProtoOaGetCtidProfileByTokenReq => {
860 "PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_REQ"
861 }
862 Self::ProtoOaGetCtidProfileByTokenRes => {
863 "PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_RES"
864 }
865 Self::ProtoOaAssetClassListReq => "PROTO_OA_ASSET_CLASS_LIST_REQ",
866 Self::ProtoOaAssetClassListRes => "PROTO_OA_ASSET_CLASS_LIST_RES",
867 Self::ProtoOaDepthEvent => "PROTO_OA_DEPTH_EVENT",
868 Self::ProtoOaSubscribeDepthQuotesReq => "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_REQ",
869 Self::ProtoOaSubscribeDepthQuotesRes => "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_RES",
870 Self::ProtoOaUnsubscribeDepthQuotesReq => {
871 "PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_REQ"
872 }
873 Self::ProtoOaUnsubscribeDepthQuotesRes => {
874 "PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_RES"
875 }
876 Self::ProtoOaSymbolCategoryReq => "PROTO_OA_SYMBOL_CATEGORY_REQ",
877 Self::ProtoOaSymbolCategoryRes => "PROTO_OA_SYMBOL_CATEGORY_RES",
878 Self::ProtoOaAccountLogoutReq => "PROTO_OA_ACCOUNT_LOGOUT_REQ",
879 Self::ProtoOaAccountLogoutRes => "PROTO_OA_ACCOUNT_LOGOUT_RES",
880 Self::ProtoOaAccountDisconnectEvent => "PROTO_OA_ACCOUNT_DISCONNECT_EVENT",
881 Self::ProtoOaSubscribeLiveTrendbarRes => {
882 "PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_RES"
883 }
884 Self::ProtoOaUnsubscribeLiveTrendbarRes => {
885 "PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_RES"
886 }
887 Self::ProtoOaMarginCallListReq => "PROTO_OA_MARGIN_CALL_LIST_REQ",
888 Self::ProtoOaMarginCallListRes => "PROTO_OA_MARGIN_CALL_LIST_RES",
889 Self::ProtoOaMarginCallUpdateReq => "PROTO_OA_MARGIN_CALL_UPDATE_REQ",
890 Self::ProtoOaMarginCallUpdateRes => "PROTO_OA_MARGIN_CALL_UPDATE_RES",
891 Self::ProtoOaMarginCallUpdateEvent => "PROTO_OA_MARGIN_CALL_UPDATE_EVENT",
892 Self::ProtoOaMarginCallTriggerEvent => "PROTO_OA_MARGIN_CALL_TRIGGER_EVENT",
893 Self::ProtoOaRefreshTokenReq => "PROTO_OA_REFRESH_TOKEN_REQ",
894 Self::ProtoOaRefreshTokenRes => "PROTO_OA_REFRESH_TOKEN_RES",
895 Self::ProtoOaOrderListReq => "PROTO_OA_ORDER_LIST_REQ",
896 Self::ProtoOaOrderListRes => "PROTO_OA_ORDER_LIST_RES",
897 Self::ProtoOaGetDynamicLeverageReq => "PROTO_OA_GET_DYNAMIC_LEVERAGE_REQ",
898 Self::ProtoOaGetDynamicLeverageRes => "PROTO_OA_GET_DYNAMIC_LEVERAGE_RES",
899 Self::ProtoOaDealListByPositionIdReq => {
900 "PROTO_OA_DEAL_LIST_BY_POSITION_ID_REQ"
901 }
902 Self::ProtoOaDealListByPositionIdRes => {
903 "PROTO_OA_DEAL_LIST_BY_POSITION_ID_RES"
904 }
905 Self::ProtoOaOrderDetailsReq => "PROTO_OA_ORDER_DETAILS_REQ",
906 Self::ProtoOaOrderDetailsRes => "PROTO_OA_ORDER_DETAILS_RES",
907 Self::ProtoOaOrderListByPositionIdReq => {
908 "PROTO_OA_ORDER_LIST_BY_POSITION_ID_REQ"
909 }
910 Self::ProtoOaOrderListByPositionIdRes => {
911 "PROTO_OA_ORDER_LIST_BY_POSITION_ID_RES"
912 }
913 Self::ProtoOaDealOffsetListReq => "PROTO_OA_DEAL_OFFSET_LIST_REQ",
914 Self::ProtoOaDealOffsetListRes => "PROTO_OA_DEAL_OFFSET_LIST_RES",
915 Self::ProtoOaGetPositionUnrealizedPnlReq => {
916 "PROTO_OA_GET_POSITION_UNREALIZED_PNL_REQ"
917 }
918 Self::ProtoOaGetPositionUnrealizedPnlRes => {
919 "PROTO_OA_GET_POSITION_UNREALIZED_PNL_RES"
920 }
921 }
922 }
923 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
925 match value {
926 "PROTO_OA_APPLICATION_AUTH_REQ" => Some(Self::ProtoOaApplicationAuthReq),
927 "PROTO_OA_APPLICATION_AUTH_RES" => Some(Self::ProtoOaApplicationAuthRes),
928 "PROTO_OA_ACCOUNT_AUTH_REQ" => Some(Self::ProtoOaAccountAuthReq),
929 "PROTO_OA_ACCOUNT_AUTH_RES" => Some(Self::ProtoOaAccountAuthRes),
930 "PROTO_OA_VERSION_REQ" => Some(Self::ProtoOaVersionReq),
931 "PROTO_OA_VERSION_RES" => Some(Self::ProtoOaVersionRes),
932 "PROTO_OA_NEW_ORDER_REQ" => Some(Self::ProtoOaNewOrderReq),
933 "PROTO_OA_TRAILING_SL_CHANGED_EVENT" => {
934 Some(Self::ProtoOaTrailingSlChangedEvent)
935 }
936 "PROTO_OA_CANCEL_ORDER_REQ" => Some(Self::ProtoOaCancelOrderReq),
937 "PROTO_OA_AMEND_ORDER_REQ" => Some(Self::ProtoOaAmendOrderReq),
938 "PROTO_OA_AMEND_POSITION_SLTP_REQ" => Some(Self::ProtoOaAmendPositionSltpReq),
939 "PROTO_OA_CLOSE_POSITION_REQ" => Some(Self::ProtoOaClosePositionReq),
940 "PROTO_OA_ASSET_LIST_REQ" => Some(Self::ProtoOaAssetListReq),
941 "PROTO_OA_ASSET_LIST_RES" => Some(Self::ProtoOaAssetListRes),
942 "PROTO_OA_SYMBOLS_LIST_REQ" => Some(Self::ProtoOaSymbolsListReq),
943 "PROTO_OA_SYMBOLS_LIST_RES" => Some(Self::ProtoOaSymbolsListRes),
944 "PROTO_OA_SYMBOL_BY_ID_REQ" => Some(Self::ProtoOaSymbolByIdReq),
945 "PROTO_OA_SYMBOL_BY_ID_RES" => Some(Self::ProtoOaSymbolByIdRes),
946 "PROTO_OA_SYMBOLS_FOR_CONVERSION_REQ" => {
947 Some(Self::ProtoOaSymbolsForConversionReq)
948 }
949 "PROTO_OA_SYMBOLS_FOR_CONVERSION_RES" => {
950 Some(Self::ProtoOaSymbolsForConversionRes)
951 }
952 "PROTO_OA_SYMBOL_CHANGED_EVENT" => Some(Self::ProtoOaSymbolChangedEvent),
953 "PROTO_OA_TRADER_REQ" => Some(Self::ProtoOaTraderReq),
954 "PROTO_OA_TRADER_RES" => Some(Self::ProtoOaTraderRes),
955 "PROTO_OA_TRADER_UPDATE_EVENT" => Some(Self::ProtoOaTraderUpdateEvent),
956 "PROTO_OA_RECONCILE_REQ" => Some(Self::ProtoOaReconcileReq),
957 "PROTO_OA_RECONCILE_RES" => Some(Self::ProtoOaReconcileRes),
958 "PROTO_OA_EXECUTION_EVENT" => Some(Self::ProtoOaExecutionEvent),
959 "PROTO_OA_SUBSCRIBE_SPOTS_REQ" => Some(Self::ProtoOaSubscribeSpotsReq),
960 "PROTO_OA_SUBSCRIBE_SPOTS_RES" => Some(Self::ProtoOaSubscribeSpotsRes),
961 "PROTO_OA_UNSUBSCRIBE_SPOTS_REQ" => Some(Self::ProtoOaUnsubscribeSpotsReq),
962 "PROTO_OA_UNSUBSCRIBE_SPOTS_RES" => Some(Self::ProtoOaUnsubscribeSpotsRes),
963 "PROTO_OA_SPOT_EVENT" => Some(Self::ProtoOaSpotEvent),
964 "PROTO_OA_ORDER_ERROR_EVENT" => Some(Self::ProtoOaOrderErrorEvent),
965 "PROTO_OA_DEAL_LIST_REQ" => Some(Self::ProtoOaDealListReq),
966 "PROTO_OA_DEAL_LIST_RES" => Some(Self::ProtoOaDealListRes),
967 "PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_REQ" => {
968 Some(Self::ProtoOaSubscribeLiveTrendbarReq)
969 }
970 "PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_REQ" => {
971 Some(Self::ProtoOaUnsubscribeLiveTrendbarReq)
972 }
973 "PROTO_OA_GET_TRENDBARS_REQ" => Some(Self::ProtoOaGetTrendbarsReq),
974 "PROTO_OA_GET_TRENDBARS_RES" => Some(Self::ProtoOaGetTrendbarsRes),
975 "PROTO_OA_EXPECTED_MARGIN_REQ" => Some(Self::ProtoOaExpectedMarginReq),
976 "PROTO_OA_EXPECTED_MARGIN_RES" => Some(Self::ProtoOaExpectedMarginRes),
977 "PROTO_OA_MARGIN_CHANGED_EVENT" => Some(Self::ProtoOaMarginChangedEvent),
978 "PROTO_OA_ERROR_RES" => Some(Self::ProtoOaErrorRes),
979 "PROTO_OA_CASH_FLOW_HISTORY_LIST_REQ" => {
980 Some(Self::ProtoOaCashFlowHistoryListReq)
981 }
982 "PROTO_OA_CASH_FLOW_HISTORY_LIST_RES" => {
983 Some(Self::ProtoOaCashFlowHistoryListRes)
984 }
985 "PROTO_OA_GET_TICKDATA_REQ" => Some(Self::ProtoOaGetTickdataReq),
986 "PROTO_OA_GET_TICKDATA_RES" => Some(Self::ProtoOaGetTickdataRes),
987 "PROTO_OA_ACCOUNTS_TOKEN_INVALIDATED_EVENT" => {
988 Some(Self::ProtoOaAccountsTokenInvalidatedEvent)
989 }
990 "PROTO_OA_CLIENT_DISCONNECT_EVENT" => {
991 Some(Self::ProtoOaClientDisconnectEvent)
992 }
993 "PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_REQ" => {
994 Some(Self::ProtoOaGetAccountsByAccessTokenReq)
995 }
996 "PROTO_OA_GET_ACCOUNTS_BY_ACCESS_TOKEN_RES" => {
997 Some(Self::ProtoOaGetAccountsByAccessTokenRes)
998 }
999 "PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_REQ" => {
1000 Some(Self::ProtoOaGetCtidProfileByTokenReq)
1001 }
1002 "PROTO_OA_GET_CTID_PROFILE_BY_TOKEN_RES" => {
1003 Some(Self::ProtoOaGetCtidProfileByTokenRes)
1004 }
1005 "PROTO_OA_ASSET_CLASS_LIST_REQ" => Some(Self::ProtoOaAssetClassListReq),
1006 "PROTO_OA_ASSET_CLASS_LIST_RES" => Some(Self::ProtoOaAssetClassListRes),
1007 "PROTO_OA_DEPTH_EVENT" => Some(Self::ProtoOaDepthEvent),
1008 "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_REQ" => {
1009 Some(Self::ProtoOaSubscribeDepthQuotesReq)
1010 }
1011 "PROTO_OA_SUBSCRIBE_DEPTH_QUOTES_RES" => {
1012 Some(Self::ProtoOaSubscribeDepthQuotesRes)
1013 }
1014 "PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_REQ" => {
1015 Some(Self::ProtoOaUnsubscribeDepthQuotesReq)
1016 }
1017 "PROTO_OA_UNSUBSCRIBE_DEPTH_QUOTES_RES" => {
1018 Some(Self::ProtoOaUnsubscribeDepthQuotesRes)
1019 }
1020 "PROTO_OA_SYMBOL_CATEGORY_REQ" => Some(Self::ProtoOaSymbolCategoryReq),
1021 "PROTO_OA_SYMBOL_CATEGORY_RES" => Some(Self::ProtoOaSymbolCategoryRes),
1022 "PROTO_OA_ACCOUNT_LOGOUT_REQ" => Some(Self::ProtoOaAccountLogoutReq),
1023 "PROTO_OA_ACCOUNT_LOGOUT_RES" => Some(Self::ProtoOaAccountLogoutRes),
1024 "PROTO_OA_ACCOUNT_DISCONNECT_EVENT" => {
1025 Some(Self::ProtoOaAccountDisconnectEvent)
1026 }
1027 "PROTO_OA_SUBSCRIBE_LIVE_TRENDBAR_RES" => {
1028 Some(Self::ProtoOaSubscribeLiveTrendbarRes)
1029 }
1030 "PROTO_OA_UNSUBSCRIBE_LIVE_TRENDBAR_RES" => {
1031 Some(Self::ProtoOaUnsubscribeLiveTrendbarRes)
1032 }
1033 "PROTO_OA_MARGIN_CALL_LIST_REQ" => Some(Self::ProtoOaMarginCallListReq),
1034 "PROTO_OA_MARGIN_CALL_LIST_RES" => Some(Self::ProtoOaMarginCallListRes),
1035 "PROTO_OA_MARGIN_CALL_UPDATE_REQ" => Some(Self::ProtoOaMarginCallUpdateReq),
1036 "PROTO_OA_MARGIN_CALL_UPDATE_RES" => Some(Self::ProtoOaMarginCallUpdateRes),
1037 "PROTO_OA_MARGIN_CALL_UPDATE_EVENT" => {
1038 Some(Self::ProtoOaMarginCallUpdateEvent)
1039 }
1040 "PROTO_OA_MARGIN_CALL_TRIGGER_EVENT" => {
1041 Some(Self::ProtoOaMarginCallTriggerEvent)
1042 }
1043 "PROTO_OA_REFRESH_TOKEN_REQ" => Some(Self::ProtoOaRefreshTokenReq),
1044 "PROTO_OA_REFRESH_TOKEN_RES" => Some(Self::ProtoOaRefreshTokenRes),
1045 "PROTO_OA_ORDER_LIST_REQ" => Some(Self::ProtoOaOrderListReq),
1046 "PROTO_OA_ORDER_LIST_RES" => Some(Self::ProtoOaOrderListRes),
1047 "PROTO_OA_GET_DYNAMIC_LEVERAGE_REQ" => {
1048 Some(Self::ProtoOaGetDynamicLeverageReq)
1049 }
1050 "PROTO_OA_GET_DYNAMIC_LEVERAGE_RES" => {
1051 Some(Self::ProtoOaGetDynamicLeverageRes)
1052 }
1053 "PROTO_OA_DEAL_LIST_BY_POSITION_ID_REQ" => {
1054 Some(Self::ProtoOaDealListByPositionIdReq)
1055 }
1056 "PROTO_OA_DEAL_LIST_BY_POSITION_ID_RES" => {
1057 Some(Self::ProtoOaDealListByPositionIdRes)
1058 }
1059 "PROTO_OA_ORDER_DETAILS_REQ" => Some(Self::ProtoOaOrderDetailsReq),
1060 "PROTO_OA_ORDER_DETAILS_RES" => Some(Self::ProtoOaOrderDetailsRes),
1061 "PROTO_OA_ORDER_LIST_BY_POSITION_ID_REQ" => {
1062 Some(Self::ProtoOaOrderListByPositionIdReq)
1063 }
1064 "PROTO_OA_ORDER_LIST_BY_POSITION_ID_RES" => {
1065 Some(Self::ProtoOaOrderListByPositionIdRes)
1066 }
1067 "PROTO_OA_DEAL_OFFSET_LIST_REQ" => Some(Self::ProtoOaDealOffsetListReq),
1068 "PROTO_OA_DEAL_OFFSET_LIST_RES" => Some(Self::ProtoOaDealOffsetListRes),
1069 "PROTO_OA_GET_POSITION_UNREALIZED_PNL_REQ" => {
1070 Some(Self::ProtoOaGetPositionUnrealizedPnlReq)
1071 }
1072 "PROTO_OA_GET_POSITION_UNREALIZED_PNL_RES" => {
1073 Some(Self::ProtoOaGetPositionUnrealizedPnlRes)
1074 }
1075 _ => None,
1076 }
1077 }
1078}
1079#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1080#[repr(i32)]
1081pub enum ProtoOaDayOfWeek {
1082 None = 0,
1083 Monday = 1,
1084 Tuesday = 2,
1085 Wednesday = 3,
1086 Thursday = 4,
1087 Friday = 5,
1088 Saturday = 6,
1089 Sunday = 7,
1090}
1091impl ProtoOaDayOfWeek {
1092 pub fn as_str_name(&self) -> &'static str {
1097 match self {
1098 Self::None => "NONE",
1099 Self::Monday => "MONDAY",
1100 Self::Tuesday => "TUESDAY",
1101 Self::Wednesday => "WEDNESDAY",
1102 Self::Thursday => "THURSDAY",
1103 Self::Friday => "FRIDAY",
1104 Self::Saturday => "SATURDAY",
1105 Self::Sunday => "SUNDAY",
1106 }
1107 }
1108 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1110 match value {
1111 "NONE" => Some(Self::None),
1112 "MONDAY" => Some(Self::Monday),
1113 "TUESDAY" => Some(Self::Tuesday),
1114 "WEDNESDAY" => Some(Self::Wednesday),
1115 "THURSDAY" => Some(Self::Thursday),
1116 "FRIDAY" => Some(Self::Friday),
1117 "SATURDAY" => Some(Self::Saturday),
1118 "SUNDAY" => Some(Self::Sunday),
1119 _ => None,
1120 }
1121 }
1122}
1123#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1124#[repr(i32)]
1125pub enum ProtoOaCommissionType {
1126 UsdPerMillionUsd = 1,
1127 UsdPerLot = 2,
1128 PercentageOfValue = 3,
1129 QuoteCcyPerLot = 4,
1130}
1131impl ProtoOaCommissionType {
1132 pub fn as_str_name(&self) -> &'static str {
1137 match self {
1138 Self::UsdPerMillionUsd => "USD_PER_MILLION_USD",
1139 Self::UsdPerLot => "USD_PER_LOT",
1140 Self::PercentageOfValue => "PERCENTAGE_OF_VALUE",
1141 Self::QuoteCcyPerLot => "QUOTE_CCY_PER_LOT",
1142 }
1143 }
1144 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1146 match value {
1147 "USD_PER_MILLION_USD" => Some(Self::UsdPerMillionUsd),
1148 "USD_PER_LOT" => Some(Self::UsdPerLot),
1149 "PERCENTAGE_OF_VALUE" => Some(Self::PercentageOfValue),
1150 "QUOTE_CCY_PER_LOT" => Some(Self::QuoteCcyPerLot),
1151 _ => None,
1152 }
1153 }
1154}
1155#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1156#[repr(i32)]
1157pub enum ProtoOaSymbolDistanceType {
1158 SymbolDistanceInPoints = 1,
1159 SymbolDistanceInPercentage = 2,
1160}
1161impl ProtoOaSymbolDistanceType {
1162 pub fn as_str_name(&self) -> &'static str {
1167 match self {
1168 Self::SymbolDistanceInPoints => "SYMBOL_DISTANCE_IN_POINTS",
1169 Self::SymbolDistanceInPercentage => "SYMBOL_DISTANCE_IN_PERCENTAGE",
1170 }
1171 }
1172 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1174 match value {
1175 "SYMBOL_DISTANCE_IN_POINTS" => Some(Self::SymbolDistanceInPoints),
1176 "SYMBOL_DISTANCE_IN_PERCENTAGE" => Some(Self::SymbolDistanceInPercentage),
1177 _ => None,
1178 }
1179 }
1180}
1181#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1182#[repr(i32)]
1183pub enum ProtoOaMinCommissionType {
1184 Currency = 1,
1185 QuoteCurrency = 2,
1186}
1187impl ProtoOaMinCommissionType {
1188 pub fn as_str_name(&self) -> &'static str {
1193 match self {
1194 Self::Currency => "CURRENCY",
1195 Self::QuoteCurrency => "QUOTE_CURRENCY",
1196 }
1197 }
1198 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1200 match value {
1201 "CURRENCY" => Some(Self::Currency),
1202 "QUOTE_CURRENCY" => Some(Self::QuoteCurrency),
1203 _ => None,
1204 }
1205 }
1206}
1207#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1208#[repr(i32)]
1209pub enum ProtoOaTradingMode {
1210 Enabled = 0,
1211 DisabledWithoutPendingsExecution = 1,
1212 DisabledWithPendingsExecution = 2,
1213 CloseOnlyMode = 3,
1214}
1215impl ProtoOaTradingMode {
1216 pub fn as_str_name(&self) -> &'static str {
1221 match self {
1222 Self::Enabled => "ENABLED",
1223 Self::DisabledWithoutPendingsExecution => {
1224 "DISABLED_WITHOUT_PENDINGS_EXECUTION"
1225 }
1226 Self::DisabledWithPendingsExecution => "DISABLED_WITH_PENDINGS_EXECUTION",
1227 Self::CloseOnlyMode => "CLOSE_ONLY_MODE",
1228 }
1229 }
1230 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1232 match value {
1233 "ENABLED" => Some(Self::Enabled),
1234 "DISABLED_WITHOUT_PENDINGS_EXECUTION" => {
1235 Some(Self::DisabledWithoutPendingsExecution)
1236 }
1237 "DISABLED_WITH_PENDINGS_EXECUTION" => {
1238 Some(Self::DisabledWithPendingsExecution)
1239 }
1240 "CLOSE_ONLY_MODE" => Some(Self::CloseOnlyMode),
1241 _ => None,
1242 }
1243 }
1244}
1245#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1246#[repr(i32)]
1247pub enum ProtoOaSwapCalculationType {
1248 Pips = 0,
1249 Percentage = 1,
1250}
1251impl ProtoOaSwapCalculationType {
1252 pub fn as_str_name(&self) -> &'static str {
1257 match self {
1258 Self::Pips => "PIPS",
1259 Self::Percentage => "PERCENTAGE",
1260 }
1261 }
1262 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1264 match value {
1265 "PIPS" => Some(Self::Pips),
1266 "PERCENTAGE" => Some(Self::Percentage),
1267 _ => None,
1268 }
1269 }
1270}
1271#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1272#[repr(i32)]
1273pub enum ProtoOaAccessRights {
1274 FullAccess = 0,
1275 CloseOnly = 1,
1276 NoTrading = 2,
1277 NoLogin = 3,
1278}
1279impl ProtoOaAccessRights {
1280 pub fn as_str_name(&self) -> &'static str {
1285 match self {
1286 Self::FullAccess => "FULL_ACCESS",
1287 Self::CloseOnly => "CLOSE_ONLY",
1288 Self::NoTrading => "NO_TRADING",
1289 Self::NoLogin => "NO_LOGIN",
1290 }
1291 }
1292 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1294 match value {
1295 "FULL_ACCESS" => Some(Self::FullAccess),
1296 "CLOSE_ONLY" => Some(Self::CloseOnly),
1297 "NO_TRADING" => Some(Self::NoTrading),
1298 "NO_LOGIN" => Some(Self::NoLogin),
1299 _ => None,
1300 }
1301 }
1302}
1303#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1304#[repr(i32)]
1305pub enum ProtoOaTotalMarginCalculationType {
1306 Max = 0,
1307 Sum = 1,
1308 Net = 2,
1309}
1310impl ProtoOaTotalMarginCalculationType {
1311 pub fn as_str_name(&self) -> &'static str {
1316 match self {
1317 Self::Max => "MAX",
1318 Self::Sum => "SUM",
1319 Self::Net => "NET",
1320 }
1321 }
1322 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1324 match value {
1325 "MAX" => Some(Self::Max),
1326 "SUM" => Some(Self::Sum),
1327 "NET" => Some(Self::Net),
1328 _ => None,
1329 }
1330 }
1331}
1332#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1333#[repr(i32)]
1334pub enum ProtoOaAccountType {
1335 Hedged = 0,
1336 Netted = 1,
1337 SpreadBetting = 2,
1338}
1339impl ProtoOaAccountType {
1340 pub fn as_str_name(&self) -> &'static str {
1345 match self {
1346 Self::Hedged => "HEDGED",
1347 Self::Netted => "NETTED",
1348 Self::SpreadBetting => "SPREAD_BETTING",
1349 }
1350 }
1351 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1353 match value {
1354 "HEDGED" => Some(Self::Hedged),
1355 "NETTED" => Some(Self::Netted),
1356 "SPREAD_BETTING" => Some(Self::SpreadBetting),
1357 _ => None,
1358 }
1359 }
1360}
1361#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1362#[repr(i32)]
1363pub enum ProtoOaPositionStatus {
1364 PositionStatusOpen = 1,
1365 PositionStatusClosed = 2,
1366 PositionStatusCreated = 3,
1367 PositionStatusError = 4,
1368}
1369impl ProtoOaPositionStatus {
1370 pub fn as_str_name(&self) -> &'static str {
1375 match self {
1376 Self::PositionStatusOpen => "POSITION_STATUS_OPEN",
1377 Self::PositionStatusClosed => "POSITION_STATUS_CLOSED",
1378 Self::PositionStatusCreated => "POSITION_STATUS_CREATED",
1379 Self::PositionStatusError => "POSITION_STATUS_ERROR",
1380 }
1381 }
1382 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1384 match value {
1385 "POSITION_STATUS_OPEN" => Some(Self::PositionStatusOpen),
1386 "POSITION_STATUS_CLOSED" => Some(Self::PositionStatusClosed),
1387 "POSITION_STATUS_CREATED" => Some(Self::PositionStatusCreated),
1388 "POSITION_STATUS_ERROR" => Some(Self::PositionStatusError),
1389 _ => None,
1390 }
1391 }
1392}
1393#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1394#[repr(i32)]
1395pub enum ProtoOaTradeSide {
1396 Buy = 1,
1397 Sell = 2,
1398}
1399impl ProtoOaTradeSide {
1400 pub fn as_str_name(&self) -> &'static str {
1405 match self {
1406 Self::Buy => "BUY",
1407 Self::Sell => "SELL",
1408 }
1409 }
1410 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1412 match value {
1413 "BUY" => Some(Self::Buy),
1414 "SELL" => Some(Self::Sell),
1415 _ => None,
1416 }
1417 }
1418}
1419#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1420#[repr(i32)]
1421pub enum ProtoOaOrderType {
1422 Market = 1,
1423 Limit = 2,
1424 Stop = 3,
1425 StopLossTakeProfit = 4,
1426 MarketRange = 5,
1427 StopLimit = 6,
1428}
1429impl ProtoOaOrderType {
1430 pub fn as_str_name(&self) -> &'static str {
1435 match self {
1436 Self::Market => "MARKET",
1437 Self::Limit => "LIMIT",
1438 Self::Stop => "STOP",
1439 Self::StopLossTakeProfit => "STOP_LOSS_TAKE_PROFIT",
1440 Self::MarketRange => "MARKET_RANGE",
1441 Self::StopLimit => "STOP_LIMIT",
1442 }
1443 }
1444 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1446 match value {
1447 "MARKET" => Some(Self::Market),
1448 "LIMIT" => Some(Self::Limit),
1449 "STOP" => Some(Self::Stop),
1450 "STOP_LOSS_TAKE_PROFIT" => Some(Self::StopLossTakeProfit),
1451 "MARKET_RANGE" => Some(Self::MarketRange),
1452 "STOP_LIMIT" => Some(Self::StopLimit),
1453 _ => None,
1454 }
1455 }
1456}
1457#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1458#[repr(i32)]
1459pub enum ProtoOaTimeInForce {
1460 GoodTillDate = 1,
1461 GoodTillCancel = 2,
1462 ImmediateOrCancel = 3,
1463 FillOrKill = 4,
1464 MarketOnOpen = 5,
1465}
1466impl ProtoOaTimeInForce {
1467 pub fn as_str_name(&self) -> &'static str {
1472 match self {
1473 Self::GoodTillDate => "GOOD_TILL_DATE",
1474 Self::GoodTillCancel => "GOOD_TILL_CANCEL",
1475 Self::ImmediateOrCancel => "IMMEDIATE_OR_CANCEL",
1476 Self::FillOrKill => "FILL_OR_KILL",
1477 Self::MarketOnOpen => "MARKET_ON_OPEN",
1478 }
1479 }
1480 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1482 match value {
1483 "GOOD_TILL_DATE" => Some(Self::GoodTillDate),
1484 "GOOD_TILL_CANCEL" => Some(Self::GoodTillCancel),
1485 "IMMEDIATE_OR_CANCEL" => Some(Self::ImmediateOrCancel),
1486 "FILL_OR_KILL" => Some(Self::FillOrKill),
1487 "MARKET_ON_OPEN" => Some(Self::MarketOnOpen),
1488 _ => None,
1489 }
1490 }
1491}
1492#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1493#[repr(i32)]
1494pub enum ProtoOaOrderStatus {
1495 OrderStatusAccepted = 1,
1496 OrderStatusFilled = 2,
1497 OrderStatusRejected = 3,
1498 OrderStatusExpired = 4,
1499 OrderStatusCancelled = 5,
1500}
1501impl ProtoOaOrderStatus {
1502 pub fn as_str_name(&self) -> &'static str {
1507 match self {
1508 Self::OrderStatusAccepted => "ORDER_STATUS_ACCEPTED",
1509 Self::OrderStatusFilled => "ORDER_STATUS_FILLED",
1510 Self::OrderStatusRejected => "ORDER_STATUS_REJECTED",
1511 Self::OrderStatusExpired => "ORDER_STATUS_EXPIRED",
1512 Self::OrderStatusCancelled => "ORDER_STATUS_CANCELLED",
1513 }
1514 }
1515 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1517 match value {
1518 "ORDER_STATUS_ACCEPTED" => Some(Self::OrderStatusAccepted),
1519 "ORDER_STATUS_FILLED" => Some(Self::OrderStatusFilled),
1520 "ORDER_STATUS_REJECTED" => Some(Self::OrderStatusRejected),
1521 "ORDER_STATUS_EXPIRED" => Some(Self::OrderStatusExpired),
1522 "ORDER_STATUS_CANCELLED" => Some(Self::OrderStatusCancelled),
1523 _ => None,
1524 }
1525 }
1526}
1527#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1528#[repr(i32)]
1529pub enum ProtoOaOrderTriggerMethod {
1530 Trade = 1,
1531 Opposite = 2,
1532 DoubleTrade = 3,
1533 DoubleOpposite = 4,
1534}
1535impl ProtoOaOrderTriggerMethod {
1536 pub fn as_str_name(&self) -> &'static str {
1541 match self {
1542 Self::Trade => "TRADE",
1543 Self::Opposite => "OPPOSITE",
1544 Self::DoubleTrade => "DOUBLE_TRADE",
1545 Self::DoubleOpposite => "DOUBLE_OPPOSITE",
1546 }
1547 }
1548 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1550 match value {
1551 "TRADE" => Some(Self::Trade),
1552 "OPPOSITE" => Some(Self::Opposite),
1553 "DOUBLE_TRADE" => Some(Self::DoubleTrade),
1554 "DOUBLE_OPPOSITE" => Some(Self::DoubleOpposite),
1555 _ => None,
1556 }
1557 }
1558}
1559#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1560#[repr(i32)]
1561pub enum ProtoOaExecutionType {
1562 OrderAccepted = 2,
1563 OrderFilled = 3,
1564 OrderReplaced = 4,
1565 OrderCancelled = 5,
1566 OrderExpired = 6,
1567 OrderRejected = 7,
1568 OrderCancelRejected = 8,
1569 Swap = 9,
1570 DepositWithdraw = 10,
1571 OrderPartialFill = 11,
1572 BonusDepositWithdraw = 12,
1573}
1574impl ProtoOaExecutionType {
1575 pub fn as_str_name(&self) -> &'static str {
1580 match self {
1581 Self::OrderAccepted => "ORDER_ACCEPTED",
1582 Self::OrderFilled => "ORDER_FILLED",
1583 Self::OrderReplaced => "ORDER_REPLACED",
1584 Self::OrderCancelled => "ORDER_CANCELLED",
1585 Self::OrderExpired => "ORDER_EXPIRED",
1586 Self::OrderRejected => "ORDER_REJECTED",
1587 Self::OrderCancelRejected => "ORDER_CANCEL_REJECTED",
1588 Self::Swap => "SWAP",
1589 Self::DepositWithdraw => "DEPOSIT_WITHDRAW",
1590 Self::OrderPartialFill => "ORDER_PARTIAL_FILL",
1591 Self::BonusDepositWithdraw => "BONUS_DEPOSIT_WITHDRAW",
1592 }
1593 }
1594 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1596 match value {
1597 "ORDER_ACCEPTED" => Some(Self::OrderAccepted),
1598 "ORDER_FILLED" => Some(Self::OrderFilled),
1599 "ORDER_REPLACED" => Some(Self::OrderReplaced),
1600 "ORDER_CANCELLED" => Some(Self::OrderCancelled),
1601 "ORDER_EXPIRED" => Some(Self::OrderExpired),
1602 "ORDER_REJECTED" => Some(Self::OrderRejected),
1603 "ORDER_CANCEL_REJECTED" => Some(Self::OrderCancelRejected),
1604 "SWAP" => Some(Self::Swap),
1605 "DEPOSIT_WITHDRAW" => Some(Self::DepositWithdraw),
1606 "ORDER_PARTIAL_FILL" => Some(Self::OrderPartialFill),
1607 "BONUS_DEPOSIT_WITHDRAW" => Some(Self::BonusDepositWithdraw),
1608 _ => None,
1609 }
1610 }
1611}
1612#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1613#[repr(i32)]
1614pub enum ProtoOaChangeBonusType {
1615 BonusDeposit = 0,
1616 BonusWithdraw = 1,
1617}
1618impl ProtoOaChangeBonusType {
1619 pub fn as_str_name(&self) -> &'static str {
1624 match self {
1625 Self::BonusDeposit => "BONUS_DEPOSIT",
1626 Self::BonusWithdraw => "BONUS_WITHDRAW",
1627 }
1628 }
1629 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1631 match value {
1632 "BONUS_DEPOSIT" => Some(Self::BonusDeposit),
1633 "BONUS_WITHDRAW" => Some(Self::BonusWithdraw),
1634 _ => None,
1635 }
1636 }
1637}
1638#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1639#[repr(i32)]
1640pub enum ProtoOaChangeBalanceType {
1641 BalanceDeposit = 0,
1642 BalanceWithdraw = 1,
1643 BalanceDepositStrategyCommissionInner = 3,
1644 BalanceWithdrawStrategyCommissionInner = 4,
1645 BalanceDepositIbCommissions = 5,
1646 BalanceWithdrawIbSharedPercentage = 6,
1647 BalanceDepositIbSharedPercentageFromSubIb = 7,
1648 BalanceDepositIbSharedPercentageFromBroker = 8,
1649 BalanceDepositRebate = 9,
1650 BalanceWithdrawRebate = 10,
1651 BalanceDepositStrategyCommissionOuter = 11,
1652 BalanceWithdrawStrategyCommissionOuter = 12,
1653 BalanceWithdrawBonusCompensation = 13,
1654 BalanceWithdrawIbSharedPercentageToBroker = 14,
1655 BalanceDepositDividends = 15,
1656 BalanceWithdrawDividends = 16,
1657 BalanceWithdrawGslCharge = 17,
1658 BalanceWithdrawRollover = 18,
1659 BalanceDepositNonwithdrawableBonus = 19,
1660 BalanceWithdrawNonwithdrawableBonus = 20,
1661 BalanceDepositSwap = 21,
1662 BalanceWithdrawSwap = 22,
1663 BalanceDepositManagementFee = 27,
1664 BalanceWithdrawManagementFee = 28,
1665 BalanceDepositPerformanceFee = 29,
1666 BalanceWithdrawForSubaccount = 30,
1667 BalanceDepositToSubaccount = 31,
1668 BalanceWithdrawFromSubaccount = 32,
1669 BalanceDepositFromSubaccount = 33,
1670 BalanceWithdrawCopyFee = 34,
1671 BalanceWithdrawInactivityFee = 35,
1672 BalanceDepositTransfer = 36,
1673 BalanceWithdrawTransfer = 37,
1674 BalanceDepositConvertedBonus = 38,
1675 BalanceDepositNegativeBalanceProtection = 39,
1676}
1677impl ProtoOaChangeBalanceType {
1678 pub fn as_str_name(&self) -> &'static str {
1683 match self {
1684 Self::BalanceDeposit => "BALANCE_DEPOSIT",
1685 Self::BalanceWithdraw => "BALANCE_WITHDRAW",
1686 Self::BalanceDepositStrategyCommissionInner => {
1687 "BALANCE_DEPOSIT_STRATEGY_COMMISSION_INNER"
1688 }
1689 Self::BalanceWithdrawStrategyCommissionInner => {
1690 "BALANCE_WITHDRAW_STRATEGY_COMMISSION_INNER"
1691 }
1692 Self::BalanceDepositIbCommissions => "BALANCE_DEPOSIT_IB_COMMISSIONS",
1693 Self::BalanceWithdrawIbSharedPercentage => {
1694 "BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE"
1695 }
1696 Self::BalanceDepositIbSharedPercentageFromSubIb => {
1697 "BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_SUB_IB"
1698 }
1699 Self::BalanceDepositIbSharedPercentageFromBroker => {
1700 "BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_BROKER"
1701 }
1702 Self::BalanceDepositRebate => "BALANCE_DEPOSIT_REBATE",
1703 Self::BalanceWithdrawRebate => "BALANCE_WITHDRAW_REBATE",
1704 Self::BalanceDepositStrategyCommissionOuter => {
1705 "BALANCE_DEPOSIT_STRATEGY_COMMISSION_OUTER"
1706 }
1707 Self::BalanceWithdrawStrategyCommissionOuter => {
1708 "BALANCE_WITHDRAW_STRATEGY_COMMISSION_OUTER"
1709 }
1710 Self::BalanceWithdrawBonusCompensation => {
1711 "BALANCE_WITHDRAW_BONUS_COMPENSATION"
1712 }
1713 Self::BalanceWithdrawIbSharedPercentageToBroker => {
1714 "BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE_TO_BROKER"
1715 }
1716 Self::BalanceDepositDividends => "BALANCE_DEPOSIT_DIVIDENDS",
1717 Self::BalanceWithdrawDividends => "BALANCE_WITHDRAW_DIVIDENDS",
1718 Self::BalanceWithdrawGslCharge => "BALANCE_WITHDRAW_GSL_CHARGE",
1719 Self::BalanceWithdrawRollover => "BALANCE_WITHDRAW_ROLLOVER",
1720 Self::BalanceDepositNonwithdrawableBonus => {
1721 "BALANCE_DEPOSIT_NONWITHDRAWABLE_BONUS"
1722 }
1723 Self::BalanceWithdrawNonwithdrawableBonus => {
1724 "BALANCE_WITHDRAW_NONWITHDRAWABLE_BONUS"
1725 }
1726 Self::BalanceDepositSwap => "BALANCE_DEPOSIT_SWAP",
1727 Self::BalanceWithdrawSwap => "BALANCE_WITHDRAW_SWAP",
1728 Self::BalanceDepositManagementFee => "BALANCE_DEPOSIT_MANAGEMENT_FEE",
1729 Self::BalanceWithdrawManagementFee => "BALANCE_WITHDRAW_MANAGEMENT_FEE",
1730 Self::BalanceDepositPerformanceFee => "BALANCE_DEPOSIT_PERFORMANCE_FEE",
1731 Self::BalanceWithdrawForSubaccount => "BALANCE_WITHDRAW_FOR_SUBACCOUNT",
1732 Self::BalanceDepositToSubaccount => "BALANCE_DEPOSIT_TO_SUBACCOUNT",
1733 Self::BalanceWithdrawFromSubaccount => "BALANCE_WITHDRAW_FROM_SUBACCOUNT",
1734 Self::BalanceDepositFromSubaccount => "BALANCE_DEPOSIT_FROM_SUBACCOUNT",
1735 Self::BalanceWithdrawCopyFee => "BALANCE_WITHDRAW_COPY_FEE",
1736 Self::BalanceWithdrawInactivityFee => "BALANCE_WITHDRAW_INACTIVITY_FEE",
1737 Self::BalanceDepositTransfer => "BALANCE_DEPOSIT_TRANSFER",
1738 Self::BalanceWithdrawTransfer => "BALANCE_WITHDRAW_TRANSFER",
1739 Self::BalanceDepositConvertedBonus => "BALANCE_DEPOSIT_CONVERTED_BONUS",
1740 Self::BalanceDepositNegativeBalanceProtection => {
1741 "BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION"
1742 }
1743 }
1744 }
1745 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1747 match value {
1748 "BALANCE_DEPOSIT" => Some(Self::BalanceDeposit),
1749 "BALANCE_WITHDRAW" => Some(Self::BalanceWithdraw),
1750 "BALANCE_DEPOSIT_STRATEGY_COMMISSION_INNER" => {
1751 Some(Self::BalanceDepositStrategyCommissionInner)
1752 }
1753 "BALANCE_WITHDRAW_STRATEGY_COMMISSION_INNER" => {
1754 Some(Self::BalanceWithdrawStrategyCommissionInner)
1755 }
1756 "BALANCE_DEPOSIT_IB_COMMISSIONS" => Some(Self::BalanceDepositIbCommissions),
1757 "BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE" => {
1758 Some(Self::BalanceWithdrawIbSharedPercentage)
1759 }
1760 "BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_SUB_IB" => {
1761 Some(Self::BalanceDepositIbSharedPercentageFromSubIb)
1762 }
1763 "BALANCE_DEPOSIT_IB_SHARED_PERCENTAGE_FROM_BROKER" => {
1764 Some(Self::BalanceDepositIbSharedPercentageFromBroker)
1765 }
1766 "BALANCE_DEPOSIT_REBATE" => Some(Self::BalanceDepositRebate),
1767 "BALANCE_WITHDRAW_REBATE" => Some(Self::BalanceWithdrawRebate),
1768 "BALANCE_DEPOSIT_STRATEGY_COMMISSION_OUTER" => {
1769 Some(Self::BalanceDepositStrategyCommissionOuter)
1770 }
1771 "BALANCE_WITHDRAW_STRATEGY_COMMISSION_OUTER" => {
1772 Some(Self::BalanceWithdrawStrategyCommissionOuter)
1773 }
1774 "BALANCE_WITHDRAW_BONUS_COMPENSATION" => {
1775 Some(Self::BalanceWithdrawBonusCompensation)
1776 }
1777 "BALANCE_WITHDRAW_IB_SHARED_PERCENTAGE_TO_BROKER" => {
1778 Some(Self::BalanceWithdrawIbSharedPercentageToBroker)
1779 }
1780 "BALANCE_DEPOSIT_DIVIDENDS" => Some(Self::BalanceDepositDividends),
1781 "BALANCE_WITHDRAW_DIVIDENDS" => Some(Self::BalanceWithdrawDividends),
1782 "BALANCE_WITHDRAW_GSL_CHARGE" => Some(Self::BalanceWithdrawGslCharge),
1783 "BALANCE_WITHDRAW_ROLLOVER" => Some(Self::BalanceWithdrawRollover),
1784 "BALANCE_DEPOSIT_NONWITHDRAWABLE_BONUS" => {
1785 Some(Self::BalanceDepositNonwithdrawableBonus)
1786 }
1787 "BALANCE_WITHDRAW_NONWITHDRAWABLE_BONUS" => {
1788 Some(Self::BalanceWithdrawNonwithdrawableBonus)
1789 }
1790 "BALANCE_DEPOSIT_SWAP" => Some(Self::BalanceDepositSwap),
1791 "BALANCE_WITHDRAW_SWAP" => Some(Self::BalanceWithdrawSwap),
1792 "BALANCE_DEPOSIT_MANAGEMENT_FEE" => Some(Self::BalanceDepositManagementFee),
1793 "BALANCE_WITHDRAW_MANAGEMENT_FEE" => Some(Self::BalanceWithdrawManagementFee),
1794 "BALANCE_DEPOSIT_PERFORMANCE_FEE" => Some(Self::BalanceDepositPerformanceFee),
1795 "BALANCE_WITHDRAW_FOR_SUBACCOUNT" => Some(Self::BalanceWithdrawForSubaccount),
1796 "BALANCE_DEPOSIT_TO_SUBACCOUNT" => Some(Self::BalanceDepositToSubaccount),
1797 "BALANCE_WITHDRAW_FROM_SUBACCOUNT" => {
1798 Some(Self::BalanceWithdrawFromSubaccount)
1799 }
1800 "BALANCE_DEPOSIT_FROM_SUBACCOUNT" => Some(Self::BalanceDepositFromSubaccount),
1801 "BALANCE_WITHDRAW_COPY_FEE" => Some(Self::BalanceWithdrawCopyFee),
1802 "BALANCE_WITHDRAW_INACTIVITY_FEE" => Some(Self::BalanceWithdrawInactivityFee),
1803 "BALANCE_DEPOSIT_TRANSFER" => Some(Self::BalanceDepositTransfer),
1804 "BALANCE_WITHDRAW_TRANSFER" => Some(Self::BalanceWithdrawTransfer),
1805 "BALANCE_DEPOSIT_CONVERTED_BONUS" => Some(Self::BalanceDepositConvertedBonus),
1806 "BALANCE_DEPOSIT_NEGATIVE_BALANCE_PROTECTION" => {
1807 Some(Self::BalanceDepositNegativeBalanceProtection)
1808 }
1809 _ => None,
1810 }
1811 }
1812}
1813#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1814#[repr(i32)]
1815pub enum ProtoOaDealStatus {
1816 Filled = 2,
1817 PartiallyFilled = 3,
1818 Rejected = 4,
1819 InternallyRejected = 5,
1820 Error = 6,
1821 Missed = 7,
1822}
1823impl ProtoOaDealStatus {
1824 pub fn as_str_name(&self) -> &'static str {
1829 match self {
1830 Self::Filled => "FILLED",
1831 Self::PartiallyFilled => "PARTIALLY_FILLED",
1832 Self::Rejected => "REJECTED",
1833 Self::InternallyRejected => "INTERNALLY_REJECTED",
1834 Self::Error => "ERROR",
1835 Self::Missed => "MISSED",
1836 }
1837 }
1838 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1840 match value {
1841 "FILLED" => Some(Self::Filled),
1842 "PARTIALLY_FILLED" => Some(Self::PartiallyFilled),
1843 "REJECTED" => Some(Self::Rejected),
1844 "INTERNALLY_REJECTED" => Some(Self::InternallyRejected),
1845 "ERROR" => Some(Self::Error),
1846 "MISSED" => Some(Self::Missed),
1847 _ => None,
1848 }
1849 }
1850}
1851#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1852#[repr(i32)]
1853pub enum ProtoOaTrendbarPeriod {
1854 M1 = 1,
1855 M2 = 2,
1856 M3 = 3,
1857 M4 = 4,
1858 M5 = 5,
1859 M10 = 6,
1860 M15 = 7,
1861 M30 = 8,
1862 H1 = 9,
1863 H4 = 10,
1864 H12 = 11,
1865 D1 = 12,
1866 W1 = 13,
1867 Mn1 = 14,
1868}
1869impl ProtoOaTrendbarPeriod {
1870 pub fn as_str_name(&self) -> &'static str {
1875 match self {
1876 Self::M1 => "M1",
1877 Self::M2 => "M2",
1878 Self::M3 => "M3",
1879 Self::M4 => "M4",
1880 Self::M5 => "M5",
1881 Self::M10 => "M10",
1882 Self::M15 => "M15",
1883 Self::M30 => "M30",
1884 Self::H1 => "H1",
1885 Self::H4 => "H4",
1886 Self::H12 => "H12",
1887 Self::D1 => "D1",
1888 Self::W1 => "W1",
1889 Self::Mn1 => "MN1",
1890 }
1891 }
1892 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1894 match value {
1895 "M1" => Some(Self::M1),
1896 "M2" => Some(Self::M2),
1897 "M3" => Some(Self::M3),
1898 "M4" => Some(Self::M4),
1899 "M5" => Some(Self::M5),
1900 "M10" => Some(Self::M10),
1901 "M15" => Some(Self::M15),
1902 "M30" => Some(Self::M30),
1903 "H1" => Some(Self::H1),
1904 "H4" => Some(Self::H4),
1905 "H12" => Some(Self::H12),
1906 "D1" => Some(Self::D1),
1907 "W1" => Some(Self::W1),
1908 "MN1" => Some(Self::Mn1),
1909 _ => None,
1910 }
1911 }
1912}
1913#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1914#[repr(i32)]
1915pub enum ProtoOaQuoteType {
1916 Bid = 1,
1917 Ask = 2,
1918}
1919impl ProtoOaQuoteType {
1920 pub fn as_str_name(&self) -> &'static str {
1925 match self {
1926 Self::Bid => "BID",
1927 Self::Ask => "ASK",
1928 }
1929 }
1930 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1932 match value {
1933 "BID" => Some(Self::Bid),
1934 "ASK" => Some(Self::Ask),
1935 _ => None,
1936 }
1937 }
1938}
1939#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1940#[repr(i32)]
1941pub enum ProtoOaClientPermissionScope {
1942 ScopeView = 0,
1943 ScopeTrade = 1,
1944}
1945impl ProtoOaClientPermissionScope {
1946 pub fn as_str_name(&self) -> &'static str {
1951 match self {
1952 Self::ScopeView => "SCOPE_VIEW",
1953 Self::ScopeTrade => "SCOPE_TRADE",
1954 }
1955 }
1956 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1958 match value {
1959 "SCOPE_VIEW" => Some(Self::ScopeView),
1960 "SCOPE_TRADE" => Some(Self::ScopeTrade),
1961 _ => None,
1962 }
1963 }
1964}
1965#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1966#[repr(i32)]
1967pub enum ProtoOaNotificationType {
1968 MarginLevelThreshold1 = 61,
1969 MarginLevelThreshold2 = 62,
1970 MarginLevelThreshold3 = 63,
1971}
1972impl ProtoOaNotificationType {
1973 pub fn as_str_name(&self) -> &'static str {
1978 match self {
1979 Self::MarginLevelThreshold1 => "MARGIN_LEVEL_THRESHOLD_1",
1980 Self::MarginLevelThreshold2 => "MARGIN_LEVEL_THRESHOLD_2",
1981 Self::MarginLevelThreshold3 => "MARGIN_LEVEL_THRESHOLD_3",
1982 }
1983 }
1984 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1986 match value {
1987 "MARGIN_LEVEL_THRESHOLD_1" => Some(Self::MarginLevelThreshold1),
1988 "MARGIN_LEVEL_THRESHOLD_2" => Some(Self::MarginLevelThreshold2),
1989 "MARGIN_LEVEL_THRESHOLD_3" => Some(Self::MarginLevelThreshold3),
1990 _ => None,
1991 }
1992 }
1993}
1994#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1995#[repr(i32)]
1996pub enum ProtoOaErrorCode {
1997 OaAuthTokenExpired = 1,
1998 AccountNotAuthorized = 2,
1999 RetNoSuchLogin = 12,
2000 AlreadyLoggedIn = 14,
2001 RetAccountDisabled = 64,
2002 ChClientAuthFailure = 101,
2003 ChClientNotAuthenticated = 102,
2004 ChClientAlreadyAuthenticated = 103,
2005 ChAccessTokenInvalid = 104,
2006 ChServerNotReachable = 105,
2007 ChCtidTraderAccountNotFound = 106,
2008 ChOaClientNotFound = 107,
2009 RequestFrequencyExceeded = 108,
2010 ServerIsUnderMaintenance = 109,
2011 ChannelIsBlocked = 110,
2012 ConnectionsLimitExceeded = 67,
2013 WorseGslNotAllowed = 68,
2014 SymbolHasHoliday = 69,
2015 NotSubscribedToSpots = 112,
2016 AlreadySubscribed = 113,
2017 SymbolNotFound = 114,
2018 UnknownSymbol = 115,
2019 IncorrectBoundaries = 35,
2020 NoQuotes = 117,
2021 NotEnoughMoney = 118,
2022 MaxExposureReached = 119,
2023 PositionNotFound = 120,
2024 OrderNotFound = 121,
2025 PositionNotOpen = 122,
2026 PositionLocked = 123,
2027 TooManyPositions = 124,
2028 TradingBadVolume = 125,
2029 TradingBadStops = 126,
2030 TradingBadPrices = 127,
2031 TradingBadStake = 128,
2032 ProtectionIsTooCloseToMarket = 129,
2033 TradingBadExpirationDate = 130,
2034 PendingExecution = 131,
2035 TradingDisabled = 132,
2036 TradingNotAllowed = 133,
2037 UnableToCancelOrder = 134,
2038 UnableToAmendOrder = 135,
2039 ShortSellingNotAllowed = 136,
2040}
2041impl ProtoOaErrorCode {
2042 pub fn as_str_name(&self) -> &'static str {
2047 match self {
2048 Self::OaAuthTokenExpired => "OA_AUTH_TOKEN_EXPIRED",
2049 Self::AccountNotAuthorized => "ACCOUNT_NOT_AUTHORIZED",
2050 Self::RetNoSuchLogin => "RET_NO_SUCH_LOGIN",
2051 Self::AlreadyLoggedIn => "ALREADY_LOGGED_IN",
2052 Self::RetAccountDisabled => "RET_ACCOUNT_DISABLED",
2053 Self::ChClientAuthFailure => "CH_CLIENT_AUTH_FAILURE",
2054 Self::ChClientNotAuthenticated => "CH_CLIENT_NOT_AUTHENTICATED",
2055 Self::ChClientAlreadyAuthenticated => "CH_CLIENT_ALREADY_AUTHENTICATED",
2056 Self::ChAccessTokenInvalid => "CH_ACCESS_TOKEN_INVALID",
2057 Self::ChServerNotReachable => "CH_SERVER_NOT_REACHABLE",
2058 Self::ChCtidTraderAccountNotFound => "CH_CTID_TRADER_ACCOUNT_NOT_FOUND",
2059 Self::ChOaClientNotFound => "CH_OA_CLIENT_NOT_FOUND",
2060 Self::RequestFrequencyExceeded => "REQUEST_FREQUENCY_EXCEEDED",
2061 Self::ServerIsUnderMaintenance => "SERVER_IS_UNDER_MAINTENANCE",
2062 Self::ChannelIsBlocked => "CHANNEL_IS_BLOCKED",
2063 Self::ConnectionsLimitExceeded => "CONNECTIONS_LIMIT_EXCEEDED",
2064 Self::WorseGslNotAllowed => "WORSE_GSL_NOT_ALLOWED",
2065 Self::SymbolHasHoliday => "SYMBOL_HAS_HOLIDAY",
2066 Self::NotSubscribedToSpots => "NOT_SUBSCRIBED_TO_SPOTS",
2067 Self::AlreadySubscribed => "ALREADY_SUBSCRIBED",
2068 Self::SymbolNotFound => "SYMBOL_NOT_FOUND",
2069 Self::UnknownSymbol => "UNKNOWN_SYMBOL",
2070 Self::IncorrectBoundaries => "INCORRECT_BOUNDARIES",
2071 Self::NoQuotes => "NO_QUOTES",
2072 Self::NotEnoughMoney => "NOT_ENOUGH_MONEY",
2073 Self::MaxExposureReached => "MAX_EXPOSURE_REACHED",
2074 Self::PositionNotFound => "POSITION_NOT_FOUND",
2075 Self::OrderNotFound => "ORDER_NOT_FOUND",
2076 Self::PositionNotOpen => "POSITION_NOT_OPEN",
2077 Self::PositionLocked => "POSITION_LOCKED",
2078 Self::TooManyPositions => "TOO_MANY_POSITIONS",
2079 Self::TradingBadVolume => "TRADING_BAD_VOLUME",
2080 Self::TradingBadStops => "TRADING_BAD_STOPS",
2081 Self::TradingBadPrices => "TRADING_BAD_PRICES",
2082 Self::TradingBadStake => "TRADING_BAD_STAKE",
2083 Self::ProtectionIsTooCloseToMarket => "PROTECTION_IS_TOO_CLOSE_TO_MARKET",
2084 Self::TradingBadExpirationDate => "TRADING_BAD_EXPIRATION_DATE",
2085 Self::PendingExecution => "PENDING_EXECUTION",
2086 Self::TradingDisabled => "TRADING_DISABLED",
2087 Self::TradingNotAllowed => "TRADING_NOT_ALLOWED",
2088 Self::UnableToCancelOrder => "UNABLE_TO_CANCEL_ORDER",
2089 Self::UnableToAmendOrder => "UNABLE_TO_AMEND_ORDER",
2090 Self::ShortSellingNotAllowed => "SHORT_SELLING_NOT_ALLOWED",
2091 }
2092 }
2093 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2095 match value {
2096 "OA_AUTH_TOKEN_EXPIRED" => Some(Self::OaAuthTokenExpired),
2097 "ACCOUNT_NOT_AUTHORIZED" => Some(Self::AccountNotAuthorized),
2098 "RET_NO_SUCH_LOGIN" => Some(Self::RetNoSuchLogin),
2099 "ALREADY_LOGGED_IN" => Some(Self::AlreadyLoggedIn),
2100 "RET_ACCOUNT_DISABLED" => Some(Self::RetAccountDisabled),
2101 "CH_CLIENT_AUTH_FAILURE" => Some(Self::ChClientAuthFailure),
2102 "CH_CLIENT_NOT_AUTHENTICATED" => Some(Self::ChClientNotAuthenticated),
2103 "CH_CLIENT_ALREADY_AUTHENTICATED" => Some(Self::ChClientAlreadyAuthenticated),
2104 "CH_ACCESS_TOKEN_INVALID" => Some(Self::ChAccessTokenInvalid),
2105 "CH_SERVER_NOT_REACHABLE" => Some(Self::ChServerNotReachable),
2106 "CH_CTID_TRADER_ACCOUNT_NOT_FOUND" => Some(Self::ChCtidTraderAccountNotFound),
2107 "CH_OA_CLIENT_NOT_FOUND" => Some(Self::ChOaClientNotFound),
2108 "REQUEST_FREQUENCY_EXCEEDED" => Some(Self::RequestFrequencyExceeded),
2109 "SERVER_IS_UNDER_MAINTENANCE" => Some(Self::ServerIsUnderMaintenance),
2110 "CHANNEL_IS_BLOCKED" => Some(Self::ChannelIsBlocked),
2111 "CONNECTIONS_LIMIT_EXCEEDED" => Some(Self::ConnectionsLimitExceeded),
2112 "WORSE_GSL_NOT_ALLOWED" => Some(Self::WorseGslNotAllowed),
2113 "SYMBOL_HAS_HOLIDAY" => Some(Self::SymbolHasHoliday),
2114 "NOT_SUBSCRIBED_TO_SPOTS" => Some(Self::NotSubscribedToSpots),
2115 "ALREADY_SUBSCRIBED" => Some(Self::AlreadySubscribed),
2116 "SYMBOL_NOT_FOUND" => Some(Self::SymbolNotFound),
2117 "UNKNOWN_SYMBOL" => Some(Self::UnknownSymbol),
2118 "INCORRECT_BOUNDARIES" => Some(Self::IncorrectBoundaries),
2119 "NO_QUOTES" => Some(Self::NoQuotes),
2120 "NOT_ENOUGH_MONEY" => Some(Self::NotEnoughMoney),
2121 "MAX_EXPOSURE_REACHED" => Some(Self::MaxExposureReached),
2122 "POSITION_NOT_FOUND" => Some(Self::PositionNotFound),
2123 "ORDER_NOT_FOUND" => Some(Self::OrderNotFound),
2124 "POSITION_NOT_OPEN" => Some(Self::PositionNotOpen),
2125 "POSITION_LOCKED" => Some(Self::PositionLocked),
2126 "TOO_MANY_POSITIONS" => Some(Self::TooManyPositions),
2127 "TRADING_BAD_VOLUME" => Some(Self::TradingBadVolume),
2128 "TRADING_BAD_STOPS" => Some(Self::TradingBadStops),
2129 "TRADING_BAD_PRICES" => Some(Self::TradingBadPrices),
2130 "TRADING_BAD_STAKE" => Some(Self::TradingBadStake),
2131 "PROTECTION_IS_TOO_CLOSE_TO_MARKET" => {
2132 Some(Self::ProtectionIsTooCloseToMarket)
2133 }
2134 "TRADING_BAD_EXPIRATION_DATE" => Some(Self::TradingBadExpirationDate),
2135 "PENDING_EXECUTION" => Some(Self::PendingExecution),
2136 "TRADING_DISABLED" => Some(Self::TradingDisabled),
2137 "TRADING_NOT_ALLOWED" => Some(Self::TradingNotAllowed),
2138 "UNABLE_TO_CANCEL_ORDER" => Some(Self::UnableToCancelOrder),
2139 "UNABLE_TO_AMEND_ORDER" => Some(Self::UnableToAmendOrder),
2140 "SHORT_SELLING_NOT_ALLOWED" => Some(Self::ShortSellingNotAllowed),
2141 _ => None,
2142 }
2143 }
2144}
2145#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2146#[repr(i32)]
2147pub enum ProtoOaLimitedRiskMarginCalculationStrategy {
2148 AccordingToLeverage = 0,
2149 AccordingToGsl = 1,
2150 AccordingToGslAndLeverage = 2,
2151}
2152impl ProtoOaLimitedRiskMarginCalculationStrategy {
2153 pub fn as_str_name(&self) -> &'static str {
2158 match self {
2159 Self::AccordingToLeverage => "ACCORDING_TO_LEVERAGE",
2160 Self::AccordingToGsl => "ACCORDING_TO_GSL",
2161 Self::AccordingToGslAndLeverage => "ACCORDING_TO_GSL_AND_LEVERAGE",
2162 }
2163 }
2164 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2166 match value {
2167 "ACCORDING_TO_LEVERAGE" => Some(Self::AccordingToLeverage),
2168 "ACCORDING_TO_GSL" => Some(Self::AccordingToGsl),
2169 "ACCORDING_TO_GSL_AND_LEVERAGE" => Some(Self::AccordingToGslAndLeverage),
2170 _ => None,
2171 }
2172 }
2173}
2174#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2175pub struct ProtoOaApplicationAuthReq {
2176 #[prost(
2177 enumeration = "ProtoOaPayloadType",
2178 optional,
2179 tag = "1",
2180 default = "ProtoOaApplicationAuthReq"
2181 )]
2182 pub payload_type: ::core::option::Option<i32>,
2183 #[prost(string, required, tag = "2")]
2184 pub client_id: ::prost::alloc::string::String,
2185 #[prost(string, required, tag = "3")]
2186 pub client_secret: ::prost::alloc::string::String,
2187}
2188#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2189pub struct ProtoOaApplicationAuthRes {
2190 #[prost(
2191 enumeration = "ProtoOaPayloadType",
2192 optional,
2193 tag = "1",
2194 default = "ProtoOaApplicationAuthRes"
2195 )]
2196 pub payload_type: ::core::option::Option<i32>,
2197}
2198#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2199pub struct ProtoOaAccountAuthReq {
2200 #[prost(
2201 enumeration = "ProtoOaPayloadType",
2202 optional,
2203 tag = "1",
2204 default = "ProtoOaAccountAuthReq"
2205 )]
2206 pub payload_type: ::core::option::Option<i32>,
2207 #[prost(int64, required, tag = "2")]
2208 pub ctid_trader_account_id: i64,
2209 #[prost(string, required, tag = "3")]
2210 pub access_token: ::prost::alloc::string::String,
2211}
2212#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2213pub struct ProtoOaAccountAuthRes {
2214 #[prost(
2215 enumeration = "ProtoOaPayloadType",
2216 optional,
2217 tag = "1",
2218 default = "ProtoOaAccountAuthRes"
2219 )]
2220 pub payload_type: ::core::option::Option<i32>,
2221 #[prost(int64, required, tag = "2")]
2222 pub ctid_trader_account_id: i64,
2223}
2224#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2225pub struct ProtoOaErrorRes {
2226 #[prost(
2227 enumeration = "ProtoOaPayloadType",
2228 optional,
2229 tag = "1",
2230 default = "ProtoOaErrorRes"
2231 )]
2232 pub payload_type: ::core::option::Option<i32>,
2233 #[prost(int64, optional, tag = "2")]
2234 pub ctid_trader_account_id: ::core::option::Option<i64>,
2235 #[prost(string, required, tag = "3")]
2236 pub error_code: ::prost::alloc::string::String,
2237 #[prost(string, optional, tag = "4")]
2238 pub description: ::core::option::Option<::prost::alloc::string::String>,
2239 #[prost(int64, optional, tag = "5")]
2240 pub maintenance_end_timestamp: ::core::option::Option<i64>,
2241}
2242#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2243pub struct ProtoOaClientDisconnectEvent {
2244 #[prost(
2245 enumeration = "ProtoOaPayloadType",
2246 optional,
2247 tag = "1",
2248 default = "ProtoOaClientDisconnectEvent"
2249 )]
2250 pub payload_type: ::core::option::Option<i32>,
2251 #[prost(string, optional, tag = "2")]
2252 pub reason: ::core::option::Option<::prost::alloc::string::String>,
2253}
2254#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2255pub struct ProtoOaAccountsTokenInvalidatedEvent {
2256 #[prost(
2257 enumeration = "ProtoOaPayloadType",
2258 optional,
2259 tag = "1",
2260 default = "ProtoOaAccountsTokenInvalidatedEvent"
2261 )]
2262 pub payload_type: ::core::option::Option<i32>,
2263 #[prost(int64, repeated, packed = "false", tag = "2")]
2264 pub ctid_trader_account_ids: ::prost::alloc::vec::Vec<i64>,
2265 #[prost(string, optional, tag = "3")]
2266 pub reason: ::core::option::Option<::prost::alloc::string::String>,
2267}
2268#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2269pub struct ProtoOaVersionReq {
2270 #[prost(
2271 enumeration = "ProtoOaPayloadType",
2272 optional,
2273 tag = "1",
2274 default = "ProtoOaVersionReq"
2275 )]
2276 pub payload_type: ::core::option::Option<i32>,
2277}
2278#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2279pub struct ProtoOaVersionRes {
2280 #[prost(
2281 enumeration = "ProtoOaPayloadType",
2282 optional,
2283 tag = "1",
2284 default = "ProtoOaVersionRes"
2285 )]
2286 pub payload_type: ::core::option::Option<i32>,
2287 #[prost(string, required, tag = "2")]
2288 pub version: ::prost::alloc::string::String,
2289}
2290#[derive(Clone, PartialEq, ::prost::Message)]
2291pub struct ProtoOaNewOrderReq {
2292 #[prost(
2293 enumeration = "ProtoOaPayloadType",
2294 optional,
2295 tag = "1",
2296 default = "ProtoOaNewOrderReq"
2297 )]
2298 pub payload_type: ::core::option::Option<i32>,
2299 #[prost(int64, required, tag = "2")]
2300 pub ctid_trader_account_id: i64,
2301 #[prost(int64, required, tag = "3")]
2302 pub symbol_id: i64,
2303 #[prost(enumeration = "ProtoOaOrderType", required, tag = "4")]
2304 pub order_type: i32,
2305 #[prost(enumeration = "ProtoOaTradeSide", required, tag = "5")]
2306 pub trade_side: i32,
2307 #[prost(int64, required, tag = "6")]
2308 pub volume: i64,
2309 #[prost(double, optional, tag = "7")]
2310 pub limit_price: ::core::option::Option<f64>,
2311 #[prost(double, optional, tag = "8")]
2312 pub stop_price: ::core::option::Option<f64>,
2313 #[prost(
2314 enumeration = "ProtoOaTimeInForce",
2315 optional,
2316 tag = "9",
2317 default = "GoodTillCancel"
2318 )]
2319 pub time_in_force: ::core::option::Option<i32>,
2320 #[prost(int64, optional, tag = "10")]
2321 pub expiration_timestamp: ::core::option::Option<i64>,
2322 #[prost(double, optional, tag = "11")]
2323 pub stop_loss: ::core::option::Option<f64>,
2324 #[prost(double, optional, tag = "12")]
2325 pub take_profit: ::core::option::Option<f64>,
2326 #[prost(string, optional, tag = "13")]
2327 pub comment: ::core::option::Option<::prost::alloc::string::String>,
2328 #[prost(double, optional, tag = "14")]
2329 pub base_slippage_price: ::core::option::Option<f64>,
2330 #[prost(int32, optional, tag = "15")]
2331 pub slippage_in_points: ::core::option::Option<i32>,
2332 #[prost(string, optional, tag = "16")]
2333 pub label: ::core::option::Option<::prost::alloc::string::String>,
2334 #[prost(int64, optional, tag = "17")]
2335 pub position_id: ::core::option::Option<i64>,
2336 #[prost(string, optional, tag = "18")]
2337 pub client_order_id: ::core::option::Option<::prost::alloc::string::String>,
2338 #[prost(int64, optional, tag = "19")]
2339 pub relative_stop_loss: ::core::option::Option<i64>,
2340 #[prost(int64, optional, tag = "20")]
2341 pub relative_take_profit: ::core::option::Option<i64>,
2342 #[prost(bool, optional, tag = "21")]
2343 pub guaranteed_stop_loss: ::core::option::Option<bool>,
2344 #[prost(bool, optional, tag = "22")]
2345 pub trailing_stop_loss: ::core::option::Option<bool>,
2346 #[prost(
2347 enumeration = "ProtoOaOrderTriggerMethod",
2348 optional,
2349 tag = "23",
2350 default = "Trade"
2351 )]
2352 pub stop_trigger_method: ::core::option::Option<i32>,
2353}
2354#[derive(Clone, PartialEq, ::prost::Message)]
2355pub struct ProtoOaExecutionEvent {
2356 #[prost(
2357 enumeration = "ProtoOaPayloadType",
2358 optional,
2359 tag = "1",
2360 default = "ProtoOaExecutionEvent"
2361 )]
2362 pub payload_type: ::core::option::Option<i32>,
2363 #[prost(int64, required, tag = "2")]
2364 pub ctid_trader_account_id: i64,
2365 #[prost(enumeration = "ProtoOaExecutionType", required, tag = "3")]
2366 pub execution_type: i32,
2367 #[prost(message, optional, tag = "4")]
2368 pub position: ::core::option::Option<ProtoOaPosition>,
2369 #[prost(message, optional, tag = "5")]
2370 pub order: ::core::option::Option<ProtoOaOrder>,
2371 #[prost(message, optional, tag = "6")]
2372 pub deal: ::core::option::Option<ProtoOaDeal>,
2373 #[prost(message, optional, tag = "7")]
2374 pub bonus_deposit_withdraw: ::core::option::Option<ProtoOaBonusDepositWithdraw>,
2375 #[prost(message, optional, tag = "8")]
2376 pub deposit_withdraw: ::core::option::Option<ProtoOaDepositWithdraw>,
2377 #[prost(string, optional, tag = "9")]
2378 pub error_code: ::core::option::Option<::prost::alloc::string::String>,
2379 #[prost(bool, optional, tag = "10")]
2380 pub is_server_event: ::core::option::Option<bool>,
2381}
2382#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2383pub struct ProtoOaCancelOrderReq {
2384 #[prost(
2385 enumeration = "ProtoOaPayloadType",
2386 optional,
2387 tag = "1",
2388 default = "ProtoOaCancelOrderReq"
2389 )]
2390 pub payload_type: ::core::option::Option<i32>,
2391 #[prost(int64, required, tag = "2")]
2392 pub ctid_trader_account_id: i64,
2393 #[prost(int64, required, tag = "3")]
2394 pub order_id: i64,
2395}
2396#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2397pub struct ProtoOaAmendOrderReq {
2398 #[prost(
2399 enumeration = "ProtoOaPayloadType",
2400 optional,
2401 tag = "1",
2402 default = "ProtoOaAmendOrderReq"
2403 )]
2404 pub payload_type: ::core::option::Option<i32>,
2405 #[prost(int64, required, tag = "2")]
2406 pub ctid_trader_account_id: i64,
2407 #[prost(int64, required, tag = "3")]
2408 pub order_id: i64,
2409 #[prost(int64, optional, tag = "4")]
2410 pub volume: ::core::option::Option<i64>,
2411 #[prost(double, optional, tag = "5")]
2412 pub limit_price: ::core::option::Option<f64>,
2413 #[prost(double, optional, tag = "6")]
2414 pub stop_price: ::core::option::Option<f64>,
2415 #[prost(int64, optional, tag = "7")]
2416 pub expiration_timestamp: ::core::option::Option<i64>,
2417 #[prost(double, optional, tag = "8")]
2418 pub stop_loss: ::core::option::Option<f64>,
2419 #[prost(double, optional, tag = "9")]
2420 pub take_profit: ::core::option::Option<f64>,
2421 #[prost(int32, optional, tag = "10")]
2422 pub slippage_in_points: ::core::option::Option<i32>,
2423 #[prost(int64, optional, tag = "11")]
2424 pub relative_stop_loss: ::core::option::Option<i64>,
2425 #[prost(int64, optional, tag = "12")]
2426 pub relative_take_profit: ::core::option::Option<i64>,
2427 #[prost(bool, optional, tag = "13")]
2428 pub guaranteed_stop_loss: ::core::option::Option<bool>,
2429 #[prost(bool, optional, tag = "14")]
2430 pub trailing_stop_loss: ::core::option::Option<bool>,
2431 #[prost(
2432 enumeration = "ProtoOaOrderTriggerMethod",
2433 optional,
2434 tag = "15",
2435 default = "Trade"
2436 )]
2437 pub stop_trigger_method: ::core::option::Option<i32>,
2438}
2439#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2440pub struct ProtoOaAmendPositionSltpReq {
2441 #[prost(
2442 enumeration = "ProtoOaPayloadType",
2443 optional,
2444 tag = "1",
2445 default = "ProtoOaAmendPositionSltpReq"
2446 )]
2447 pub payload_type: ::core::option::Option<i32>,
2448 #[prost(int64, required, tag = "2")]
2449 pub ctid_trader_account_id: i64,
2450 #[prost(int64, required, tag = "3")]
2451 pub position_id: i64,
2452 #[prost(double, optional, tag = "4")]
2453 pub stop_loss: ::core::option::Option<f64>,
2454 #[prost(double, optional, tag = "5")]
2455 pub take_profit: ::core::option::Option<f64>,
2456 #[prost(bool, optional, tag = "7")]
2457 pub guaranteed_stop_loss: ::core::option::Option<bool>,
2458 #[prost(bool, optional, tag = "8")]
2459 pub trailing_stop_loss: ::core::option::Option<bool>,
2460 #[prost(
2461 enumeration = "ProtoOaOrderTriggerMethod",
2462 optional,
2463 tag = "9",
2464 default = "Trade"
2465 )]
2466 pub stop_loss_trigger_method: ::core::option::Option<i32>,
2467}
2468#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2469pub struct ProtoOaClosePositionReq {
2470 #[prost(
2471 enumeration = "ProtoOaPayloadType",
2472 optional,
2473 tag = "1",
2474 default = "ProtoOaClosePositionReq"
2475 )]
2476 pub payload_type: ::core::option::Option<i32>,
2477 #[prost(int64, required, tag = "2")]
2478 pub ctid_trader_account_id: i64,
2479 #[prost(int64, required, tag = "3")]
2480 pub position_id: i64,
2481 #[prost(int64, required, tag = "4")]
2482 pub volume: i64,
2483}
2484#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2485pub struct ProtoOaTrailingSlChangedEvent {
2486 #[prost(
2487 enumeration = "ProtoOaPayloadType",
2488 optional,
2489 tag = "1",
2490 default = "ProtoOaTrailingSlChangedEvent"
2491 )]
2492 pub payload_type: ::core::option::Option<i32>,
2493 #[prost(int64, required, tag = "2")]
2494 pub ctid_trader_account_id: i64,
2495 #[prost(int64, required, tag = "3")]
2496 pub position_id: i64,
2497 #[prost(int64, required, tag = "4")]
2498 pub order_id: i64,
2499 #[prost(double, required, tag = "5")]
2500 pub stop_price: f64,
2501 #[prost(int64, required, tag = "6")]
2502 pub utc_last_update_timestamp: i64,
2503}
2504#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2505pub struct ProtoOaAssetListReq {
2506 #[prost(
2507 enumeration = "ProtoOaPayloadType",
2508 optional,
2509 tag = "1",
2510 default = "ProtoOaAssetListReq"
2511 )]
2512 pub payload_type: ::core::option::Option<i32>,
2513 #[prost(int64, required, tag = "2")]
2514 pub ctid_trader_account_id: i64,
2515}
2516#[derive(Clone, PartialEq, ::prost::Message)]
2517pub struct ProtoOaAssetListRes {
2518 #[prost(
2519 enumeration = "ProtoOaPayloadType",
2520 optional,
2521 tag = "1",
2522 default = "ProtoOaAssetListRes"
2523 )]
2524 pub payload_type: ::core::option::Option<i32>,
2525 #[prost(int64, required, tag = "2")]
2526 pub ctid_trader_account_id: i64,
2527 #[prost(message, repeated, tag = "3")]
2528 pub asset: ::prost::alloc::vec::Vec<ProtoOaAsset>,
2529}
2530#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2531pub struct ProtoOaSymbolsListReq {
2532 #[prost(
2533 enumeration = "ProtoOaPayloadType",
2534 optional,
2535 tag = "1",
2536 default = "ProtoOaSymbolsListReq"
2537 )]
2538 pub payload_type: ::core::option::Option<i32>,
2539 #[prost(int64, required, tag = "2")]
2540 pub ctid_trader_account_id: i64,
2541 #[prost(bool, optional, tag = "3", default = "false")]
2542 pub include_archived_symbols: ::core::option::Option<bool>,
2543}
2544#[derive(Clone, PartialEq, ::prost::Message)]
2545pub struct ProtoOaSymbolsListRes {
2546 #[prost(
2547 enumeration = "ProtoOaPayloadType",
2548 optional,
2549 tag = "1",
2550 default = "ProtoOaSymbolsListRes"
2551 )]
2552 pub payload_type: ::core::option::Option<i32>,
2553 #[prost(int64, required, tag = "2")]
2554 pub ctid_trader_account_id: i64,
2555 #[prost(message, repeated, tag = "3")]
2556 pub symbol: ::prost::alloc::vec::Vec<ProtoOaLightSymbol>,
2557 #[prost(message, repeated, tag = "4")]
2558 pub archived_symbol: ::prost::alloc::vec::Vec<ProtoOaArchivedSymbol>,
2559}
2560#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2561pub struct ProtoOaSymbolByIdReq {
2562 #[prost(
2563 enumeration = "ProtoOaPayloadType",
2564 optional,
2565 tag = "1",
2566 default = "ProtoOaSymbolByIdReq"
2567 )]
2568 pub payload_type: ::core::option::Option<i32>,
2569 #[prost(int64, required, tag = "2")]
2570 pub ctid_trader_account_id: i64,
2571 #[prost(int64, repeated, packed = "false", tag = "3")]
2572 pub symbol_id: ::prost::alloc::vec::Vec<i64>,
2573}
2574#[derive(Clone, PartialEq, ::prost::Message)]
2575pub struct ProtoOaSymbolByIdRes {
2576 #[prost(
2577 enumeration = "ProtoOaPayloadType",
2578 optional,
2579 tag = "1",
2580 default = "ProtoOaSymbolByIdRes"
2581 )]
2582 pub payload_type: ::core::option::Option<i32>,
2583 #[prost(int64, required, tag = "2")]
2584 pub ctid_trader_account_id: i64,
2585 #[prost(message, repeated, tag = "3")]
2586 pub symbol: ::prost::alloc::vec::Vec<ProtoOaSymbol>,
2587 #[prost(message, repeated, tag = "4")]
2588 pub archived_symbol: ::prost::alloc::vec::Vec<ProtoOaArchivedSymbol>,
2589}
2590#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2591pub struct ProtoOaSymbolsForConversionReq {
2592 #[prost(
2593 enumeration = "ProtoOaPayloadType",
2594 optional,
2595 tag = "1",
2596 default = "ProtoOaSymbolsForConversionReq"
2597 )]
2598 pub payload_type: ::core::option::Option<i32>,
2599 #[prost(int64, required, tag = "2")]
2600 pub ctid_trader_account_id: i64,
2601 #[prost(int64, required, tag = "3")]
2602 pub first_asset_id: i64,
2603 #[prost(int64, required, tag = "4")]
2604 pub last_asset_id: i64,
2605}
2606#[derive(Clone, PartialEq, ::prost::Message)]
2607pub struct ProtoOaSymbolsForConversionRes {
2608 #[prost(
2609 enumeration = "ProtoOaPayloadType",
2610 optional,
2611 tag = "1",
2612 default = "ProtoOaSymbolsForConversionRes"
2613 )]
2614 pub payload_type: ::core::option::Option<i32>,
2615 #[prost(int64, required, tag = "2")]
2616 pub ctid_trader_account_id: i64,
2617 #[prost(message, repeated, tag = "3")]
2618 pub symbol: ::prost::alloc::vec::Vec<ProtoOaLightSymbol>,
2619}
2620#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2621pub struct ProtoOaSymbolChangedEvent {
2622 #[prost(
2623 enumeration = "ProtoOaPayloadType",
2624 optional,
2625 tag = "1",
2626 default = "ProtoOaSymbolChangedEvent"
2627 )]
2628 pub payload_type: ::core::option::Option<i32>,
2629 #[prost(int64, required, tag = "2")]
2630 pub ctid_trader_account_id: i64,
2631 #[prost(int64, repeated, packed = "false", tag = "3")]
2632 pub symbol_id: ::prost::alloc::vec::Vec<i64>,
2633}
2634#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2635pub struct ProtoOaAssetClassListReq {
2636 #[prost(
2637 enumeration = "ProtoOaPayloadType",
2638 optional,
2639 tag = "1",
2640 default = "ProtoOaAssetClassListReq"
2641 )]
2642 pub payload_type: ::core::option::Option<i32>,
2643 #[prost(int64, required, tag = "2")]
2644 pub ctid_trader_account_id: i64,
2645}
2646#[derive(Clone, PartialEq, ::prost::Message)]
2647pub struct ProtoOaAssetClassListRes {
2648 #[prost(
2649 enumeration = "ProtoOaPayloadType",
2650 optional,
2651 tag = "1",
2652 default = "ProtoOaAssetClassListRes"
2653 )]
2654 pub payload_type: ::core::option::Option<i32>,
2655 #[prost(int64, required, tag = "2")]
2656 pub ctid_trader_account_id: i64,
2657 #[prost(message, repeated, tag = "3")]
2658 pub asset_class: ::prost::alloc::vec::Vec<ProtoOaAssetClass>,
2659}
2660#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2661pub struct ProtoOaTraderReq {
2662 #[prost(
2663 enumeration = "ProtoOaPayloadType",
2664 optional,
2665 tag = "1",
2666 default = "ProtoOaTraderReq"
2667 )]
2668 pub payload_type: ::core::option::Option<i32>,
2669 #[prost(int64, required, tag = "2")]
2670 pub ctid_trader_account_id: i64,
2671}
2672#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2673pub struct ProtoOaTraderRes {
2674 #[prost(
2675 enumeration = "ProtoOaPayloadType",
2676 optional,
2677 tag = "1",
2678 default = "ProtoOaTraderRes"
2679 )]
2680 pub payload_type: ::core::option::Option<i32>,
2681 #[prost(int64, required, tag = "2")]
2682 pub ctid_trader_account_id: i64,
2683 #[prost(message, required, tag = "3")]
2684 pub trader: ProtoOaTrader,
2685}
2686#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2687pub struct ProtoOaTraderUpdatedEvent {
2688 #[prost(
2689 enumeration = "ProtoOaPayloadType",
2690 optional,
2691 tag = "1",
2692 default = "ProtoOaTraderUpdateEvent"
2693 )]
2694 pub payload_type: ::core::option::Option<i32>,
2695 #[prost(int64, required, tag = "2")]
2696 pub ctid_trader_account_id: i64,
2697 #[prost(message, required, tag = "3")]
2698 pub trader: ProtoOaTrader,
2699}
2700#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2701pub struct ProtoOaReconcileReq {
2702 #[prost(
2703 enumeration = "ProtoOaPayloadType",
2704 optional,
2705 tag = "1",
2706 default = "ProtoOaReconcileReq"
2707 )]
2708 pub payload_type: ::core::option::Option<i32>,
2709 #[prost(int64, required, tag = "2")]
2710 pub ctid_trader_account_id: i64,
2711 #[prost(bool, optional, tag = "3")]
2712 pub return_protection_orders: ::core::option::Option<bool>,
2713}
2714#[derive(Clone, PartialEq, ::prost::Message)]
2715pub struct ProtoOaReconcileRes {
2716 #[prost(
2717 enumeration = "ProtoOaPayloadType",
2718 optional,
2719 tag = "1",
2720 default = "ProtoOaReconcileRes"
2721 )]
2722 pub payload_type: ::core::option::Option<i32>,
2723 #[prost(int64, required, tag = "2")]
2724 pub ctid_trader_account_id: i64,
2725 #[prost(message, repeated, tag = "3")]
2726 pub position: ::prost::alloc::vec::Vec<ProtoOaPosition>,
2727 #[prost(message, repeated, tag = "4")]
2728 pub order: ::prost::alloc::vec::Vec<ProtoOaOrder>,
2729}
2730#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2731pub struct ProtoOaOrderErrorEvent {
2732 #[prost(
2733 enumeration = "ProtoOaPayloadType",
2734 optional,
2735 tag = "1",
2736 default = "ProtoOaOrderErrorEvent"
2737 )]
2738 pub payload_type: ::core::option::Option<i32>,
2739 #[prost(int64, required, tag = "5")]
2740 pub ctid_trader_account_id: i64,
2741 #[prost(string, required, tag = "2")]
2742 pub error_code: ::prost::alloc::string::String,
2743 #[prost(int64, optional, tag = "3")]
2744 pub order_id: ::core::option::Option<i64>,
2745 #[prost(int64, optional, tag = "6")]
2746 pub position_id: ::core::option::Option<i64>,
2747 #[prost(string, optional, tag = "7")]
2748 pub description: ::core::option::Option<::prost::alloc::string::String>,
2749}
2750#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2751pub struct ProtoOaDealListReq {
2752 #[prost(
2753 enumeration = "ProtoOaPayloadType",
2754 optional,
2755 tag = "1",
2756 default = "ProtoOaDealListReq"
2757 )]
2758 pub payload_type: ::core::option::Option<i32>,
2759 #[prost(int64, required, tag = "2")]
2760 pub ctid_trader_account_id: i64,
2761 #[prost(int64, required, tag = "3")]
2762 pub from_timestamp: i64,
2763 #[prost(int64, required, tag = "4")]
2764 pub to_timestamp: i64,
2765 #[prost(int32, optional, tag = "5")]
2766 pub max_rows: ::core::option::Option<i32>,
2767}
2768#[derive(Clone, PartialEq, ::prost::Message)]
2769pub struct ProtoOaDealListRes {
2770 #[prost(
2771 enumeration = "ProtoOaPayloadType",
2772 optional,
2773 tag = "1",
2774 default = "ProtoOaDealListRes"
2775 )]
2776 pub payload_type: ::core::option::Option<i32>,
2777 #[prost(int64, required, tag = "2")]
2778 pub ctid_trader_account_id: i64,
2779 #[prost(message, repeated, tag = "3")]
2780 pub deal: ::prost::alloc::vec::Vec<ProtoOaDeal>,
2781 #[prost(bool, required, tag = "4")]
2782 pub has_more: bool,
2783}
2784#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2785pub struct ProtoOaOrderListReq {
2786 #[prost(
2787 enumeration = "ProtoOaPayloadType",
2788 optional,
2789 tag = "1",
2790 default = "ProtoOaOrderListReq"
2791 )]
2792 pub payload_type: ::core::option::Option<i32>,
2793 #[prost(int64, required, tag = "2")]
2794 pub ctid_trader_account_id: i64,
2795 #[prost(int64, required, tag = "3")]
2796 pub from_timestamp: i64,
2797 #[prost(int64, required, tag = "4")]
2798 pub to_timestamp: i64,
2799}
2800#[derive(Clone, PartialEq, ::prost::Message)]
2801pub struct ProtoOaOrderListRes {
2802 #[prost(
2803 enumeration = "ProtoOaPayloadType",
2804 optional,
2805 tag = "1",
2806 default = "ProtoOaOrderListRes"
2807 )]
2808 pub payload_type: ::core::option::Option<i32>,
2809 #[prost(int64, required, tag = "2")]
2810 pub ctid_trader_account_id: i64,
2811 #[prost(message, repeated, tag = "3")]
2812 pub order: ::prost::alloc::vec::Vec<ProtoOaOrder>,
2813 #[prost(bool, required, tag = "4")]
2814 pub has_more: bool,
2815}
2816#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2817pub struct ProtoOaExpectedMarginReq {
2818 #[prost(
2819 enumeration = "ProtoOaPayloadType",
2820 optional,
2821 tag = "1",
2822 default = "ProtoOaExpectedMarginReq"
2823 )]
2824 pub payload_type: ::core::option::Option<i32>,
2825 #[prost(int64, required, tag = "2")]
2826 pub ctid_trader_account_id: i64,
2827 #[prost(int64, required, tag = "3")]
2828 pub symbol_id: i64,
2829 #[prost(int64, repeated, packed = "false", tag = "4")]
2830 pub volume: ::prost::alloc::vec::Vec<i64>,
2831}
2832#[derive(Clone, PartialEq, ::prost::Message)]
2833pub struct ProtoOaExpectedMarginRes {
2834 #[prost(
2835 enumeration = "ProtoOaPayloadType",
2836 optional,
2837 tag = "1",
2838 default = "ProtoOaExpectedMarginRes"
2839 )]
2840 pub payload_type: ::core::option::Option<i32>,
2841 #[prost(int64, required, tag = "2")]
2842 pub ctid_trader_account_id: i64,
2843 #[prost(message, repeated, tag = "3")]
2844 pub margin: ::prost::alloc::vec::Vec<ProtoOaExpectedMargin>,
2845 #[prost(uint32, optional, tag = "4")]
2846 pub money_digits: ::core::option::Option<u32>,
2847}
2848#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2849pub struct ProtoOaMarginChangedEvent {
2850 #[prost(
2851 enumeration = "ProtoOaPayloadType",
2852 optional,
2853 tag = "1",
2854 default = "ProtoOaMarginChangedEvent"
2855 )]
2856 pub payload_type: ::core::option::Option<i32>,
2857 #[prost(int64, required, tag = "2")]
2858 pub ctid_trader_account_id: i64,
2859 #[prost(uint64, required, tag = "3")]
2860 pub position_id: u64,
2861 #[prost(uint64, required, tag = "4")]
2862 pub used_margin: u64,
2863 #[prost(uint32, optional, tag = "5")]
2864 pub money_digits: ::core::option::Option<u32>,
2865}
2866#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2867pub struct ProtoOaCashFlowHistoryListReq {
2868 #[prost(
2869 enumeration = "ProtoOaPayloadType",
2870 optional,
2871 tag = "1",
2872 default = "ProtoOaCashFlowHistoryListReq"
2873 )]
2874 pub payload_type: ::core::option::Option<i32>,
2875 #[prost(int64, required, tag = "2")]
2876 pub ctid_trader_account_id: i64,
2877 #[prost(int64, required, tag = "3")]
2878 pub from_timestamp: i64,
2879 #[prost(int64, required, tag = "4")]
2880 pub to_timestamp: i64,
2881}
2882#[derive(Clone, PartialEq, ::prost::Message)]
2883pub struct ProtoOaCashFlowHistoryListRes {
2884 #[prost(
2885 enumeration = "ProtoOaPayloadType",
2886 optional,
2887 tag = "1",
2888 default = "ProtoOaCashFlowHistoryListRes"
2889 )]
2890 pub payload_type: ::core::option::Option<i32>,
2891 #[prost(int64, required, tag = "2")]
2892 pub ctid_trader_account_id: i64,
2893 #[prost(message, repeated, tag = "3")]
2894 pub deposit_withdraw: ::prost::alloc::vec::Vec<ProtoOaDepositWithdraw>,
2895}
2896#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2897pub struct ProtoOaGetAccountListByAccessTokenReq {
2898 #[prost(
2899 enumeration = "ProtoOaPayloadType",
2900 optional,
2901 tag = "1",
2902 default = "ProtoOaGetAccountsByAccessTokenReq"
2903 )]
2904 pub payload_type: ::core::option::Option<i32>,
2905 #[prost(string, required, tag = "2")]
2906 pub access_token: ::prost::alloc::string::String,
2907}
2908#[derive(Clone, PartialEq, ::prost::Message)]
2909pub struct ProtoOaGetAccountListByAccessTokenRes {
2910 #[prost(
2911 enumeration = "ProtoOaPayloadType",
2912 optional,
2913 tag = "1",
2914 default = "ProtoOaGetAccountsByAccessTokenRes"
2915 )]
2916 pub payload_type: ::core::option::Option<i32>,
2917 #[prost(string, required, tag = "2")]
2918 pub access_token: ::prost::alloc::string::String,
2919 #[prost(enumeration = "ProtoOaClientPermissionScope", optional, tag = "3")]
2920 pub permission_scope: ::core::option::Option<i32>,
2921 #[prost(message, repeated, tag = "4")]
2922 pub ctid_trader_account: ::prost::alloc::vec::Vec<ProtoOaCtidTraderAccount>,
2923}
2924#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2925pub struct ProtoOaRefreshTokenReq {
2926 #[prost(
2927 enumeration = "ProtoOaPayloadType",
2928 optional,
2929 tag = "1",
2930 default = "ProtoOaRefreshTokenReq"
2931 )]
2932 pub payload_type: ::core::option::Option<i32>,
2933 #[prost(string, required, tag = "2")]
2934 pub refresh_token: ::prost::alloc::string::String,
2935}
2936#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2937pub struct ProtoOaRefreshTokenRes {
2938 #[prost(
2939 enumeration = "ProtoOaPayloadType",
2940 optional,
2941 tag = "1",
2942 default = "ProtoOaRefreshTokenRes"
2943 )]
2944 pub payload_type: ::core::option::Option<i32>,
2945 #[prost(string, required, tag = "2")]
2946 pub access_token: ::prost::alloc::string::String,
2947 #[prost(string, required, tag = "3")]
2948 pub token_type: ::prost::alloc::string::String,
2949 #[prost(int64, required, tag = "4")]
2950 pub expires_in: i64,
2951 #[prost(string, required, tag = "5")]
2952 pub refresh_token: ::prost::alloc::string::String,
2953}
2954#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2955pub struct ProtoOaSubscribeSpotsReq {
2956 #[prost(
2957 enumeration = "ProtoOaPayloadType",
2958 optional,
2959 tag = "1",
2960 default = "ProtoOaSubscribeSpotsReq"
2961 )]
2962 pub payload_type: ::core::option::Option<i32>,
2963 #[prost(int64, required, tag = "2")]
2964 pub ctid_trader_account_id: i64,
2965 #[prost(int64, repeated, packed = "false", tag = "3")]
2966 pub symbol_id: ::prost::alloc::vec::Vec<i64>,
2967 #[prost(bool, optional, tag = "4")]
2968 pub subscribe_to_spot_timestamp: ::core::option::Option<bool>,
2969}
2970#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2971pub struct ProtoOaSubscribeSpotsRes {
2972 #[prost(
2973 enumeration = "ProtoOaPayloadType",
2974 optional,
2975 tag = "1",
2976 default = "ProtoOaSubscribeSpotsRes"
2977 )]
2978 pub payload_type: ::core::option::Option<i32>,
2979 #[prost(int64, required, tag = "2")]
2980 pub ctid_trader_account_id: i64,
2981}
2982#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2983pub struct ProtoOaUnsubscribeSpotsReq {
2984 #[prost(
2985 enumeration = "ProtoOaPayloadType",
2986 optional,
2987 tag = "1",
2988 default = "ProtoOaUnsubscribeSpotsReq"
2989 )]
2990 pub payload_type: ::core::option::Option<i32>,
2991 #[prost(int64, required, tag = "2")]
2992 pub ctid_trader_account_id: i64,
2993 #[prost(int64, repeated, packed = "false", tag = "3")]
2994 pub symbol_id: ::prost::alloc::vec::Vec<i64>,
2995}
2996#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2997pub struct ProtoOaUnsubscribeSpotsRes {
2998 #[prost(
2999 enumeration = "ProtoOaPayloadType",
3000 optional,
3001 tag = "1",
3002 default = "ProtoOaUnsubscribeSpotsRes"
3003 )]
3004 pub payload_type: ::core::option::Option<i32>,
3005 #[prost(int64, required, tag = "2")]
3006 pub ctid_trader_account_id: i64,
3007}
3008#[derive(Clone, PartialEq, ::prost::Message)]
3009pub struct ProtoOaSpotEvent {
3010 #[prost(
3011 enumeration = "ProtoOaPayloadType",
3012 optional,
3013 tag = "1",
3014 default = "ProtoOaSpotEvent"
3015 )]
3016 pub payload_type: ::core::option::Option<i32>,
3017 #[prost(int64, required, tag = "2")]
3018 pub ctid_trader_account_id: i64,
3019 #[prost(int64, required, tag = "3")]
3020 pub symbol_id: i64,
3021 #[prost(uint64, optional, tag = "4")]
3022 pub bid: ::core::option::Option<u64>,
3023 #[prost(uint64, optional, tag = "5")]
3024 pub ask: ::core::option::Option<u64>,
3025 #[prost(message, repeated, tag = "6")]
3026 pub trendbar: ::prost::alloc::vec::Vec<ProtoOaTrendbar>,
3027 #[prost(uint64, optional, tag = "7")]
3028 pub session_close: ::core::option::Option<u64>,
3029 #[prost(int64, optional, tag = "8")]
3030 pub timestamp: ::core::option::Option<i64>,
3031}
3032#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3033pub struct ProtoOaSubscribeLiveTrendbarReq {
3034 #[prost(
3035 enumeration = "ProtoOaPayloadType",
3036 optional,
3037 tag = "1",
3038 default = "ProtoOaSubscribeLiveTrendbarReq"
3039 )]
3040 pub payload_type: ::core::option::Option<i32>,
3041 #[prost(int64, required, tag = "2")]
3042 pub ctid_trader_account_id: i64,
3043 #[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "3")]
3044 pub period: i32,
3045 #[prost(int64, required, tag = "4")]
3046 pub symbol_id: i64,
3047}
3048#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3049pub struct ProtoOaSubscribeLiveTrendbarRes {
3050 #[prost(
3051 enumeration = "ProtoOaPayloadType",
3052 optional,
3053 tag = "1",
3054 default = "ProtoOaSubscribeLiveTrendbarRes"
3055 )]
3056 pub payload_type: ::core::option::Option<i32>,
3057 #[prost(int64, required, tag = "2")]
3058 pub ctid_trader_account_id: i64,
3059}
3060#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3061pub struct ProtoOaUnsubscribeLiveTrendbarReq {
3062 #[prost(
3063 enumeration = "ProtoOaPayloadType",
3064 optional,
3065 tag = "1",
3066 default = "ProtoOaUnsubscribeLiveTrendbarReq"
3067 )]
3068 pub payload_type: ::core::option::Option<i32>,
3069 #[prost(int64, required, tag = "2")]
3070 pub ctid_trader_account_id: i64,
3071 #[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "3")]
3072 pub period: i32,
3073 #[prost(int64, required, tag = "4")]
3074 pub symbol_id: i64,
3075}
3076#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3077pub struct ProtoOaUnsubscribeLiveTrendbarRes {
3078 #[prost(
3079 enumeration = "ProtoOaPayloadType",
3080 optional,
3081 tag = "1",
3082 default = "ProtoOaUnsubscribeLiveTrendbarRes"
3083 )]
3084 pub payload_type: ::core::option::Option<i32>,
3085 #[prost(int64, required, tag = "2")]
3086 pub ctid_trader_account_id: i64,
3087}
3088#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3089pub struct ProtoOaGetTrendbarsReq {
3090 #[prost(
3091 enumeration = "ProtoOaPayloadType",
3092 optional,
3093 tag = "1",
3094 default = "ProtoOaGetTrendbarsReq"
3095 )]
3096 pub payload_type: ::core::option::Option<i32>,
3097 #[prost(int64, required, tag = "2")]
3098 pub ctid_trader_account_id: i64,
3099 #[prost(int64, required, tag = "3")]
3100 pub from_timestamp: i64,
3101 #[prost(int64, required, tag = "4")]
3102 pub to_timestamp: i64,
3103 #[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "5")]
3104 pub period: i32,
3105 #[prost(int64, required, tag = "6")]
3106 pub symbol_id: i64,
3107 #[prost(uint32, optional, tag = "7")]
3108 pub count: ::core::option::Option<u32>,
3109}
3110#[derive(Clone, PartialEq, ::prost::Message)]
3111pub struct ProtoOaGetTrendbarsRes {
3112 #[prost(
3113 enumeration = "ProtoOaPayloadType",
3114 optional,
3115 tag = "1",
3116 default = "ProtoOaGetTrendbarsRes"
3117 )]
3118 pub payload_type: ::core::option::Option<i32>,
3119 #[prost(int64, required, tag = "2")]
3120 pub ctid_trader_account_id: i64,
3121 #[prost(enumeration = "ProtoOaTrendbarPeriod", required, tag = "3")]
3122 pub period: i32,
3123 #[prost(int64, required, tag = "4")]
3124 pub timestamp: i64,
3125 #[prost(message, repeated, tag = "5")]
3126 pub trendbar: ::prost::alloc::vec::Vec<ProtoOaTrendbar>,
3127 #[prost(int64, optional, tag = "6")]
3128 pub symbol_id: ::core::option::Option<i64>,
3129}
3130#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3131pub struct ProtoOaGetTickDataReq {
3132 #[prost(
3133 enumeration = "ProtoOaPayloadType",
3134 optional,
3135 tag = "1",
3136 default = "ProtoOaGetTickdataReq"
3137 )]
3138 pub payload_type: ::core::option::Option<i32>,
3139 #[prost(int64, required, tag = "2")]
3140 pub ctid_trader_account_id: i64,
3141 #[prost(int64, required, tag = "3")]
3142 pub symbol_id: i64,
3143 #[prost(enumeration = "ProtoOaQuoteType", required, tag = "4")]
3144 pub r#type: i32,
3145 #[prost(int64, required, tag = "5")]
3146 pub from_timestamp: i64,
3147 #[prost(int64, required, tag = "6")]
3148 pub to_timestamp: i64,
3149}
3150#[derive(Clone, PartialEq, ::prost::Message)]
3151pub struct ProtoOaGetTickDataRes {
3152 #[prost(
3153 enumeration = "ProtoOaPayloadType",
3154 optional,
3155 tag = "1",
3156 default = "ProtoOaGetTickdataRes"
3157 )]
3158 pub payload_type: ::core::option::Option<i32>,
3159 #[prost(int64, required, tag = "2")]
3160 pub ctid_trader_account_id: i64,
3161 #[prost(message, repeated, tag = "3")]
3162 pub tick_data: ::prost::alloc::vec::Vec<ProtoOaTickData>,
3163 #[prost(bool, required, tag = "4")]
3164 pub has_more: bool,
3165}
3166#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3167pub struct ProtoOaGetCtidProfileByTokenReq {
3168 #[prost(
3169 enumeration = "ProtoOaPayloadType",
3170 optional,
3171 tag = "1",
3172 default = "ProtoOaGetCtidProfileByTokenReq"
3173 )]
3174 pub payload_type: ::core::option::Option<i32>,
3175 #[prost(string, required, tag = "2")]
3176 pub access_token: ::prost::alloc::string::String,
3177}
3178#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3179pub struct ProtoOaGetCtidProfileByTokenRes {
3180 #[prost(
3181 enumeration = "ProtoOaPayloadType",
3182 optional,
3183 tag = "1",
3184 default = "ProtoOaGetCtidProfileByTokenRes"
3185 )]
3186 pub payload_type: ::core::option::Option<i32>,
3187 #[prost(message, required, tag = "2")]
3188 pub profile: ProtoOaCtidProfile,
3189}
3190#[derive(Clone, PartialEq, ::prost::Message)]
3191pub struct ProtoOaDepthEvent {
3192 #[prost(
3193 enumeration = "ProtoOaPayloadType",
3194 optional,
3195 tag = "1",
3196 default = "ProtoOaDepthEvent"
3197 )]
3198 pub payload_type: ::core::option::Option<i32>,
3199 #[prost(int64, required, tag = "2")]
3200 pub ctid_trader_account_id: i64,
3201 #[prost(uint64, required, tag = "3")]
3202 pub symbol_id: u64,
3203 #[prost(message, repeated, tag = "4")]
3204 pub new_quotes: ::prost::alloc::vec::Vec<ProtoOaDepthQuote>,
3205 #[prost(uint64, repeated, tag = "5")]
3206 pub deleted_quotes: ::prost::alloc::vec::Vec<u64>,
3207}
3208#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3209pub struct ProtoOaSubscribeDepthQuotesReq {
3210 #[prost(
3211 enumeration = "ProtoOaPayloadType",
3212 optional,
3213 tag = "1",
3214 default = "ProtoOaSubscribeDepthQuotesReq"
3215 )]
3216 pub payload_type: ::core::option::Option<i32>,
3217 #[prost(int64, required, tag = "2")]
3218 pub ctid_trader_account_id: i64,
3219 #[prost(int64, repeated, packed = "false", tag = "3")]
3220 pub symbol_id: ::prost::alloc::vec::Vec<i64>,
3221}
3222#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3223pub struct ProtoOaSubscribeDepthQuotesRes {
3224 #[prost(
3225 enumeration = "ProtoOaPayloadType",
3226 optional,
3227 tag = "1",
3228 default = "ProtoOaSubscribeDepthQuotesRes"
3229 )]
3230 pub payload_type: ::core::option::Option<i32>,
3231 #[prost(int64, required, tag = "2")]
3232 pub ctid_trader_account_id: i64,
3233}
3234#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3235pub struct ProtoOaUnsubscribeDepthQuotesReq {
3236 #[prost(
3237 enumeration = "ProtoOaPayloadType",
3238 optional,
3239 tag = "1",
3240 default = "ProtoOaUnsubscribeDepthQuotesReq"
3241 )]
3242 pub payload_type: ::core::option::Option<i32>,
3243 #[prost(int64, required, tag = "2")]
3244 pub ctid_trader_account_id: i64,
3245 #[prost(int64, repeated, packed = "false", tag = "3")]
3246 pub symbol_id: ::prost::alloc::vec::Vec<i64>,
3247}
3248#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3249pub struct ProtoOaUnsubscribeDepthQuotesRes {
3250 #[prost(
3251 enumeration = "ProtoOaPayloadType",
3252 optional,
3253 tag = "1",
3254 default = "ProtoOaUnsubscribeDepthQuotesRes"
3255 )]
3256 pub payload_type: ::core::option::Option<i32>,
3257 #[prost(int64, required, tag = "2")]
3258 pub ctid_trader_account_id: i64,
3259}
3260#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3261pub struct ProtoOaSymbolCategoryListReq {
3262 #[prost(
3263 enumeration = "ProtoOaPayloadType",
3264 optional,
3265 tag = "1",
3266 default = "ProtoOaSymbolCategoryReq"
3267 )]
3268 pub payload_type: ::core::option::Option<i32>,
3269 #[prost(int64, required, tag = "2")]
3270 pub ctid_trader_account_id: i64,
3271}
3272#[derive(Clone, PartialEq, ::prost::Message)]
3273pub struct ProtoOaSymbolCategoryListRes {
3274 #[prost(
3275 enumeration = "ProtoOaPayloadType",
3276 optional,
3277 tag = "1",
3278 default = "ProtoOaSymbolCategoryRes"
3279 )]
3280 pub payload_type: ::core::option::Option<i32>,
3281 #[prost(int64, required, tag = "2")]
3282 pub ctid_trader_account_id: i64,
3283 #[prost(message, repeated, tag = "3")]
3284 pub symbol_category: ::prost::alloc::vec::Vec<ProtoOaSymbolCategory>,
3285}
3286#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3287pub struct ProtoOaAccountLogoutReq {
3288 #[prost(
3289 enumeration = "ProtoOaPayloadType",
3290 optional,
3291 tag = "1",
3292 default = "ProtoOaAccountLogoutReq"
3293 )]
3294 pub payload_type: ::core::option::Option<i32>,
3295 #[prost(int64, required, tag = "2")]
3296 pub ctid_trader_account_id: i64,
3297}
3298#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3299pub struct ProtoOaAccountLogoutRes {
3300 #[prost(
3301 enumeration = "ProtoOaPayloadType",
3302 optional,
3303 tag = "1",
3304 default = "ProtoOaAccountLogoutRes"
3305 )]
3306 pub payload_type: ::core::option::Option<i32>,
3307 #[prost(int64, required, tag = "2")]
3308 pub ctid_trader_account_id: i64,
3309}
3310#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3311pub struct ProtoOaAccountDisconnectEvent {
3312 #[prost(
3313 enumeration = "ProtoOaPayloadType",
3314 optional,
3315 tag = "1",
3316 default = "ProtoOaAccountDisconnectEvent"
3317 )]
3318 pub payload_type: ::core::option::Option<i32>,
3319 #[prost(int64, required, tag = "2")]
3320 pub ctid_trader_account_id: i64,
3321}
3322#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3323pub struct ProtoOaMarginCallListReq {
3324 #[prost(
3325 enumeration = "ProtoOaPayloadType",
3326 optional,
3327 tag = "1",
3328 default = "ProtoOaMarginCallListReq"
3329 )]
3330 pub payload_type: ::core::option::Option<i32>,
3331 #[prost(int64, required, tag = "2")]
3332 pub ctid_trader_account_id: i64,
3333}
3334#[derive(Clone, PartialEq, ::prost::Message)]
3335pub struct ProtoOaMarginCallListRes {
3336 #[prost(
3337 enumeration = "ProtoOaPayloadType",
3338 optional,
3339 tag = "1",
3340 default = "ProtoOaMarginCallListRes"
3341 )]
3342 pub payload_type: ::core::option::Option<i32>,
3343 #[prost(message, repeated, tag = "2")]
3344 pub margin_call: ::prost::alloc::vec::Vec<ProtoOaMarginCall>,
3345}
3346#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3347pub struct ProtoOaMarginCallUpdateReq {
3348 #[prost(
3349 enumeration = "ProtoOaPayloadType",
3350 optional,
3351 tag = "1",
3352 default = "ProtoOaMarginCallUpdateReq"
3353 )]
3354 pub payload_type: ::core::option::Option<i32>,
3355 #[prost(int64, required, tag = "2")]
3356 pub ctid_trader_account_id: i64,
3357 #[prost(message, required, tag = "3")]
3358 pub margin_call: ProtoOaMarginCall,
3359}
3360#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3361pub struct ProtoOaMarginCallUpdateRes {
3362 #[prost(
3363 enumeration = "ProtoOaPayloadType",
3364 optional,
3365 tag = "1",
3366 default = "ProtoOaMarginCallUpdateRes"
3367 )]
3368 pub payload_type: ::core::option::Option<i32>,
3369}
3370#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3371pub struct ProtoOaMarginCallUpdateEvent {
3372 #[prost(
3373 enumeration = "ProtoOaPayloadType",
3374 optional,
3375 tag = "1",
3376 default = "ProtoOaMarginCallUpdateEvent"
3377 )]
3378 pub payload_type: ::core::option::Option<i32>,
3379 #[prost(int64, required, tag = "2")]
3380 pub ctid_trader_account_id: i64,
3381 #[prost(message, required, tag = "3")]
3382 pub margin_call: ProtoOaMarginCall,
3383}
3384#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3385pub struct ProtoOaMarginCallTriggerEvent {
3386 #[prost(
3387 enumeration = "ProtoOaPayloadType",
3388 optional,
3389 tag = "1",
3390 default = "ProtoOaMarginCallTriggerEvent"
3391 )]
3392 pub payload_type: ::core::option::Option<i32>,
3393 #[prost(int64, required, tag = "2")]
3394 pub ctid_trader_account_id: i64,
3395 #[prost(message, required, tag = "3")]
3396 pub margin_call: ProtoOaMarginCall,
3397}
3398#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3399pub struct ProtoOaGetDynamicLeverageByIdReq {
3400 #[prost(
3401 enumeration = "ProtoOaPayloadType",
3402 optional,
3403 tag = "1",
3404 default = "ProtoOaGetDynamicLeverageReq"
3405 )]
3406 pub payload_type: ::core::option::Option<i32>,
3407 #[prost(int64, required, tag = "2")]
3408 pub ctid_trader_account_id: i64,
3409 #[prost(int64, required, tag = "3")]
3410 pub leverage_id: i64,
3411}
3412#[derive(Clone, PartialEq, ::prost::Message)]
3413pub struct ProtoOaGetDynamicLeverageByIdRes {
3414 #[prost(
3415 enumeration = "ProtoOaPayloadType",
3416 optional,
3417 tag = "1",
3418 default = "ProtoOaGetDynamicLeverageRes"
3419 )]
3420 pub payload_type: ::core::option::Option<i32>,
3421 #[prost(int64, required, tag = "2")]
3422 pub ctid_trader_account_id: i64,
3423 #[prost(message, required, tag = "3")]
3424 pub leverage: ProtoOaDynamicLeverage,
3425}
3426#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3427pub struct ProtoOaDealListByPositionIdReq {
3428 #[prost(
3429 enumeration = "ProtoOaPayloadType",
3430 optional,
3431 tag = "1",
3432 default = "ProtoOaDealListByPositionIdReq"
3433 )]
3434 pub payload_type: ::core::option::Option<i32>,
3435 #[prost(int64, required, tag = "2")]
3436 pub ctid_trader_account_id: i64,
3437 #[prost(int64, required, tag = "3")]
3438 pub position_id: i64,
3439 #[prost(int64, required, tag = "4")]
3440 pub from_timestamp: i64,
3441 #[prost(int64, required, tag = "5")]
3442 pub to_timestamp: i64,
3443}
3444#[derive(Clone, PartialEq, ::prost::Message)]
3445pub struct ProtoOaDealListByPositionIdRes {
3446 #[prost(
3447 enumeration = "ProtoOaPayloadType",
3448 optional,
3449 tag = "1",
3450 default = "ProtoOaDealListByPositionIdRes"
3451 )]
3452 pub payload_type: ::core::option::Option<i32>,
3453 #[prost(int64, required, tag = "2")]
3454 pub ctid_trader_account_id: i64,
3455 #[prost(message, repeated, tag = "3")]
3456 pub deal: ::prost::alloc::vec::Vec<ProtoOaDeal>,
3457 #[prost(bool, required, tag = "4")]
3458 pub has_more: bool,
3459}
3460#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3461pub struct ProtoOaOrderDetailsReq {
3462 #[prost(
3463 enumeration = "ProtoOaPayloadType",
3464 optional,
3465 tag = "1",
3466 default = "ProtoOaOrderDetailsReq"
3467 )]
3468 pub payload_type: ::core::option::Option<i32>,
3469 #[prost(int64, required, tag = "2")]
3470 pub ctid_trader_account_id: i64,
3471 #[prost(int64, required, tag = "3")]
3472 pub order_id: i64,
3473}
3474#[derive(Clone, PartialEq, ::prost::Message)]
3475pub struct ProtoOaOrderDetailsRes {
3476 #[prost(
3477 enumeration = "ProtoOaPayloadType",
3478 optional,
3479 tag = "1",
3480 default = "ProtoOaOrderDetailsRes"
3481 )]
3482 pub payload_type: ::core::option::Option<i32>,
3483 #[prost(int64, required, tag = "2")]
3484 pub ctid_trader_account_id: i64,
3485 #[prost(message, required, tag = "3")]
3486 pub order: ProtoOaOrder,
3487 #[prost(message, repeated, tag = "4")]
3488 pub deal: ::prost::alloc::vec::Vec<ProtoOaDeal>,
3489}
3490#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3491pub struct ProtoOaOrderListByPositionIdReq {
3492 #[prost(
3493 enumeration = "ProtoOaPayloadType",
3494 optional,
3495 tag = "1",
3496 default = "ProtoOaOrderListByPositionIdReq"
3497 )]
3498 pub payload_type: ::core::option::Option<i32>,
3499 #[prost(int64, required, tag = "2")]
3500 pub ctid_trader_account_id: i64,
3501 #[prost(int64, required, tag = "3")]
3502 pub position_id: i64,
3503 #[prost(int64, required, tag = "4")]
3504 pub from_timestamp: i64,
3505 #[prost(int64, required, tag = "5")]
3506 pub to_timestamp: i64,
3507}
3508#[derive(Clone, PartialEq, ::prost::Message)]
3509pub struct ProtoOaOrderListByPositionIdRes {
3510 #[prost(
3511 enumeration = "ProtoOaPayloadType",
3512 optional,
3513 tag = "1",
3514 default = "ProtoOaOrderListByPositionIdRes"
3515 )]
3516 pub payload_type: ::core::option::Option<i32>,
3517 #[prost(int64, required, tag = "2")]
3518 pub ctid_trader_account_id: i64,
3519 #[prost(message, repeated, tag = "3")]
3520 pub order: ::prost::alloc::vec::Vec<ProtoOaOrder>,
3521 #[prost(bool, required, tag = "4")]
3522 pub has_more: bool,
3523}
3524#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3525pub struct ProtoOaDealOffsetListReq {
3526 #[prost(
3527 enumeration = "ProtoOaPayloadType",
3528 optional,
3529 tag = "1",
3530 default = "ProtoOaDealOffsetListReq"
3531 )]
3532 pub payload_type: ::core::option::Option<i32>,
3533 #[prost(int64, required, tag = "2")]
3534 pub ctid_trader_account_id: i64,
3535 #[prost(int64, required, tag = "3")]
3536 pub deal_id: i64,
3537}
3538#[derive(Clone, PartialEq, ::prost::Message)]
3539pub struct ProtoOaDealOffsetListRes {
3540 #[prost(
3541 enumeration = "ProtoOaPayloadType",
3542 optional,
3543 tag = "1",
3544 default = "ProtoOaDealOffsetListRes"
3545 )]
3546 pub payload_type: ::core::option::Option<i32>,
3547 #[prost(int64, required, tag = "2")]
3548 pub ctid_trader_account_id: i64,
3549 #[prost(message, repeated, tag = "3")]
3550 pub offset_by: ::prost::alloc::vec::Vec<ProtoOaDealOffset>,
3551 #[prost(message, repeated, tag = "4")]
3552 pub offsetting: ::prost::alloc::vec::Vec<ProtoOaDealOffset>,
3553}
3554#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3555pub struct ProtoOaGetPositionUnrealizedPnLReq {
3556 #[prost(
3557 enumeration = "ProtoOaPayloadType",
3558 optional,
3559 tag = "1",
3560 default = "ProtoOaGetPositionUnrealizedPnlReq"
3561 )]
3562 pub payload_type: ::core::option::Option<i32>,
3563 #[prost(int64, required, tag = "2")]
3564 pub ctid_trader_account_id: i64,
3565}
3566#[derive(Clone, PartialEq, ::prost::Message)]
3567pub struct ProtoOaGetPositionUnrealizedPnLRes {
3568 #[prost(
3569 enumeration = "ProtoOaPayloadType",
3570 optional,
3571 tag = "1",
3572 default = "ProtoOaGetPositionUnrealizedPnlRes"
3573 )]
3574 pub payload_type: ::core::option::Option<i32>,
3575 #[prost(int64, required, tag = "2")]
3576 pub ctid_trader_account_id: i64,
3577 #[prost(message, repeated, tag = "3")]
3578 pub position_unrealized_pn_l: ::prost::alloc::vec::Vec<ProtoOaPositionUnrealizedPnL>,
3579 #[prost(uint32, required, tag = "4")]
3580 pub money_digits: u32,
3581}