ib 3.0.0

A Rust client to the Interactive Brokers HTTP REST API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
/* 
 * Client Portal Web API
 *
 * Client Poral Web API
 *
 * OpenAPI spec version: 1.0.0
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */

/// OrderStatus : contains all the details of an order

#[allow(unused_imports)]
use serde_json::Value;

#[derive(Debug, Serialize, Deserialize)]
pub struct OrderStatus {
  /// account id
  #[serde(rename = "account")]
  account: Option<String>,
  #[serde(rename = "alert_active")]
  alert_active: Option<i32>,
  /// Returns true if contract supports duplicate/opposite side order.
  #[serde(rename = "allowed_duplicate_opposite")]
  allowed_duplicate_opposite: Option<bool>,
  /// List of available chart periods
  #[serde(rename = "available_chart_periods")]
  available_chart_periods: Option<String>,
  /// Background color in hex format
  #[serde(rename = "bg_color")]
  bg_color: Option<String>,
  /// If true not allowed to cancel order
  #[serde(rename = "cannot_cancel_order")]
  cannot_cancel_order: Option<bool>,
  /// type of the child order
  #[serde(rename = "child_order_type")]
  child_order_type: Option<String>,
  /// Contracts company name
  #[serde(rename = "company_name")]
  company_name: Option<String>,
  /// conid and exchange. Format supports conid or conid@exchange
  #[serde(rename = "conidex")]
  conidex: Option<String>,
  /// Format contract name
  #[serde(rename = "contract_description_1")]
  contract_description_1: Option<String>,
  /// Cumulative fill
  #[serde(rename = "cum_fill")]
  cum_fill: Option<String>,
  /// Contract traded currency
  #[serde(rename = "currency")]
  currency: Option<String>,
  /// If true order is de-activated
  #[serde(rename = "deactivate_order")]
  deactivate_order: Option<bool>,
  /// Fields that can be edited in escaped unicode characters
  #[serde(rename = "editable_fields")]
  editable_fields: Option<String>,
  /// Position description to display on chart
  #[serde(rename = "exit_strategy_chart_description")]
  exit_strategy_chart_description: Option<String>,
  /// Position display price
  #[serde(rename = "exit_strategy_display_price")]
  exit_strategy_display_price: Option<String>,
  /// * 1: If your account has position or order for contract * 0: If your account has no position or order for contract 
  #[serde(rename = "exit_strategy_tool_availability")]
  exit_strategy_tool_availability: Option<String>,
  /// Foreground color in hex format
  #[serde(rename = "fg_color")]
  fg_color: Option<String>,
  /// Limit price
  #[serde(rename = "limit_price")]
  limit_price: Option<String>,
  /// Trading Exchange or Venue
  #[serde(rename = "listing_exchange")]
  listing_exchange: Option<String>,
  /// only exists for oca orders, oca orders in same group will have same id
  #[serde(rename = "oca_group_id")]
  oca_group_id: Option<String>,
  #[serde(rename = "option_acct")]
  option_acct: Option<String>,
  /// Format description of order
  #[serde(rename = "order_description")]
  order_description: Option<String>,
  /// order_description with the symbol
  #[serde(rename = "order_description_with_contract")]
  order_description_with_contract: Option<String>,
  /// system generated order id, unique per account
  #[serde(rename = "order_id")]
  order_id: Option<i32>,
  /// If true not allowed to modify order
  #[serde(rename = "order_not_editable")]
  order_not_editable: Option<bool>,
  /// *  PendingSubmit - Indicates the order was sent, but confirmation has not been received that it has been received by the destination.                    Occurs most commonly if an exchange is closed. *  PendingCancel - Indicates that a request has been sent to cancel an order but confirmation has not been received of its cancellation. *  PreSubmitted - Indicates that a simulated order type has been accepted by the IBKR system and that this order has yet to be elected.                   The order is held in the IBKR system until the election criteria are met. At that time the order is transmitted to the order destination as specified. *  Submitted - Indicates that the order has been accepted at the order destination and is working. *  Cancelled - Indicates that the balance of the order has been confirmed cancelled by the IB system.                This could occur unexpectedly when IB or the destination has rejected the order. *  Filled - Indicates that the order has been completely filled. *  Inactive - Indicates the order is not working, for instance if the order was invalid and triggered an error message,               or if the order was to short a security and shares have not yet been located. 
  #[serde(rename = "order_status")]
  order_status: Option<String>,
  /// Description of the order status
  #[serde(rename = "order_status_description")]
  order_status_description: Option<String>,
  /// Time of status update in unix time
  #[serde(rename = "order_time")]
  order_time: Option<String>,
  /// Types of orders
  #[serde(rename = "order_type")]
  order_type: Option<String>,
  /// If true order trades outside regular trading hours
  #[serde(rename = "outside_rth")]
  outside_rth: Option<bool>,
  /// order request id
  #[serde(rename = "request_id")]
  request_id: Option<String>,
  /// Asset class
  #[serde(rename = "sec_type")]
  sec_type: Option<String>,
  /// The side of the market of the order.   * B - Buy contract near posted ask price   * S - Sell contract near posted bid price   * X - Option expired 
  #[serde(rename = "side")]
  side: Option<String>,
  /// Quantity updated
  #[serde(rename = "size")]
  size: Option<String>,
  /// Format fillQuantity\\totalQuantity
  #[serde(rename = "size_and_fills")]
  size_and_fills: Option<String>,
  /// Stop price
  #[serde(rename = "stop_price")]
  stop_price: Option<String>,
  /// order sub-type
  #[serde(rename = "sub_type")]
  sub_type: Option<String>,
  /// Underlying symbol
  #[serde(rename = "symbol")]
  symbol: Option<String>,
  /// Time-in-Force - length of time order will continue working before it is canceled.
  #[serde(rename = "tif")]
  tif: Option<String>,
  /// Total quantity
  #[serde(rename = "total_size")]
  total_size: Option<String>,
  /// If true price management algo is enabled, refer to https://www.interactivebrokers.com/en/index.php?f=43423
  #[serde(rename = "use_price_mgmt_algo")]
  use_price_mgmt_algo: Option<bool>
}

impl OrderStatus {
  /// contains all the details of an order
  pub fn new() -> OrderStatus {
    OrderStatus {
      account: None,
      alert_active: None,
      allowed_duplicate_opposite: None,
      available_chart_periods: None,
      bg_color: None,
      cannot_cancel_order: None,
      child_order_type: None,
      company_name: None,
      conidex: None,
      contract_description_1: None,
      cum_fill: None,
      currency: None,
      deactivate_order: None,
      editable_fields: None,
      exit_strategy_chart_description: None,
      exit_strategy_display_price: None,
      exit_strategy_tool_availability: None,
      fg_color: None,
      limit_price: None,
      listing_exchange: None,
      oca_group_id: None,
      option_acct: None,
      order_description: None,
      order_description_with_contract: None,
      order_id: None,
      order_not_editable: None,
      order_status: None,
      order_status_description: None,
      order_time: None,
      order_type: None,
      outside_rth: None,
      request_id: None,
      sec_type: None,
      side: None,
      size: None,
      size_and_fills: None,
      stop_price: None,
      sub_type: None,
      symbol: None,
      tif: None,
      total_size: None,
      use_price_mgmt_algo: None
    }
  }

  pub fn set_account(&mut self, account: String) {
    self.account = Some(account);
  }

  pub fn with_account(mut self, account: String) -> OrderStatus {
    self.account = Some(account);
    self
  }

  pub fn account(&self) -> Option<&String> {
    self.account.as_ref()
  }

  pub fn reset_account(&mut self) {
    self.account = None;
  }

  pub fn set_alert_active(&mut self, alert_active: i32) {
    self.alert_active = Some(alert_active);
  }

  pub fn with_alert_active(mut self, alert_active: i32) -> OrderStatus {
    self.alert_active = Some(alert_active);
    self
  }

  pub fn alert_active(&self) -> Option<&i32> {
    self.alert_active.as_ref()
  }

  pub fn reset_alert_active(&mut self) {
    self.alert_active = None;
  }

  pub fn set_allowed_duplicate_opposite(&mut self, allowed_duplicate_opposite: bool) {
    self.allowed_duplicate_opposite = Some(allowed_duplicate_opposite);
  }

  pub fn with_allowed_duplicate_opposite(mut self, allowed_duplicate_opposite: bool) -> OrderStatus {
    self.allowed_duplicate_opposite = Some(allowed_duplicate_opposite);
    self
  }

  pub fn allowed_duplicate_opposite(&self) -> Option<&bool> {
    self.allowed_duplicate_opposite.as_ref()
  }

  pub fn reset_allowed_duplicate_opposite(&mut self) {
    self.allowed_duplicate_opposite = None;
  }

  pub fn set_available_chart_periods(&mut self, available_chart_periods: String) {
    self.available_chart_periods = Some(available_chart_periods);
  }

  pub fn with_available_chart_periods(mut self, available_chart_periods: String) -> OrderStatus {
    self.available_chart_periods = Some(available_chart_periods);
    self
  }

  pub fn available_chart_periods(&self) -> Option<&String> {
    self.available_chart_periods.as_ref()
  }

  pub fn reset_available_chart_periods(&mut self) {
    self.available_chart_periods = None;
  }

  pub fn set_bg_color(&mut self, bg_color: String) {
    self.bg_color = Some(bg_color);
  }

  pub fn with_bg_color(mut self, bg_color: String) -> OrderStatus {
    self.bg_color = Some(bg_color);
    self
  }

  pub fn bg_color(&self) -> Option<&String> {
    self.bg_color.as_ref()
  }

  pub fn reset_bg_color(&mut self) {
    self.bg_color = None;
  }

  pub fn set_cannot_cancel_order(&mut self, cannot_cancel_order: bool) {
    self.cannot_cancel_order = Some(cannot_cancel_order);
  }

  pub fn with_cannot_cancel_order(mut self, cannot_cancel_order: bool) -> OrderStatus {
    self.cannot_cancel_order = Some(cannot_cancel_order);
    self
  }

  pub fn cannot_cancel_order(&self) -> Option<&bool> {
    self.cannot_cancel_order.as_ref()
  }

  pub fn reset_cannot_cancel_order(&mut self) {
    self.cannot_cancel_order = None;
  }

  pub fn set_child_order_type(&mut self, child_order_type: String) {
    self.child_order_type = Some(child_order_type);
  }

  pub fn with_child_order_type(mut self, child_order_type: String) -> OrderStatus {
    self.child_order_type = Some(child_order_type);
    self
  }

  pub fn child_order_type(&self) -> Option<&String> {
    self.child_order_type.as_ref()
  }

  pub fn reset_child_order_type(&mut self) {
    self.child_order_type = None;
  }

  pub fn set_company_name(&mut self, company_name: String) {
    self.company_name = Some(company_name);
  }

  pub fn with_company_name(mut self, company_name: String) -> OrderStatus {
    self.company_name = Some(company_name);
    self
  }

  pub fn company_name(&self) -> Option<&String> {
    self.company_name.as_ref()
  }

  pub fn reset_company_name(&mut self) {
    self.company_name = None;
  }

  pub fn set_conidex(&mut self, conidex: String) {
    self.conidex = Some(conidex);
  }

  pub fn with_conidex(mut self, conidex: String) -> OrderStatus {
    self.conidex = Some(conidex);
    self
  }

  pub fn conidex(&self) -> Option<&String> {
    self.conidex.as_ref()
  }

  pub fn reset_conidex(&mut self) {
    self.conidex = None;
  }

  pub fn set_contract_description_1(&mut self, contract_description_1: String) {
    self.contract_description_1 = Some(contract_description_1);
  }

  pub fn with_contract_description_1(mut self, contract_description_1: String) -> OrderStatus {
    self.contract_description_1 = Some(contract_description_1);
    self
  }

  pub fn contract_description_1(&self) -> Option<&String> {
    self.contract_description_1.as_ref()
  }

  pub fn reset_contract_description_1(&mut self) {
    self.contract_description_1 = None;
  }

  pub fn set_cum_fill(&mut self, cum_fill: String) {
    self.cum_fill = Some(cum_fill);
  }

  pub fn with_cum_fill(mut self, cum_fill: String) -> OrderStatus {
    self.cum_fill = Some(cum_fill);
    self
  }

  pub fn cum_fill(&self) -> Option<&String> {
    self.cum_fill.as_ref()
  }

  pub fn reset_cum_fill(&mut self) {
    self.cum_fill = None;
  }

  pub fn set_currency(&mut self, currency: String) {
    self.currency = Some(currency);
  }

  pub fn with_currency(mut self, currency: String) -> OrderStatus {
    self.currency = Some(currency);
    self
  }

  pub fn currency(&self) -> Option<&String> {
    self.currency.as_ref()
  }

  pub fn reset_currency(&mut self) {
    self.currency = None;
  }

  pub fn set_deactivate_order(&mut self, deactivate_order: bool) {
    self.deactivate_order = Some(deactivate_order);
  }

  pub fn with_deactivate_order(mut self, deactivate_order: bool) -> OrderStatus {
    self.deactivate_order = Some(deactivate_order);
    self
  }

  pub fn deactivate_order(&self) -> Option<&bool> {
    self.deactivate_order.as_ref()
  }

  pub fn reset_deactivate_order(&mut self) {
    self.deactivate_order = None;
  }

  pub fn set_editable_fields(&mut self, editable_fields: String) {
    self.editable_fields = Some(editable_fields);
  }

  pub fn with_editable_fields(mut self, editable_fields: String) -> OrderStatus {
    self.editable_fields = Some(editable_fields);
    self
  }

  pub fn editable_fields(&self) -> Option<&String> {
    self.editable_fields.as_ref()
  }

  pub fn reset_editable_fields(&mut self) {
    self.editable_fields = None;
  }

  pub fn set_exit_strategy_chart_description(&mut self, exit_strategy_chart_description: String) {
    self.exit_strategy_chart_description = Some(exit_strategy_chart_description);
  }

  pub fn with_exit_strategy_chart_description(mut self, exit_strategy_chart_description: String) -> OrderStatus {
    self.exit_strategy_chart_description = Some(exit_strategy_chart_description);
    self
  }

  pub fn exit_strategy_chart_description(&self) -> Option<&String> {
    self.exit_strategy_chart_description.as_ref()
  }

  pub fn reset_exit_strategy_chart_description(&mut self) {
    self.exit_strategy_chart_description = None;
  }

  pub fn set_exit_strategy_display_price(&mut self, exit_strategy_display_price: String) {
    self.exit_strategy_display_price = Some(exit_strategy_display_price);
  }

  pub fn with_exit_strategy_display_price(mut self, exit_strategy_display_price: String) -> OrderStatus {
    self.exit_strategy_display_price = Some(exit_strategy_display_price);
    self
  }

  pub fn exit_strategy_display_price(&self) -> Option<&String> {
    self.exit_strategy_display_price.as_ref()
  }

  pub fn reset_exit_strategy_display_price(&mut self) {
    self.exit_strategy_display_price = None;
  }

  pub fn set_exit_strategy_tool_availability(&mut self, exit_strategy_tool_availability: String) {
    self.exit_strategy_tool_availability = Some(exit_strategy_tool_availability);
  }

  pub fn with_exit_strategy_tool_availability(mut self, exit_strategy_tool_availability: String) -> OrderStatus {
    self.exit_strategy_tool_availability = Some(exit_strategy_tool_availability);
    self
  }

  pub fn exit_strategy_tool_availability(&self) -> Option<&String> {
    self.exit_strategy_tool_availability.as_ref()
  }

  pub fn reset_exit_strategy_tool_availability(&mut self) {
    self.exit_strategy_tool_availability = None;
  }

  pub fn set_fg_color(&mut self, fg_color: String) {
    self.fg_color = Some(fg_color);
  }

  pub fn with_fg_color(mut self, fg_color: String) -> OrderStatus {
    self.fg_color = Some(fg_color);
    self
  }

  pub fn fg_color(&self) -> Option<&String> {
    self.fg_color.as_ref()
  }

  pub fn reset_fg_color(&mut self) {
    self.fg_color = None;
  }

  pub fn set_limit_price(&mut self, limit_price: String) {
    self.limit_price = Some(limit_price);
  }

  pub fn with_limit_price(mut self, limit_price: String) -> OrderStatus {
    self.limit_price = Some(limit_price);
    self
  }

  pub fn limit_price(&self) -> Option<&String> {
    self.limit_price.as_ref()
  }

  pub fn reset_limit_price(&mut self) {
    self.limit_price = None;
  }

  pub fn set_listing_exchange(&mut self, listing_exchange: String) {
    self.listing_exchange = Some(listing_exchange);
  }

  pub fn with_listing_exchange(mut self, listing_exchange: String) -> OrderStatus {
    self.listing_exchange = Some(listing_exchange);
    self
  }

  pub fn listing_exchange(&self) -> Option<&String> {
    self.listing_exchange.as_ref()
  }

  pub fn reset_listing_exchange(&mut self) {
    self.listing_exchange = None;
  }

  pub fn set_oca_group_id(&mut self, oca_group_id: String) {
    self.oca_group_id = Some(oca_group_id);
  }

  pub fn with_oca_group_id(mut self, oca_group_id: String) -> OrderStatus {
    self.oca_group_id = Some(oca_group_id);
    self
  }

  pub fn oca_group_id(&self) -> Option<&String> {
    self.oca_group_id.as_ref()
  }

  pub fn reset_oca_group_id(&mut self) {
    self.oca_group_id = None;
  }

  pub fn set_option_acct(&mut self, option_acct: String) {
    self.option_acct = Some(option_acct);
  }

  pub fn with_option_acct(mut self, option_acct: String) -> OrderStatus {
    self.option_acct = Some(option_acct);
    self
  }

  pub fn option_acct(&self) -> Option<&String> {
    self.option_acct.as_ref()
  }

  pub fn reset_option_acct(&mut self) {
    self.option_acct = None;
  }

  pub fn set_order_description(&mut self, order_description: String) {
    self.order_description = Some(order_description);
  }

  pub fn with_order_description(mut self, order_description: String) -> OrderStatus {
    self.order_description = Some(order_description);
    self
  }

  pub fn order_description(&self) -> Option<&String> {
    self.order_description.as_ref()
  }

  pub fn reset_order_description(&mut self) {
    self.order_description = None;
  }

  pub fn set_order_description_with_contract(&mut self, order_description_with_contract: String) {
    self.order_description_with_contract = Some(order_description_with_contract);
  }

  pub fn with_order_description_with_contract(mut self, order_description_with_contract: String) -> OrderStatus {
    self.order_description_with_contract = Some(order_description_with_contract);
    self
  }

  pub fn order_description_with_contract(&self) -> Option<&String> {
    self.order_description_with_contract.as_ref()
  }

  pub fn reset_order_description_with_contract(&mut self) {
    self.order_description_with_contract = None;
  }

  pub fn set_order_id(&mut self, order_id: i32) {
    self.order_id = Some(order_id);
  }

  pub fn with_order_id(mut self, order_id: i32) -> OrderStatus {
    self.order_id = Some(order_id);
    self
  }

  pub fn order_id(&self) -> Option<&i32> {
    self.order_id.as_ref()
  }

  pub fn reset_order_id(&mut self) {
    self.order_id = None;
  }

  pub fn set_order_not_editable(&mut self, order_not_editable: bool) {
    self.order_not_editable = Some(order_not_editable);
  }

  pub fn with_order_not_editable(mut self, order_not_editable: bool) -> OrderStatus {
    self.order_not_editable = Some(order_not_editable);
    self
  }

  pub fn order_not_editable(&self) -> Option<&bool> {
    self.order_not_editable.as_ref()
  }

  pub fn reset_order_not_editable(&mut self) {
    self.order_not_editable = None;
  }

  pub fn set_order_status(&mut self, order_status: String) {
    self.order_status = Some(order_status);
  }

  pub fn with_order_status(mut self, order_status: String) -> OrderStatus {
    self.order_status = Some(order_status);
    self
  }

  pub fn order_status(&self) -> Option<&String> {
    self.order_status.as_ref()
  }

  pub fn reset_order_status(&mut self) {
    self.order_status = None;
  }

  pub fn set_order_status_description(&mut self, order_status_description: String) {
    self.order_status_description = Some(order_status_description);
  }

  pub fn with_order_status_description(mut self, order_status_description: String) -> OrderStatus {
    self.order_status_description = Some(order_status_description);
    self
  }

  pub fn order_status_description(&self) -> Option<&String> {
    self.order_status_description.as_ref()
  }

  pub fn reset_order_status_description(&mut self) {
    self.order_status_description = None;
  }

  pub fn set_order_time(&mut self, order_time: String) {
    self.order_time = Some(order_time);
  }

  pub fn with_order_time(mut self, order_time: String) -> OrderStatus {
    self.order_time = Some(order_time);
    self
  }

  pub fn order_time(&self) -> Option<&String> {
    self.order_time.as_ref()
  }

  pub fn reset_order_time(&mut self) {
    self.order_time = None;
  }

  pub fn set_order_type(&mut self, order_type: String) {
    self.order_type = Some(order_type);
  }

  pub fn with_order_type(mut self, order_type: String) -> OrderStatus {
    self.order_type = Some(order_type);
    self
  }

  pub fn order_type(&self) -> Option<&String> {
    self.order_type.as_ref()
  }

  pub fn reset_order_type(&mut self) {
    self.order_type = None;
  }

  pub fn set_outside_rth(&mut self, outside_rth: bool) {
    self.outside_rth = Some(outside_rth);
  }

  pub fn with_outside_rth(mut self, outside_rth: bool) -> OrderStatus {
    self.outside_rth = Some(outside_rth);
    self
  }

  pub fn outside_rth(&self) -> Option<&bool> {
    self.outside_rth.as_ref()
  }

  pub fn reset_outside_rth(&mut self) {
    self.outside_rth = None;
  }

  pub fn set_request_id(&mut self, request_id: String) {
    self.request_id = Some(request_id);
  }

  pub fn with_request_id(mut self, request_id: String) -> OrderStatus {
    self.request_id = Some(request_id);
    self
  }

  pub fn request_id(&self) -> Option<&String> {
    self.request_id.as_ref()
  }

  pub fn reset_request_id(&mut self) {
    self.request_id = None;
  }

  pub fn set_sec_type(&mut self, sec_type: String) {
    self.sec_type = Some(sec_type);
  }

  pub fn with_sec_type(mut self, sec_type: String) -> OrderStatus {
    self.sec_type = Some(sec_type);
    self
  }

  pub fn sec_type(&self) -> Option<&String> {
    self.sec_type.as_ref()
  }

  pub fn reset_sec_type(&mut self) {
    self.sec_type = None;
  }

  pub fn set_side(&mut self, side: String) {
    self.side = Some(side);
  }

  pub fn with_side(mut self, side: String) -> OrderStatus {
    self.side = Some(side);
    self
  }

  pub fn side(&self) -> Option<&String> {
    self.side.as_ref()
  }

  pub fn reset_side(&mut self) {
    self.side = None;
  }

  pub fn set_size(&mut self, size: String) {
    self.size = Some(size);
  }

  pub fn with_size(mut self, size: String) -> OrderStatus {
    self.size = Some(size);
    self
  }

  pub fn size(&self) -> Option<&String> {
    self.size.as_ref()
  }

  pub fn reset_size(&mut self) {
    self.size = None;
  }

  pub fn set_size_and_fills(&mut self, size_and_fills: String) {
    self.size_and_fills = Some(size_and_fills);
  }

  pub fn with_size_and_fills(mut self, size_and_fills: String) -> OrderStatus {
    self.size_and_fills = Some(size_and_fills);
    self
  }

  pub fn size_and_fills(&self) -> Option<&String> {
    self.size_and_fills.as_ref()
  }

  pub fn reset_size_and_fills(&mut self) {
    self.size_and_fills = None;
  }

  pub fn set_stop_price(&mut self, stop_price: String) {
    self.stop_price = Some(stop_price);
  }

  pub fn with_stop_price(mut self, stop_price: String) -> OrderStatus {
    self.stop_price = Some(stop_price);
    self
  }

  pub fn stop_price(&self) -> Option<&String> {
    self.stop_price.as_ref()
  }

  pub fn reset_stop_price(&mut self) {
    self.stop_price = None;
  }

  pub fn set_sub_type(&mut self, sub_type: String) {
    self.sub_type = Some(sub_type);
  }

  pub fn with_sub_type(mut self, sub_type: String) -> OrderStatus {
    self.sub_type = Some(sub_type);
    self
  }

  pub fn sub_type(&self) -> Option<&String> {
    self.sub_type.as_ref()
  }

  pub fn reset_sub_type(&mut self) {
    self.sub_type = None;
  }

  pub fn set_symbol(&mut self, symbol: String) {
    self.symbol = Some(symbol);
  }

  pub fn with_symbol(mut self, symbol: String) -> OrderStatus {
    self.symbol = Some(symbol);
    self
  }

  pub fn symbol(&self) -> Option<&String> {
    self.symbol.as_ref()
  }

  pub fn reset_symbol(&mut self) {
    self.symbol = None;
  }

  pub fn set_tif(&mut self, tif: String) {
    self.tif = Some(tif);
  }

  pub fn with_tif(mut self, tif: String) -> OrderStatus {
    self.tif = Some(tif);
    self
  }

  pub fn tif(&self) -> Option<&String> {
    self.tif.as_ref()
  }

  pub fn reset_tif(&mut self) {
    self.tif = None;
  }

  pub fn set_total_size(&mut self, total_size: String) {
    self.total_size = Some(total_size);
  }

  pub fn with_total_size(mut self, total_size: String) -> OrderStatus {
    self.total_size = Some(total_size);
    self
  }

  pub fn total_size(&self) -> Option<&String> {
    self.total_size.as_ref()
  }

  pub fn reset_total_size(&mut self) {
    self.total_size = None;
  }

  pub fn set_use_price_mgmt_algo(&mut self, use_price_mgmt_algo: bool) {
    self.use_price_mgmt_algo = Some(use_price_mgmt_algo);
  }

  pub fn with_use_price_mgmt_algo(mut self, use_price_mgmt_algo: bool) -> OrderStatus {
    self.use_price_mgmt_algo = Some(use_price_mgmt_algo);
    self
  }

  pub fn use_price_mgmt_algo(&self) -> Option<&bool> {
    self.use_price_mgmt_algo.as_ref()
  }

  pub fn reset_use_price_mgmt_algo(&mut self) {
    self.use_price_mgmt_algo = None;
  }

}