ibapi 5.4.0

An unofficial Rust client for the Interactive Brokers TWS API: market data, orders, and account data, with async (Tokio) and blocking clients for TWS and IB Gateway.
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
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComboLeg {
    /// The Contract's IB's unique id.
    #[prost(int32, optional, tag = "1")]
    pub con_id: ::core::option::Option<i32>,
    /// The rate of the leg's shares compared to the Order's totalQuantity. Final number of shares acquired will be equal to ( ratio * totalQuantity ).
    #[prost(int32, optional, tag = "2")]
    pub ratio: ::core::option::Option<i32>,
    /// The side (buy or sell) of the leg: For individual accounts, only BUY and SELL are available. SSHORT is for institutions.
    #[prost(string, optional, tag = "3")]
    pub action: ::core::option::Option<::prost::alloc::string::String>,
    /// The destination exchange to which the order will be routed.
    #[prost(string, optional, tag = "4")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// Specifies whether an order is an open or closing order. For institutional customers to determine if this order is to open or close a position. 0 – Same as the parent security. This is the only option for retail customers. 1 – Open. This value is only valid for institutional customers. 2 – Close. This value is only valid for institutional customers. 3 – Unknown.
    #[prost(int32, optional, tag = "5")]
    pub open_close: ::core::option::Option<i32>,
    /// Used for IBExecution accounts to indicate if a leg is short.
    #[prost(int32, optional, tag = "6")]
    pub short_sales_slot: ::core::option::Option<i32>,
    /// When ShortSaleSlot is 2, this field shall contain the designated location.
    #[prost(string, optional, tag = "7")]
    pub designated_location: ::core::option::Option<::prost::alloc::string::String>,
    /// Mark order as exempt from short sale uptick rule. Possible values: 0 – Does not apply the rule. -1 – Applies the short sale uptick rule.
    #[prost(int32, optional, tag = "8")]
    pub exempt_code: ::core::option::Option<i32>,
    /// Limit price by leg. All legs must contain perLegPrice if used.
    #[prost(double, optional, tag = "9")]
    pub per_leg_price: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeltaNeutralContract {
    /// The unique contract identifier specifying the security. Used for Delta-Neutral Combo contracts.
    #[prost(int32, optional, tag = "1")]
    pub con_id: ::core::option::Option<i32>,
    /// The underlying stock or future delta. Used for Delta-Neutral Combo contracts.
    #[prost(double, optional, tag = "2")]
    pub delta: ::core::option::Option<f64>,
    /// The price of the underlying. Used for Delta-Neutral Combo contracts.
    #[prost(double, optional, tag = "3")]
    pub price: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Contract {
    /// The unique IB contract identifier.
    #[prost(int32, optional, tag = "1")]
    pub con_id: ::core::option::Option<i32>,
    /// The underlying's asset symbol.
    #[prost(string, optional, tag = "2")]
    pub symbol: ::core::option::Option<::prost::alloc::string::String>,
    /// The security's type: STK – stock (or ETF) OPT – option FUT – future IND – index FOP – futures option CASH – forex pair BAG – combo WAR – warrant BOND- bond CMDTY- commodity NEWS- news FUND- mutual fund.
    #[prost(string, optional, tag = "3")]
    pub sec_type: ::core::option::Option<::prost::alloc::string::String>,
    /// The contract's last trading day or contract month (for Options and Futures). Strings with format YYYYMM will be interpreted as the Contract Month whereas YYYYMMDD will be interpreted as Last Trading Day.
    #[prost(string, optional, tag = "4")]
    pub last_trade_date_or_contract_month: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// The option's strike price.
    #[prost(double, optional, tag = "5")]
    pub strike: ::core::option::Option<f64>,
    /// Either Put or Call (i.e. Options). Valid values are P, PUT, C, CALL.
    #[prost(string, optional, tag = "6")]
    pub right: ::core::option::Option<::prost::alloc::string::String>,
    /// The instrument's multiplier (i.e. options, futures).
    #[prost(double, optional, tag = "7")]
    pub multiplier: ::core::option::Option<f64>,
    /// The destination exchange.
    #[prost(string, optional, tag = "8")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// The contract's primary exchange. For smart routed contracts, used to define contract in case of ambiguity.Should be defined as native exchange of contract. For exchanges which contain a period in name, will only be part of exchange name prior to period, i.e. ENEXT for ENEXT.BE.
    #[prost(string, optional, tag = "9")]
    pub primary_exch: ::core::option::Option<::prost::alloc::string::String>,
    /// The underlying's currency.
    #[prost(string, optional, tag = "10")]
    pub currency: ::core::option::Option<::prost::alloc::string::String>,
    /// The contract's symbol within its primary exchange. For options, this will be the OCC symbol.
    #[prost(string, optional, tag = "11")]
    pub local_symbol: ::core::option::Option<::prost::alloc::string::String>,
    /// The trading class name for this contract. Available in TWS contract description window as well. For example, weekly S&P options are "SPXW" compared to the monthly contract which uses "SPX".
    #[prost(string, optional, tag = "12")]
    pub trading_class: ::core::option::Option<::prost::alloc::string::String>,
    /// Security's identifier when querying contract's details or placing orders ISIN – Example: Apple: US0378331005 CUSIP – Example: Apple: 037833100.
    #[prost(string, optional, tag = "13")]
    pub sec_id_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Identifier of the security type.
    #[prost(string, optional, tag = "14")]
    pub sec_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Description of the contract.
    #[prost(string, optional, tag = "15")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// IssuerId of the contract.
    #[prost(string, optional, tag = "16")]
    pub issuer_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Delta and underlying price for Delta-Neutral combo orders. Underlying (STK or FUT).
    #[prost(message, optional, tag = "17")]
    pub delta_neutral_contract: ::core::option::Option<DeltaNeutralContract>,
    /// If set to true, contract details requests and historical data queries can be performed pertaining to expired futures contracts. Expired options or other instrument types are not available.
    #[prost(bool, optional, tag = "18")]
    pub include_expired: ::core::option::Option<bool>,
    /// Details for each leg of the combination contract.
    #[prost(string, optional, tag = "19")]
    pub combo_legs_descrip: ::core::option::Option<::prost::alloc::string::String>,
    /// The legs of a combined contract definition.
    #[prost(message, repeated, tag = "20")]
    pub combo_legs: ::prost::alloc::vec::Vec<ComboLeg>,
    /// The contract's last trading day.
    #[prost(string, optional, tag = "21")]
    pub last_trade_date: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScannerParametersRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTicksRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// The datetime when the request should be submitted. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
    #[prost(string, optional, tag = "3")]
    pub start_date_time: ::core::option::Option<::prost::alloc::string::String>,
    /// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
    #[prost(string, optional, tag = "4")]
    pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Number of distinct data points. Max is 1000 per request.
    #[prost(int32, optional, tag = "5")]
    pub number_of_ticks: ::core::option::Option<i32>,
    /// Data source type.
    #[prost(string, optional, tag = "6")]
    pub what_to_show: ::core::option::Option<::prost::alloc::string::String>,
    /// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
    #[prost(bool, optional, tag = "7")]
    pub use_rth: ::core::option::Option<bool>,
    /// Omit updates that reflect only changes in size, and not price. Applicable to Bid\_Ask data requests.
    #[prost(bool, optional, tag = "8")]
    pub ignore_size: ::core::option::Option<bool>,
    /// Should be defined as *null*; reserved for internal use.
    #[prost(map = "string, string", tag = "9")]
    pub misc_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelTickByTick {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RerouteMarketDataRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The unique IB contract identifier.
    #[prost(int32, optional, tag = "2")]
    pub con_id: ::core::option::Option<i32>,
    /// The destination exchange.
    #[prost(string, optional, tag = "3")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AutoOpenOrdersRequest {
    /// If set to true, the newly created orders will be assigned an API order ID and implicitly associated with this client. If set to false, future orders will continue to bind to original client ID.
    #[prost(bool, optional, tag = "1")]
    pub auto_bind: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickSnapshotEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountUpdateMulti {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "2")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
    #[prost(string, optional, tag = "3")]
    pub model_code: ::core::option::Option<::prost::alloc::string::String>,
    /// The value being updated.
    #[prost(string, optional, tag = "4")]
    pub key: ::core::option::Option<::prost::alloc::string::String>,
    /// Representative information for a given Key.
    #[prost(string, optional, tag = "5")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
    /// The underlying's currency.
    #[prost(string, optional, tag = "6")]
    pub currency: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ApiSettingsConfig {
    /// true indicates modifications cannot be made throuh the API.
    #[prost(bool, optional, tag = "1")]
    pub read_only_api: ::core::option::Option<bool>,
    /// If set to true, Mutual Fund API client can send monetary value for BUY order and NOT send CashQty, or send CashQty and NOT send totalQuantity.
    #[prost(bool, optional, tag = "2")]
    pub total_quantity_for_mutual_funds: ::core::option::Option<bool>,
    /// Declare that all open orders be returned to EWrapper.OpenOrders.
    #[prost(bool, optional, tag = "3")]
    pub download_open_orders_on_connection: ::core::option::Option<bool>,
    /// true to include VirtualFX in the EWrapper.positions reponses.
    #[prost(bool, optional, tag = "4")]
    pub include_virtual_fx_positions: ::core::option::Option<bool>,
    /// Prepare profit and loss value calculations when downloading positions data.
    #[prost(bool, optional, tag = "5")]
    pub prepare_daily_pn_l: ::core::option::Option<bool>,
    /// Receive notifications for every order change from volatility.
    #[prost(bool, optional, tag = "6")]
    pub send_status_updates_for_volatility_orders: ::core::option::Option<bool>,
    /// Define API message encoding. Supports "osCodePage" (For C++) or "ascii7".
    #[prost(string, optional, tag = "7")]
    pub encode_api_messages: ::core::option::Option<::prost::alloc::string::String>,
    /// Supported socket port connection allowed for API connection requests.
    #[prost(int32, optional, tag = "8")]
    pub socket_port: ::core::option::Option<i32>,
    /// If this flag is checked, orders that are automatically bound to an API client as a result of reqOpenOrders or reqAutoOpenOrders calls or system-generated orders like volatility hedging orders, will be assigned negative API Order ID numbers. If this flag is unchecked, orders bound as a result of reqOpenOrders or reqAutoOpenOrders calls will be assigned incremental API Order ID numbers. Volatility hedging orders will be assigned API Order ID numbers in the format 'parent order API ID + 1" when possible.
    #[prost(bool, optional, tag = "9")]
    pub use_negative_auto_range: ::core::option::Option<bool>,
    /// Toggle if an API log should be created.
    #[prost(bool, optional, tag = "10")]
    pub create_api_message_log_file: ::core::option::Option<bool>,
    /// true to have market data included in API logs.
    #[prost(bool, optional, tag = "11")]
    pub include_market_data_in_log_file: ::core::option::Option<bool>,
    /// Flag as true to have Trader Workstation expose the complete known look-ahead trading schedule to the API, which is one week for most products. Leave unchecked to only send trading schedule for today plus the next open trading day.
    #[prost(bool, optional, tag = "12")]
    pub expose_trading_schedule_to_api: ::core::option::Option<bool>,
    /// False: The API "Cash Balance" includes the "Insured Bank Deposit Sweep Program" balance. True: Report "Cash Balance" and "Insured Bank Deposit Sweep Program" balances separately in the API.
    #[prost(bool, optional, tag = "13")]
    pub split_insured_deposit_from_cash_balance: ::core::option::Option<bool>,
    /// True will return all positions that have already closed with a '0' value.
    #[prost(bool, optional, tag = "14")]
    pub send_zero_positions_for_today_only: ::core::option::Option<bool>,
    /// Internal use. Market data management.
    #[prost(bool, optional, tag = "15")]
    pub let_api_account_requests_switch_subscription: ::core::option::Option<bool>,
    /// See [Unification of Groups and Profiles](<https://www.interactivebrokers.com/docs/tws-api/doc/financial-advisors/unification-of-groups-and-profiles>) for details.
    #[prost(bool, optional, tag = "16")]
    pub use_account_groups_with_allocation_methods: ::core::option::Option<bool>,
    /// Level of detail for API logs. Supports "system", "warning", "error", "info" and "detail".
    #[prost(string, optional, tag = "17")]
    pub logging_level: ::core::option::Option<::prost::alloc::string::String>,
    /// The master identifier for order updates.
    #[prost(int32, optional, tag = "18")]
    pub master_client_id: ::core::option::Option<i32>,
    /// When amount of data sent by the Trader Workstation becomes too large, it is possible that network connection to API client cannot handle the load. Trader Workstation waits for specified amount of seconds and then disconnects API client if data cannot be sent fast enough.
    #[prost(int32, optional, tag = "19")]
    pub bulk_data_timeout: ::core::option::Option<i32>,
    /// Delimeter for smartComponentMap.
    #[prost(string, optional, tag = "20")]
    pub component_exch_separator: ::core::option::Option<::prost::alloc::string::String>,
    /// True indicates forex market data uses 1/10 pips instead of 1/2.
    #[prost(bool, optional, tag = "21")]
    pub show_forex_data_in1_10pips: ::core::option::Option<bool>,
    /// If true, forex trades can be received in 1/10 pips instead of 1/2.
    #[prost(bool, optional, tag = "22")]
    pub allow_forex_trading_in1_10pips: ::core::option::Option<bool>,
    /// Account values will be rounded to whole numbers instead of precise values.
    #[prost(bool, optional, tag = "23")]
    pub round_account_values_to_nearest_whole_number: ::core::option::Option<bool>,
    /// Deliver market data as represented in lots rather than direct share sizes.
    #[prost(bool, optional, tag = "24")]
    pub send_market_data_in_lots_for_us_stocks: ::core::option::Option<bool>,
    /// True indicates AdvancedOrderReject messages will appear in the UI instead of through the socket.
    #[prost(bool, optional, tag = "25")]
    pub show_advanced_order_reject_in_ui: ::core::option::Option<bool>,
    /// false indicates the API messages above maximum allowed message rate will be paced at max-msg/second. true indicates overhead messages will be rejected instantly to ensure timely response.
    #[prost(bool, optional, tag = "26")]
    pub reject_messages_above_max_rate: ::core::option::Option<bool>,
    /// true to maintain API connection if requests are sent with incorrect API socket attributes.
    #[prost(bool, optional, tag = "27")]
    pub maintain_connection_on_incorrect_fields: ::core::option::Option<bool>,
    /// Indicate "ISLAND" is a valid exchange value for NASDAQ listed stocks.
    #[prost(bool, optional, tag = "28")]
    pub compatibility_mode_nasdaq_stocks: ::core::option::Option<bool>,
    /// Historical data will be returned based on the indicated value. Supported values include "instrument": representing the timezone of the instrument's primary listing exchange; "operator": representing the local timezone set in TWS or IBG; and "utc": representing the Coordinated Universal Time.
    #[prost(string, optional, tag = "29")]
    pub send_instrument_timezone: ::core::option::Option<::prost::alloc::string::String>,
    /// Foreign exchange values will be delivered as integer rates instead of decimal.
    #[prost(bool, optional, tag = "30")]
    pub send_forex_data_in_compatibility_mode: ::core::option::Option<bool>,
    /// true to submit orders that attempted transmissions while disconnected from the network.
    #[prost(bool, optional, tag = "31")]
    pub maintain_and_resubmit_orders_on_reconnect: ::core::option::Option<bool>,
    /// The maximum data size for historical bars. Supports 1, 4, 16.
    #[prost(int32, optional, tag = "32")]
    pub historical_data_max_size: ::core::option::Option<i32>,
    /// True to net event contract trades.
    #[prost(bool, optional, tag = "33")]
    pub auto_report_netting_event_contract_trades: ::core::option::Option<bool>,
    /// Definition of how options should behave when exercised.
    #[prost(string, optional, tag = "34")]
    pub option_exercise_request_type: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Determine if API connections are only permitted from localhost. If this value is true, trustedIPs will be ignored.
    #[prost(bool, optional, tag = "35")]
    pub allow_localhost_only: ::core::option::Option<bool>,
    /// A string of IP addresses that may connect to the Trader Workstation.
    #[prost(string, repeated, tag = "36")]
    pub trusted_i_ps: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelAccountUpdatesMulti {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsProvidersRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TickOptionComputation {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Type of data the tick represents.
    #[prost(int32, optional, tag = "2")]
    pub tick_type: ::core::option::Option<i32>,
    /// Defines TickAttrib.canAutoExecute.
    #[prost(int32, optional, tag = "3")]
    pub tick_attrib: ::core::option::Option<i32>,
    /// Implied volatility of the Option.
    #[prost(double, optional, tag = "4")]
    pub implied_vol: ::core::option::Option<f64>,
    /// The stock's Delta. For orders on BOX only.
    #[prost(double, optional, tag = "5")]
    pub delta: ::core::option::Option<f64>,
    /// The option price.
    #[prost(double, optional, tag = "6")]
    pub opt_price: ::core::option::Option<f64>,
    /// The present value of dividends expected on the option's underlying.
    #[prost(double, optional, tag = "7")]
    pub pv_dividend: ::core::option::Option<f64>,
    /// The option Gamma value.
    #[prost(double, optional, tag = "8")]
    pub gamma: ::core::option::Option<f64>,
    /// Option greek Vega.
    #[prost(double, optional, tag = "9")]
    pub vega: ::core::option::Option<f64>,
    /// Option Greek Theta.
    #[prost(double, optional, tag = "10")]
    pub theta: ::core::option::Option<f64>,
    /// Current price of the underlying contract.
    #[prost(double, optional, tag = "11")]
    pub und_price: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserInfoRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CurrentTimeInMillis {
    /// 13 digit timestamp indicating current Epoch timestamp with millisecond precision.
    #[prost(int64, optional, tag = "1")]
    pub current_time_in_millis: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountValue {
    /// The value being updated.
    #[prost(string, optional, tag = "1")]
    pub key: ::core::option::Option<::prost::alloc::string::String>,
    /// Representative information for a given Key.
    #[prost(string, optional, tag = "2")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
    /// The underlying's currency.
    #[prost(string, optional, tag = "3")]
    pub currency: ::core::option::Option<::prost::alloc::string::String>,
    /// The account identifier.
    #[prost(string, optional, tag = "4")]
    pub account_name: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OpenOrdersRequest {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelCalculateImpliedVolatility {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionFilter {
    /// Client identifier the order was submitted through.
    #[prost(int32, optional, tag = "1")]
    pub client_id: ::core::option::Option<i32>,
    /// Account identifier that executed the trade.
    #[prost(string, optional, tag = "2")]
    pub acct_code: ::core::option::Option<::prost::alloc::string::String>,
    /// Declare the date/time to receive executions at and after the designated time. Can be used in combination with LastNDays or SpecificDates. Requests should be formatted as "YYYYMMDD HH:mm:ss TMZ" or in UTC as "YYYYMMDD-HH:mm:ss". If no date is passed, the current date is assumed.
    #[prost(string, optional, tag = "3")]
    pub time: ::core::option::Option<::prost::alloc::string::String>,
    /// Instrument's symbol.
    #[prost(string, optional, tag = "4")]
    pub symbol: ::core::option::Option<::prost::alloc::string::String>,
    /// Asset type being monitored.
    #[prost(string, optional, tag = "5")]
    pub sec_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Exchange where the symbol was traded.
    #[prost(string, optional, tag = "6")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// Determine if only Buy or Sell orders are returned.
    #[prost(string, optional, tag = "7")]
    pub side: ::core::option::Option<::prost::alloc::string::String>,
    /// Number of previous days to receive trades for. Maximum 7.
    #[prost(int32, optional, tag = "8")]
    pub last_n_days: ::core::option::Option<i32>,
    /// Retrieve a specific date within the past week to receive executions for. May be used with Time, but only the executions on the Specified Dates will return. Array formatted as \[YYYYMMDD\].
    #[prost(int32, repeated, tag = "9")]
    pub specific_dates: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalculateImpliedVolatilityRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// Hypothetical option price.
    #[prost(double, optional, tag = "3")]
    pub option_price: ::core::option::Option<f64>,
    /// Current price of the underlying contract.
    #[prost(double, optional, tag = "4")]
    pub under_price: ::core::option::Option<f64>,
    /// Internal use only. Send an empty tag value list.
    #[prost(map = "string, string", tag = "5")]
    pub implied_volatility_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommissionAndFeesReport {
    /// The execution's identifier affiliated with this commission.
    #[prost(string, optional, tag = "1")]
    pub exec_id: ::core::option::Option<::prost::alloc::string::String>,
    /// The combined cost of commissions and fees.
    #[prost(double, optional, tag = "2")]
    pub commission_and_fees: ::core::option::Option<f64>,
    /// The currency denoting the value of the commissionAndFees.
    #[prost(string, optional, tag = "3")]
    pub currency: ::core::option::Option<::prost::alloc::string::String>,
    /// The realized profit and loss from the execution.
    #[prost(double, optional, tag = "4")]
    pub realized_pnl: ::core::option::Option<f64>,
    /// Annual interest divided by mark price.
    #[prost(double, optional, tag = "5")]
    pub bond_yield: ::core::option::Option<f64>,
    /// date expressed in yyyymmdd format.
    #[prost(string, optional, tag = "6")]
    pub yield_redemption_date: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CurrentTimeRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountSummary {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "2")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Unique tag indicating return data.
    #[prost(string, optional, tag = "3")]
    pub tag: ::core::option::Option<::prost::alloc::string::String>,
    /// Representative information for a given Key.
    #[prost(string, optional, tag = "4")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
    /// The underlying's currency.
    #[prost(string, optional, tag = "5")]
    pub currency: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PositionMultiEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickAttribBidAsk {
    /// Indicates the bid price is below the current Low for the day.
    #[prost(bool, optional, tag = "1")]
    pub bid_past_low: ::core::option::Option<bool>,
    /// Indicates the ask price is above the current High for the day.
    #[prost(bool, optional, tag = "2")]
    pub ask_past_high: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTickBidAsk {
    /// The UNIX timestamp of the historical tick.
    #[prost(int64, optional, tag = "1")]
    pub time: ::core::option::Option<i64>,
    /// Unique attributes of the tick data.
    #[prost(message, optional, tag = "2")]
    pub tick_attrib_bid_ask: ::core::option::Option<TickAttribBidAsk>,
    /// Buy side price of the order.
    #[prost(double, optional, tag = "3")]
    pub price_bid: ::core::option::Option<f64>,
    /// Sell side price of the order.
    #[prost(double, optional, tag = "4")]
    pub price_ask: ::core::option::Option<f64>,
    /// Number of shares in the buy side.
    #[prost(string, optional, tag = "5")]
    pub size_bid: ::core::option::Option<::prost::alloc::string::String>,
    /// Number of shares in the sell side.
    #[prost(string, optional, tag = "6")]
    pub size_ask: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTicksBidAsk {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// A list of HistoricalTickBidAsk objects.
    #[prost(message, repeated, tag = "2")]
    pub historical_ticks_bid_ask: ::prost::alloc::vec::Vec<HistoricalTickBidAsk>,
    /// Flag the end of historical data.
    #[prost(bool, optional, tag = "3")]
    pub is_done: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelRealTimeBars {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TickGeneric {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Type of data the tick represents.
    #[prost(int32, optional, tag = "2")]
    pub tick_type: ::core::option::Option<i32>,
    /// Representative information for a given Key.
    #[prost(double, optional, tag = "3")]
    pub value: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ApiPrecautionsConfig {
    /// If set to true, all order precautions will be bypassed and directly submitted without warning.
    #[prost(bool, optional, tag = "1")]
    pub bypass_order_precautions: ::core::option::Option<bool>,
    /// Bypass order precautions related to Bond trading.
    #[prost(bool, optional, tag = "2")]
    pub bypass_bond_warning: ::core::option::Option<bool>,
    /// If true, you are electing to bypass any warning that your API-transmitted order will result in a negative yield to worst (YTW), excluding commissions. These orders will be executed without warning.
    #[prost(bool, optional, tag = "3")]
    pub bypass_negative_yield_confirmation: ::core::option::Option<bool>,
    /// If set to true, you are electing to bypass warning regarding called bond contract used in order.
    #[prost(bool, optional, tag = "4")]
    pub bypass_called_bond_warning: ::core::option::Option<bool>,
    /// If set to true, orders will submit for same-action combos without warning.
    #[prost(bool, optional, tag = "5")]
    pub bypass_same_action_pair_trade_warning: ::core::option::Option<bool>,
    /// Bypass warnings against flagged accounts submitting orders.
    #[prost(bool, optional, tag = "6")]
    pub bypass_flagged_accounts_warning: ::core::option::Option<bool>,
    /// If set to true, order will be submitted in spite of volatility concerns for the order.
    #[prost(bool, optional, tag = "7")]
    pub bypass_price_based_volatility_warning: ::core::option::Option<bool>,
    /// If set to true, direct routed orders will be submitted without warning.
    #[prost(bool, optional, tag = "8")]
    pub bypass_redirect_order_warning: ::core::option::Option<bool>,
    /// Waive warnings that your submitted order is being passed without overfill protection.
    #[prost(bool, optional, tag = "9")]
    pub bypass_no_overfill_protection: ::core::option::Option<bool>,
    /// If set to true, orders will route to designated exchanges regardless of current best bid and offer.
    #[prost(bool, optional, tag = "10")]
    pub bypass_route_marketable_to_bbo: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ApiConfig {
    /// Proto object containing API Precaution settings.
    #[prost(message, optional, tag = "1")]
    pub precautions: ::core::option::Option<ApiPrecautionsConfig>,
    /// Represents an ApiSettingsConfig object to be submitted with the API Config.
    #[prost(message, optional, tag = "2")]
    pub settings: ::core::option::Option<ApiSettingsConfig>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Object containing parameters to filter the returned executions.
    #[prost(message, optional, tag = "2")]
    pub execution_filter: ::core::option::Option<ExecutionFilter>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OpenOrdersEnd {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ContractDataEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramDataEntry {
    /// The price of the histogram event.
    #[prost(double, optional, tag = "1")]
    pub price: ::core::option::Option<f64>,
    /// Represents volume of the order data.
    #[prost(string, optional, tag = "2")]
    pub size: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The number of histogram data points returned.
    #[prost(message, repeated, tag = "2")]
    pub histogram_data_entries: ::prost::alloc::vec::Vec<HistogramDataEntry>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WshMetaDataRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ErrorMessage {
    /// The order's unique identifier. If a new order is placed with an order ID less than or equal to the order ID of a previous order an error will occur.
    #[prost(int32, optional, tag = "1")]
    pub id: ::core::option::Option<i32>,
    /// The Unix timestamp of when the error took place.
    #[prost(int64, optional, tag = "2")]
    pub error_time: ::core::option::Option<i64>,
    /// The code identifying the error.
    #[prost(int32, optional, tag = "3")]
    pub error_code: ::core::option::Option<i32>,
    /// The error's description.
    #[prost(string, optional, tag = "4")]
    pub error_msg: ::core::option::Option<::prost::alloc::string::String>,
    /// Advanced order rejection message providing additional depth for error.
    #[prost(string, optional, tag = "5")]
    pub advanced_order_reject_json: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScannerSubscription {
    /// Determine the number of rows or results from the market scanner to be returned. Returns the maximum, 50, by default.
    #[prost(int32, optional, tag = "1")]
    pub number_of_rows: ::core::option::Option<i32>,
    /// Returns the Instrument type to be returned. See scannerParameters xml response for details.
    #[prost(string, optional, tag = "2")]
    pub instrument: ::core::option::Option<::prost::alloc::string::String>,
    /// Returns the exchange regions to be returned. See scannerParameters xml response for details.
    #[prost(string, optional, tag = "3")]
    pub location_code: ::core::option::Option<::prost::alloc::string::String>,
    /// Returns the code to sort results by. See scannerParameters xml response for details.
    #[prost(string, optional, tag = "4")]
    pub scan_code: ::core::option::Option<::prost::alloc::string::String>,
    /// Set the maximum MARK price to filter by.
    #[prost(double, optional, tag = "5")]
    pub above_price: ::core::option::Option<f64>,
    /// Set the minimum MARK price to filter by.
    #[prost(double, optional, tag = "6")]
    pub below_price: ::core::option::Option<f64>,
    /// Set the minimum trade volume of the day.
    #[prost(int64, optional, tag = "7")]
    pub above_volume: ::core::option::Option<i64>,
    /// Set the minimum market cap restriction.
    #[prost(double, optional, tag = "8")]
    pub market_cap_above: ::core::option::Option<f64>,
    /// Set the maximum market cap restriction.
    #[prost(double, optional, tag = "9")]
    pub market_cap_below: ::core::option::Option<f64>,
    /// Minimum Moody Rating.
    #[prost(string, optional, tag = "10")]
    pub moody_rating_above: ::core::option::Option<::prost::alloc::string::String>,
    /// Maximum Moody Rating.
    #[prost(string, optional, tag = "11")]
    pub moody_rating_below: ::core::option::Option<::prost::alloc::string::String>,
    /// Standard & Poor's (S&P) uses a letter-based rating system to evaluate the creditworthiness of bonds and debt issuers. This field will indicate the lowest acceptable rating to be returned from the result.
    #[prost(string, optional, tag = "12")]
    pub sp_rating_above: ::core::option::Option<::prost::alloc::string::String>,
    /// Standard & Poor's (S&P) uses a letter-based rating system to evaluate the creditworthiness of bonds and debt issuers. This field will indicate the highest acceptable rating to be returned from the result.
    #[prost(string, optional, tag = "13")]
    pub sp_rating_below: ::core::option::Option<::prost::alloc::string::String>,
    /// Set the minimum Maturity date. Formatted as YYYYMMDD.
    #[prost(string, optional, tag = "14")]
    pub maturity_date_above: ::core::option::Option<::prost::alloc::string::String>,
    /// Set the maximum Maturity date. Formatted as YYYYMMDD.
    #[prost(string, optional, tag = "15")]
    pub maturity_date_below: ::core::option::Option<::prost::alloc::string::String>,
    /// Set the minimum Coupon Rate.
    #[prost(double, optional, tag = "16")]
    pub coupon_rate_above: ::core::option::Option<f64>,
    /// Set the maximum Coupon Rate.
    #[prost(double, optional, tag = "17")]
    pub coupon_rate_below: ::core::option::Option<f64>,
    /// Determine of the bond should be convertible or not.
    #[prost(bool, optional, tag = "18")]
    pub exclude_convertible: ::core::option::Option<bool>,
    /// Determine the minimum average option volume from the underlying.
    #[prost(int64, optional, tag = "19")]
    pub average_option_volume_above: ::core::option::Option<i64>,
    /// TagValue pair to indicate scanner restrictions. Currently only supports TagValue("annualVolatility", true) or an empty list.
    #[prost(string, optional, tag = "20")]
    pub scanner_setting_pairs: ::core::option::Option<::prost::alloc::string::String>,
    /// Determine the stock type: Common, CORP, ADR, ETF, ETN, REIT, CEF, ETMF, EFN.
    #[prost(string, optional, tag = "21")]
    pub stock_type_filter: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(map = "string, string", tag = "22")]
    pub scanner_subscription_filter_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(map = "string, string", tag = "23")]
    pub scanner_subscription_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ManagedAccountsRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HistoricalNews {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Trigger time for the request. Formatted as HH:MM:ss (UTC assumed if timezone note set).
    #[prost(string, optional, tag = "2")]
    pub time: ::core::option::Option<::prost::alloc::string::String>,
    /// News provider code based on requested data.
    #[prost(string, optional, tag = "3")]
    pub provider_code: ::core::option::Option<::prost::alloc::string::String>,
    /// Identifier used to track the news article. See [EClient.reqNewsArticle](/tws-api/doc/news/news-articles/request-news-articles) for more details.
    #[prost(string, optional, tag = "4")]
    pub article_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Headline of the provided news article.
    #[prost(string, optional, tag = "5")]
    pub headline: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyRequest {
    /// Displays the third party API name.
    #[prost(string, optional, tag = "1")]
    pub api_name: ::core::option::Option<::prost::alloc::string::String>,
    /// Displays the Client Version of the API connection.
    #[prost(string, optional, tag = "2")]
    pub api_version: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HistoricalNewsEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Returns whether there is more data (true) or not (false).
    #[prost(bool, optional, tag = "2")]
    pub has_more: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountUpdateMultiEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SmartComponentsRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Identifier for the exchange with the best bid and offer.
    #[prost(string, optional, tag = "2")]
    pub bbo_exchange: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FamilyCodesRequest {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionDetailsEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeadTimestampRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
    #[prost(bool, optional, tag = "3")]
    pub use_rth: ::core::option::Option<bool>,
    /// Data source type.
    #[prost(string, optional, tag = "4")]
    pub what_to_show: ::core::option::Option<::prost::alloc::string::String>,
    /// Using 1 will return UTC time in YYYYMMDD-hh:mm:ss format. Using 2 will return epoch time.
    #[prost(int32, optional, tag = "5")]
    pub format_date: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickAttribLast {
    /// Indicate that a price is beyond the prior limit.
    #[prost(bool, optional, tag = "1")]
    pub past_limit: ::core::option::Option<bool>,
    /// Flag if the tick was initially unreported.
    #[prost(bool, optional, tag = "2")]
    pub unreported: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTickLast {
    /// The UNIX timestamp of the historical tick.
    #[prost(int64, optional, tag = "1")]
    pub time: ::core::option::Option<i64>,
    /// Tick attribs of historical last tick.
    #[prost(message, optional, tag = "2")]
    pub tick_attrib_last: ::core::option::Option<TickAttribLast>,
    /// The last price of the historical tick.
    #[prost(double, optional, tag = "3")]
    pub price: ::core::option::Option<f64>,
    /// The last size of the historical tick.
    #[prost(string, optional, tag = "4")]
    pub size: ::core::option::Option<::prost::alloc::string::String>,
    /// The source exchange of the historical tick.
    #[prost(string, optional, tag = "5")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// The conditions of the historical tick. Refer to [Trade Conditions](<https://www.interactivebrokers.com/en/index.php?f=7235>) page for more details.
    #[prost(string, optional, tag = "6")]
    pub special_conditions: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTick {
    /// Time affiliated with the trade.
    #[prost(int64, optional, tag = "1")]
    pub time: ::core::option::Option<i64>,
    /// Price affiliated with the trade.
    #[prost(double, optional, tag = "2")]
    pub price: ::core::option::Option<f64>,
    /// Size of the trade.
    #[prost(string, optional, tag = "3")]
    pub size: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TickByTickData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Type of data the tick represents.
    #[prost(int32, optional, tag = "2")]
    pub tick_type: ::core::option::Option<i32>,
    #[prost(oneof = "tick_by_tick_data::Tick", tags = "3, 4, 5")]
    pub tick: ::core::option::Option<tick_by_tick_data::Tick>,
}
/// Nested message and enum types in `TickByTickData`.
pub mod tick_by_tick_data {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Tick {
        /// Requesting the last trade price.
        #[prost(message, tag = "3")]
        HistoricalTickLast(super::HistoricalTickLast),
        /// Requesting bid and ask data.
        #[prost(message, tag = "4")]
        HistoricalTickBidAsk(super::HistoricalTickBidAsk),
        /// Requesting the midpoint between bid and ask values.
        #[prost(message, tag = "5")]
        HistoricalTickMidPoint(super::HistoricalTick),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SecDefOptParamsRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Symbol of the underlying contract.
    #[prost(string, optional, tag = "2")]
    pub underlying_symbol: ::core::option::Option<::prost::alloc::string::String>,
    /// The exchange on which the returned options are trading. Can be set to the empty string "" for all exchanges.
    #[prost(string, optional, tag = "3")]
    pub fut_fop_exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// Security or Asset type of the underlying contract.
    #[prost(string, optional, tag = "4")]
    pub underlying_sec_type: ::core::option::Option<::prost::alloc::string::String>,
    /// IBKR Contract Identifier of the underlying contract.
    #[prost(int32, optional, tag = "5")]
    pub underlying_con_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderCancel {
    /// Used by brokers and advisors when manually entering an order cancellation request. Format should be "YYYYMMDD-HH:mm:ss" using UTC as the timezone value.
    #[prost(string, optional, tag = "1")]
    pub manual_order_cancel_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Following [CME Rule 576](<https://www.cmegroup.com/rulebook/files/cme-group-Rule-576.pdf>), the ExtOperator field will signify the unique API operator at the time of trading for order management.
    #[prost(string, optional, tag = "2")]
    pub ext_operator: ::core::option::Option<::prost::alloc::string::String>,
    /// Following [CME Rule 576](<https://www.cmegroup.com/rulebook/files/cme-group-Rule-576.pdf>), the ManualOrderIndicator field will signify if an order is manual (1) or automated (0).
    #[prost(int32, optional, tag = "3")]
    pub manual_order_indicator: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelOrderRequest {
    /// The API client's order id.
    #[prost(int32, optional, tag = "1")]
    pub order_id: ::core::option::Option<i32>,
    /// An OrderCancel object that can receive the manualOrderCancelTime, manualOrderIndicator, and extOperator fields. See OrderCancel Reference for more insight on the [OrderCancel class](<https://www.interactivebrokers.com/docs/tws-api/ref/order-cancel>).
    #[prost(message, optional, tag = "2")]
    pub order_cancel: ::core::option::Option<OrderCancel>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PnLSingle {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The number of shares held for the contract.
    #[prost(string, optional, tag = "2")]
    pub position: ::core::option::Option<::prost::alloc::string::String>,
    /// Current day's total profit and loss.
    #[prost(double, optional, tag = "3")]
    pub daily_pn_l: ::core::option::Option<f64>,
    /// Unrealized profit and loss for the current day's trading session.
    #[prost(double, optional, tag = "4")]
    pub unrealized_pn_l: ::core::option::Option<f64>,
    /// Daily realized profit and loss on the position.
    #[prost(double, optional, tag = "5")]
    pub realized_pn_l: ::core::option::Option<f64>,
    /// Representative information for a given Key.
    #[prost(double, optional, tag = "6")]
    pub value: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AttachedOrders {
    /// Order identifier of the attached stop loss from presets.
    #[prost(int32, optional, tag = "1")]
    pub sl_order_id: ::core::option::Option<i32>,
    /// Order type for the attach stop loss from presets. Must be "PRESET".
    #[prost(string, optional, tag = "2")]
    pub sl_order_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Order ID for a preset profit taker order.
    #[prost(int32, optional, tag = "3")]
    pub pt_order_id: ::core::option::Option<i32>,
    /// Order type for the profit take. Must be "PRESET".
    #[prost(string, optional, tag = "4")]
    pub pt_order_type: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelMarketDepth {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// True to request market data from SMART rather than a direct exchange.
    #[prost(bool, optional, tag = "2")]
    pub is_smart_depth: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountSummaryRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Financial Advisor allocation group. Individual accounts should submit "All".
    #[prost(string, optional, tag = "2")]
    pub group: ::core::option::Option<::prost::alloc::string::String>,
    /// List of tags to retrieve details for.
    #[prost(string, optional, tag = "3")]
    pub tags: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HistoricalDataEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The start of the returned historical data. Formatted as "YYYYMMDD-HH:mm:ss" for UTC or "YYYYMMDD HH:mm:ss TMZ".
    #[prost(string, optional, tag = "2")]
    pub start_date_str: ::core::option::Option<::prost::alloc::string::String>,
    /// Indicates the final bar returned. Formatted as "YYYYMMDD-HH:mm:ss" for UTC or "YYYYMMDD HH:mm:ss TMZ".
    #[prost(string, optional, tag = "3")]
    pub end_date_str: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TickPrice {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Type of data the tick represents.
    #[prost(int32, optional, tag = "2")]
    pub tick_type: ::core::option::Option<i32>,
    /// The order's price.
    #[prost(double, optional, tag = "3")]
    pub price: ::core::option::Option<f64>,
    /// Represents volume of the order data.
    #[prost(string, optional, tag = "4")]
    pub size: ::core::option::Option<::prost::alloc::string::String>,
    /// Defines TickAttrib.canAutoExecute.
    #[prost(int32, optional, tag = "5")]
    pub attr_mask: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IdsRequest {
    /// This parameter will not affect the value returned to nextValidId but is required.
    #[prost(int32, optional, tag = "1")]
    pub num_ids: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelHistoricalData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Position {
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "1")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// The number of shares held.
    #[prost(string, optional, tag = "3")]
    pub position: ::core::option::Option<::prost::alloc::string::String>,
    /// Average cost of the overall position.
    #[prost(double, optional, tag = "4")]
    pub avg_cost: ::core::option::Option<f64>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PositionsRequest {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompletedOrdersRequest {
    /// Determines if only API orders should be returned or if TWS submitted orders should be included.
    #[prost(bool, optional, tag = "1")]
    pub api_only: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepthData {
    /// The ranking position in the DOM ladder.
    #[prost(int32, optional, tag = "1")]
    pub position: ::core::option::Option<i32>,
    /// Indicates a change in the row's value.
    #[prost(int32, optional, tag = "2")]
    pub operation: ::core::option::Option<i32>,
    /// 0 for ask, 1 for bid.
    #[prost(int32, optional, tag = "3")]
    pub side: ::core::option::Option<i32>,
    /// The order's price.
    #[prost(double, optional, tag = "4")]
    pub price: ::core::option::Option<f64>,
    /// Represents volume of the order data.
    #[prost(string, optional, tag = "5")]
    pub size: ::core::option::Option<::prost::alloc::string::String>,
    /// The exchange holding the order if isSmartDepth is True, otherwise the MPID of the market maker.
    #[prost(string, optional, tag = "6")]
    pub market_maker: ::core::option::Option<::prost::alloc::string::String>,
    /// True to request market data from SMART rather than a direct exchange.
    #[prost(bool, optional, tag = "7")]
    pub is_smart_depth: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractDescription {
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "1")]
    pub contract: ::core::option::Option<Contract>,
    /// Comma-separated list of available derivative security types.
    #[prost(string, repeated, tag = "2")]
    pub derivative_sec_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GlobalCancelRequest {
    /// An OrderCancel object that can receive the manualOrderCancelTime, manualOrderIndicator, and extOperator fields. See [OrderCancel](<https://www.interactivebrokers.com/docs/tws-api/ref/order-cancel>) for more insight on the OrderCancel class.
    #[prost(message, optional, tag = "1")]
    pub order_cancel: ::core::option::Option<OrderCancel>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalNewsRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The unique IB contract identifier.
    #[prost(int32, optional, tag = "2")]
    pub con_id: ::core::option::Option<i32>,
    /// A '+'-separated list of provider codes.
    #[prost(string, optional, tag = "3")]
    pub provider_codes: ::core::option::Option<::prost::alloc::string::String>,
    /// The datetime when the request should be submitted. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
    #[prost(string, optional, tag = "4")]
    pub start_date_time: ::core::option::Option<::prost::alloc::string::String>,
    /// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
    #[prost(string, optional, tag = "5")]
    pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Total number of news articles matching the request.
    #[prost(int32, optional, tag = "6")]
    pub total_results: ::core::option::Option<i32>,
    /// Reserved for internal use. Should be defined as null.
    #[prost(map = "string, string", tag = "7")]
    pub historical_news_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarketDataType {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Type of market data to retrieve. {1: 	"Live market data is streaming data relayed back in real time. Market data subscriptions are required to receive live market data.", 2: "Frozen market data is the last data recorded at market close.", 3: "Free, delayed data is 15 – 20 minutes delayed.", 4: "Requests delayed “frozen” data for a user without market data subscriptions."}.
    #[prost(int32, optional, tag = "2")]
    pub market_data_type: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelHistoricalTicks {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyMessageRequest {
    /// Displays data coming from a third party resource.
    #[prost(string, optional, tag = "1")]
    pub api_data: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SmartComponent {
    /// Bit number to uniquely distinguish value.
    #[prost(int32, optional, tag = "1")]
    pub bit_number: ::core::option::Option<i32>,
    /// The destination exchange.
    #[prost(string, optional, tag = "2")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// Exchange symbol value.
    #[prost(string, optional, tag = "3")]
    pub exchange_letter: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarketDataTypeRequest {
    /// Type of market data to retrieve.
    #[prost(int32, optional, tag = "1")]
    pub market_data_type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DepthMarketDataDescription {
    /// The destination exchange.
    #[prost(string, optional, tag = "1")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// The security's type: STK – stock (or ETF) OPT – option FUT – future IND – index FOP – futures option CASH – forex pair BAG – combo WAR – warrant BOND- bond CMDTY- commodity NEWS- news FUND- mutual fund.
    #[prost(string, optional, tag = "2")]
    pub sec_type: ::core::option::Option<::prost::alloc::string::String>,
    /// The primary exchange where the contract is listed.
    #[prost(string, optional, tag = "3")]
    pub listing_exch: ::core::option::Option<::prost::alloc::string::String>,
    /// A list containing all available exchanges offering market depth.
    #[prost(string, optional, tag = "4")]
    pub service_data_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Aggregated group Indicates the smart-routing group to which a contract belongs. contracts which cannot be smart-routed have aggGroup = -1.
    #[prost(int32, optional, tag = "5")]
    pub agg_group: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelMarketData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SoftDollarTiersRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrdersSmartRoutingConfig {
    /// Indicate an order should look for better pricing values beyond what was submitted.
    #[prost(bool, optional, tag = "1")]
    pub seek_price_improvement: ::core::option::Option<bool>,
    /// For orders submitted before the open, true ensures your orders are routed prior to the open. This directive only applies to stocks listed on a major exchange that are routed using IB SmartRouting.
    #[prost(bool, optional, tag = "2")]
    pub pre_open_reroute: ::core::option::Option<bool>,
    /// Declare that orders should not go through Interactive Brokers' Dark Pool.
    #[prost(bool, optional, tag = "3")]
    pub do_not_route_to_dark_pools: ::core::option::Option<bool>,
    /// Default routing algorith when submitting orders as Smart. Supports "SMART", "SMART MaxRebate", "SMART PreferRebate", "SMART PreferFill", "SMART MaxFill", "SMART Primary", "SMART VRebate", "SMART VLowFee", "SMART DarkOnly".
    #[prost(string, optional, tag = "4")]
    pub default_algorithm: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrdersConfig {
    /// Proto object containing data for how SMART routing should behave.
    #[prost(message, optional, tag = "1")]
    pub smart_routing: ::core::option::Option<OrdersSmartRoutingConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderCondition {
    /// Type of order condition to be used. Supported values include: Price: 1, Time: 3, Margin: 4, Execution: 5, Volume: 6, PercentChange: 7.
    #[prost(int32, optional, tag = "1")]
    pub r#type: ::core::option::Option<i32>,
    /// true to declare multiple conditions must be met (AND). False to declare any conidition should trigger conditional logic.
    #[prost(bool, optional, tag = "2")]
    pub is_conjunction_connection: ::core::option::Option<bool>,
    /// The order condition will trigger if greater than the indicated value.
    #[prost(bool, optional, tag = "3")]
    pub is_more: ::core::option::Option<bool>,
    /// The unique IB contract identifier.
    #[prost(int32, optional, tag = "4")]
    pub con_id: ::core::option::Option<i32>,
    /// The destination exchange.
    #[prost(string, optional, tag = "5")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// The underlying's asset symbol.
    #[prost(string, optional, tag = "6")]
    pub symbol: ::core::option::Option<::prost::alloc::string::String>,
    /// The security's type: STK – stock (or ETF) OPT – option FUT – future IND – index FOP – futures option CASH – forex pair BAG – combo WAR – warrant BOND- bond CMDTY- commodity NEWS- news FUND- mutual fund.
    #[prost(string, optional, tag = "7")]
    pub sec_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Value to reflect percentage change to trigger a condition.
    #[prost(int32, optional, tag = "8")]
    pub percent: ::core::option::Option<i32>,
    /// Decimal value representing change to trigger a condition.
    #[prost(double, optional, tag = "9")]
    pub change_percent: ::core::option::Option<f64>,
    /// The price for the condition to trigger.
    #[prost(double, optional, tag = "10")]
    pub price: ::core::option::Option<f64>,
    /// Specifies how the stop should trigger.
    #[prost(int32, optional, tag = "11")]
    pub trigger_method: ::core::option::Option<i32>,
    /// Trigger time for the request. Formatted as HH:MM:ss (UTC assumed if timezone note set).
    #[prost(string, optional, tag = "12")]
    pub time: ::core::option::Option<::prost::alloc::string::String>,
    /// The bar's traded volume (only returned for TRADES data).
    #[prost(int32, optional, tag = "13")]
    pub volume: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTicksLast {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// A list of HistoricalTickLast objects.
    #[prost(message, repeated, tag = "2")]
    pub historical_ticks_last: ::prost::alloc::vec::Vec<HistoricalTickLast>,
    /// Flag the end of historical data.
    #[prost(bool, optional, tag = "3")]
    pub is_done: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalDataBar {
    /// The start date of the bar's covered data.
    #[prost(string, optional, tag = "1")]
    pub date: ::core::option::Option<::prost::alloc::string::String>,
    /// The bar's open price.
    #[prost(double, optional, tag = "2")]
    pub open: ::core::option::Option<f64>,
    /// The bar's high price.
    #[prost(double, optional, tag = "3")]
    pub high: ::core::option::Option<f64>,
    /// The bar's low price.
    #[prost(double, optional, tag = "4")]
    pub low: ::core::option::Option<f64>,
    /// The bar's close price.
    #[prost(double, optional, tag = "5")]
    pub close: ::core::option::Option<f64>,
    /// The bar's traded volume if available (only available for TRADES).
    #[prost(string, optional, tag = "6")]
    pub volume: ::core::option::Option<::prost::alloc::string::String>,
    /// The bar's Weighted Average Price (only available for TRADES).
    #[prost(string, optional, tag = "7")]
    pub wap: ::core::option::Option<::prost::alloc::string::String>,
    /// The number of trades that took place through the course of trading.
    #[prost(int32, optional, tag = "8")]
    pub bar_count: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalDataUpdate {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Object representing Open, High, Low, Close, Volume, and Weighted Average Price over a given time period.
    #[prost(message, optional, tag = "2")]
    pub historical_data_bar: ::core::option::Option<HistoricalDataBar>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepthRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// The number of rows on each side of the order book.
    #[prost(int32, optional, tag = "3")]
    pub num_rows: ::core::option::Option<i32>,
    /// True to request market data from SMART rather than a direct exchange.
    #[prost(bool, optional, tag = "4")]
    pub is_smart_depth: ::core::option::Option<bool>,
    /// Internal use. Unique attributes for market data request.
    #[prost(map = "string, string", tag = "5")]
    pub market_depth_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTicks {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// A list of HistoricalTick objects.
    #[prost(message, repeated, tag = "2")]
    pub historical_ticks: ::prost::alloc::vec::Vec<HistoricalTick>,
    /// Flag the end of historical data.
    #[prost(bool, optional, tag = "3")]
    pub is_done: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SoftDollarTier {
    /// The name of the Soft Dollar Tier.
    #[prost(string, optional, tag = "1")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    /// The value of the Soft Dollar Tier.
    #[prost(string, optional, tag = "2")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
    /// The display name of the Soft Dollar Tier.
    #[prost(string, optional, tag = "3")]
    pub display_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Order {
    /// The API client id which placed the order.
    #[prost(int32, optional, tag = "1")]
    pub client_id: ::core::option::Option<i32>,
    /// The API client's order id.
    #[prost(int32, optional, tag = "2")]
    pub order_id: ::core::option::Option<i32>,
    /// The Host order identifier.
    #[prost(int64, optional, tag = "3")]
    pub perm_id: ::core::option::Option<i64>,
    /// The order ID of the parent order, used for bracket and auto trailing stop orders.
    #[prost(int32, optional, tag = "4")]
    pub parent_id: ::core::option::Option<i32>,
    /// Identifies the side. Supports BUY and SELL. IBExecution accounts may submit SSHORT and SLONG to denote an order as a short or long position.
    #[prost(string, optional, tag = "5")]
    pub action: ::core::option::Option<::prost::alloc::string::String>,
    /// The number of positions being bought/sold.
    #[prost(string, optional, tag = "6")]
    pub total_quantity: ::core::option::Option<::prost::alloc::string::String>,
    /// The publicly disclosed order size.
    #[prost(int32, optional, tag = "7")]
    pub display_size: ::core::option::Option<i32>,
    /// The order's type.
    #[prost(string, optional, tag = "8")]
    pub order_type: ::core::option::Option<::prost::alloc::string::String>,
    /// The limit price used for the order.
    #[prost(double, optional, tag = "9")]
    pub lmt_price: ::core::option::Option<f64>,
    /// Generic field to contain the stop price for STP LMT orders, trailing amount, etc.
    #[prost(double, optional, tag = "10")]
    pub aux_price: ::core::option::Option<f64>,
    /// The time in force. Valid values are: DAY – Valid for the day only. GTC – Good until canceled. The order will continue to work within the system and in the marketplace until it executes or is canceled. GTC orders will be automatically be cancelled under the following conditions: If a corporate action on a security results in a stock split (forward or reverse).
    #[prost(string, optional, tag = "11")]
    pub tif: ::core::option::Option<::prost::alloc::string::String>,
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "12")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Indicates the firm which will settle the trade. Institutions only.
    #[prost(string, optional, tag = "13")]
    pub settling_firm: ::core::option::Option<::prost::alloc::string::String>,
    /// Specifies the true beneficiary of the order. For IBExecution customers. This value is required for FUT/FOP orders for reporting to the exchange.
    #[prost(string, optional, tag = "14")]
    pub clearing_account: ::core::option::Option<::prost::alloc::string::String>,
    /// For execution-only clients to know where do they want their shares to be cleared at. Valid values are: IB.
    #[prost(string, optional, tag = "15")]
    pub clearing_intent: ::core::option::Option<::prost::alloc::string::String>,
    /// Indicates whether or not all the order has to be filled on a single execution.
    #[prost(bool, optional, tag = "16")]
    pub all_or_none: ::core::option::Option<bool>,
    /// If set to true, flags the order as a Block Order. A Block Order is a large volume limit order with a minimum of 50 contracts.
    #[prost(bool, optional, tag = "17")]
    pub block_order: ::core::option::Option<bool>,
    /// If set to true, the order will not be visible when viewing the market depth. This option only applies to orders routed to the NASDAQ exchange.
    #[prost(bool, optional, tag = "18")]
    pub hidden: ::core::option::Option<bool>,
    /// If set to true, allows orders to also trigger or fill outside of regular trading hours.
    #[prost(bool, optional, tag = "19")]
    pub outside_rth: ::core::option::Option<bool>,
    /// An order that identifies the best price and the exact quantity offered/available at the price, and transmits the corresponding portion of your order for immediate execution. Simultaneously it is identifying the next best price and quantity offered/available, and submits the matching quantity of your order for immediate execution.
    #[prost(bool, optional, tag = "20")]
    pub sweep_to_fill: ::core::option::Option<bool>,
    /// The percent offset amount for relative orders.
    #[prost(double, optional, tag = "21")]
    pub percent_offset: ::core::option::Option<f64>,
    /// Specifies the trailing amount of a trailing stop order as a percentage. Observe the following guidelines when using the trailingPercent field: Guidelines * This field is mutually exclusive with the existing trailing amount. That is, the API client can send one or the other but not both. * This field is read AFTER the stop price (barrier price) as follows: deltaNeutralAuxPrice stopPrice, trailingPercent, scale order attributes. * The field will also be sent to the API in the openOrder message if the API client version is >= 56. It is sent after the stopPrice field as follows: stopPrice, trailingPct, basisPoint.
    #[prost(double, optional, tag = "22")]
    pub trailing_percent: ::core::option::Option<f64>,
    /// Trail stop price for TRAIL LIMIT orders.
    #[prost(double, optional, tag = "23")]
    pub trail_stop_price: ::core::option::Option<f64>,
    /// Identifies a minimum quantity order type.
    #[prost(int32, optional, tag = "24")]
    pub min_qty: ::core::option::Option<i32>,
    /// Specifies the date and time after which the order will be active. Format: yyyymmdd hh:mm:ss {optional Timezone}.
    #[prost(string, optional, tag = "25")]
    pub good_after_time: ::core::option::Option<::prost::alloc::string::String>,
    /// The date and time when the order should cancel if not already filled. Only valid for orders using the "GTD" tif. Users that would prefer to specify a number of seconds should use the Duration parameter instead. Both values cannot be specified at the same time.
    #[prost(string, optional, tag = "26")]
    pub good_till_date: ::core::option::Option<::prost::alloc::string::String>,
    /// One-Cancels-All group identifier.
    #[prost(string, optional, tag = "27")]
    pub oca_group: ::core::option::Option<::prost::alloc::string::String>,
    /// The custom order identifer.
    #[prost(string, optional, tag = "28")]
    pub order_ref: ::core::option::Option<::prost::alloc::string::String>,
    /// Individual = 'I' Agency = 'A' AgentOtherMember = 'W' IndividualPTIA = 'J' AgencyPTIA = 'U' AgentOtherMemberPTIA = 'M' IndividualPT = 'K' AgencyPT = 'Y' AgentOtherMemberPT = 'N'.
    #[prost(string, optional, tag = "29")]
    pub rule80_a: ::core::option::Option<::prost::alloc::string::String>,
    /// Tells how to handle remaining orders in an OCA group when one order or part of an order executes. Valid values are: 1 – Cancel all remaining orders with block. 2 – Remaining orders are proportionately reduced in size with block. 3 – Remaining orders are proportionately reduced in size with no block. If you use a value "with block" it gives the order overfill protection. This means that only one order in the group will be routed at a time to remove the possibility of an overfill.
    #[prost(int32, optional, tag = "30")]
    pub oca_type: ::core::option::Option<i32>,
    /// Defines how a stop order should trigger. Supported Trigger Methods: {0: "Default", 1: "Double Bid/Ask", 2: "Last", 3: "Double Last", 4: "Bid/Ask", 7: "Last or Bid/Ask", 8: "Mid-point"}.
    #[prost(int32, optional, tag = "31")]
    pub trigger_method: ::core::option::Option<i32>,
    /// Defines the start time of GTC orders.
    #[prost(string, optional, tag = "32")]
    pub active_start_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Defines the stop time of GTC orders.
    #[prost(string, optional, tag = "33")]
    pub active_stop_time: ::core::option::Option<::prost::alloc::string::String>,
    /// The Financial Advisor group the trade will be allocated to. Use an empty string if not applicable.
    #[prost(string, optional, tag = "34")]
    pub fa_group: ::core::option::Option<::prost::alloc::string::String>,
    /// The Financial Advisor allocation method the trade will be allocated to. Use an empty string if not applicable.
    #[prost(string, optional, tag = "35")]
    pub fa_method: ::core::option::Option<::prost::alloc::string::String>,
    /// The Financial Advisor percentage concerning the trade's allocation. Use an empty string if not applicable.
    #[prost(string, optional, tag = "36")]
    pub fa_percentage: ::core::option::Option<::prost::alloc::string::String>,
    /// The implied volatility to use for calculating the option price.
    #[prost(double, optional, tag = "37")]
    pub volatility: ::core::option::Option<f64>,
    /// Values include: 1 – Daily Volatility 2 – Annual Volatility.
    #[prost(int32, optional, tag = "38")]
    pub volatility_type: ::core::option::Option<i32>,
    /// Specifies whether TWS will automatically update the limit price of the order as the underlying price moves. VOL orders only.
    #[prost(bool, optional, tag = "39")]
    pub continuous_update: ::core::option::Option<bool>,
    /// Specifies how you want TWS to calculate the limit price for options.
    #[prost(int32, optional, tag = "40")]
    pub reference_price_type: ::core::option::Option<i32>,
    /// Enter an order type to instruct TWS to submit a delta neutral trade on full or partial execution of the VOL order. VOL orders only.
    #[prost(string, optional, tag = "41")]
    pub delta_neutral_order_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Use this field to enter a value if the value in the deltaNeutralOrderType field is an order type that requires an Aux price.
    #[prost(double, optional, tag = "42")]
    pub delta_neutral_aux_price: ::core::option::Option<f64>,
    /// The unique contract identifier specifying the security in Delta Neutral order.
    #[prost(int32, optional, tag = "43")]
    pub delta_neutral_con_id: ::core::option::Option<i32>,
    /// Specifies whether the order is an Open or a Close order and is used when the hedge involves a CFD and and the order is clearing away.
    #[prost(string, optional, tag = "44")]
    pub delta_neutral_open_close: ::core::option::Option<::prost::alloc::string::String>,
    /// Used when the hedge involves a stock and indicates whether or not it is sold short.
    #[prost(bool, optional, tag = "45")]
    pub delta_neutral_short_sale: ::core::option::Option<bool>,
    /// Indicates a short sale Delta Neutral order. Has a value of 1 (the clearing broker holds shares) or 2 (delivered from a third party).
    #[prost(int32, optional, tag = "46")]
    pub delta_neutral_short_sale_slot: ::core::option::Option<i32>,
    /// Identifies third party order origin. Used only when deltaNeutralShortSaleSlot = 2.
    #[prost(string, optional, tag = "47")]
    pub delta_neutral_designated_location: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Defines the size of the first order to be scaled.
    #[prost(int32, optional, tag = "48")]
    pub scale_init_level_size: ::core::option::Option<i32>,
    /// Defines the order size of the subsequent scale order components. For Scale orders only. Used in conjunction with scaleInitLevelSize().
    #[prost(int32, optional, tag = "49")]
    pub scale_subs_level_size: ::core::option::Option<i32>,
    /// Defines the price increment between scale components. For Scale orders only. This value is compulsory.
    #[prost(double, optional, tag = "50")]
    pub scale_price_increment: ::core::option::Option<f64>,
    /// Modifies the value of the Scale order. For extended Scale orders.
    #[prost(double, optional, tag = "51")]
    pub scale_price_adjust_value: ::core::option::Option<f64>,
    /// Specifies the interval when the price is adjusted. For extended Scale orders.
    #[prost(int32, optional, tag = "52")]
    pub scale_price_adjust_interval: ::core::option::Option<i32>,
    /// Specifies the offset when to adjust profit. For extended scale orders.
    #[prost(double, optional, tag = "53")]
    pub scale_profit_offset: ::core::option::Option<f64>,
    /// Restarts the Scale series if the order is cancelled. For extended scale orders.
    #[prost(bool, optional, tag = "54")]
    pub scale_auto_reset: ::core::option::Option<bool>,
    /// The initial position of the Scale order. For extended scale orders.
    #[prost(int32, optional, tag = "55")]
    pub scale_init_position: ::core::option::Option<i32>,
    /// Specifies the initial quantity to be filled. For extended scale orders.
    #[prost(int32, optional, tag = "56")]
    pub scale_init_fill_qty: ::core::option::Option<i32>,
    /// Defines the random percent by which to adjust the position. For extended scale orders.
    #[prost(bool, optional, tag = "57")]
    pub scale_random_percent: ::core::option::Option<bool>,
    /// The list of scale orders. Used for scale orders.
    #[prost(string, optional, tag = "58")]
    pub scale_table: ::core::option::Option<::prost::alloc::string::String>,
    /// For hedge orders. Possible values include: D – Delta B – Beta F – FX P – Pair.
    #[prost(string, optional, tag = "59")]
    pub hedge_type: ::core::option::Option<::prost::alloc::string::String>,
    /// For hedge orders. Beta x for Beta hedge orders.
    #[prost(string, optional, tag = "60")]
    pub hedge_param: ::core::option::Option<::prost::alloc::string::String>,
    /// The algorithm strategy. ArrivalPx – Arrival Price DarkIce – Dark Ice PctVol – Percentage of Volume Twap – TWAP (Time Weighted Average Price) Vwap – VWAP (Volume Weighted Average Price).
    #[prost(string, optional, tag = "61")]
    pub algo_strategy: ::core::option::Option<::prost::alloc::string::String>,
    /// The list of parameters for the IB algorithm.
    #[prost(map = "string, string", tag = "62")]
    pub algo_params: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Identifies orders generated by algorithmic trading.
    #[prost(string, optional, tag = "63")]
    pub algo_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Hash map to define how the combination of orders should route.
    #[prost(map = "string, string", tag = "64")]
    pub smart_combo_routing_params: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Allows to retrieve the commissions and margin information without submitting an order.
    #[prost(bool, optional, tag = "65")]
    pub what_if: ::core::option::Option<bool>,
    /// Specifies whether the order will be transmitted by TWS. If set to false, the order will be created at TWS but will not be sent. Users implementing directly from Protobuf should be aware that Transmit should be implicitly set to 'true' when placing orders to transmit an order.
    #[prost(bool, optional, tag = "66")]
    pub transmit: ::core::option::Option<bool>,
    /// Overrides TWS price constraints. Precautionary constraints are defined on the TWS Presets page.
    #[prost(bool, optional, tag = "67")]
    pub override_percentage_constraints: ::core::option::Option<bool>,
    /// For institutional customers only. Valid values are O (open) and C (close). Available for institutional clients to determine if this order is to open or close a position. When Action = "BUY" and OpenClose = "O" this will open a new position. When Action = "BUY" and OpenClose = "C" this will close and existing short position.
    #[prost(string, optional, tag = "68")]
    pub open_close: ::core::option::Option<::prost::alloc::string::String>,
    /// The order's origin. Same as TWS "Origin" column. Identifies the type of customer from which the order originated. Valid values are:0 – Customer 1 – Firm.
    #[prost(int32, optional, tag = "69")]
    pub origin: ::core::option::Option<i32>,
    /// For institutions only. Valid values are: 1 – Broker holds shares 2 – Shares come from elsewhere.
    #[prost(int32, optional, tag = "70")]
    pub short_sale_slot: ::core::option::Option<i32>,
    /// For institutions only. Indicates the location where the shares to short come from. Used only when short sale slot is set to 2 (which means that the shares to short are held elsewhere and not with IB).
    #[prost(string, optional, tag = "71")]
    pub designated_location: ::core::option::Option<::prost::alloc::string::String>,
    /// Only available with IB Execution-Only accounts with applicable securities. Mark order as exempt from short sale uptick rule.
    #[prost(int32, optional, tag = "72")]
    pub exempt_code: ::core::option::Option<i32>,
    /// Indicates the firm which will settle the Delta Neutral trade. Institutions only.
    #[prost(string, optional, tag = "73")]
    pub delta_neutral_settling_firm: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Specifies the beneficiary of the Delta Neutral order.
    #[prost(string, optional, tag = "74")]
    pub delta_neutral_clearing_account: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Specifies where the clients want their shares to be cleared at. Must be specified by execution-only clients. Valid values are: IB.
    #[prost(string, optional, tag = "75")]
    pub delta_neutral_clearing_intent: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// The amount off the limit price allowed for discretionary orders.
    #[prost(double, optional, tag = "76")]
    pub discretionary_amt: ::core::option::Option<f64>,
    /// Use to opt out of default SmartRouting for orders routed directly to ASX. This attribute defaults to false unless explicitly set to true.
    #[prost(bool, optional, tag = "77")]
    pub opt_out_smart_routing: ::core::option::Option<bool>,
    /// The auction's starting price. For BOX orders only.
    #[prost(double, optional, tag = "78")]
    pub starting_price: ::core::option::Option<f64>,
    /// The stock's reference price. The reference price is used for VOL orders to compute the limit price sent to an exchange (whether or not Continuous Update is selected).
    #[prost(double, optional, tag = "79")]
    pub stock_ref_price: ::core::option::Option<f64>,
    /// The stock's Delta. For orders on BOX only.
    #[prost(double, optional, tag = "80")]
    pub delta: ::core::option::Option<f64>,
    /// The lower value for the acceptable underlying stock price range. For price improvement option orders on BOX and VOL orders with dynamic management.
    #[prost(double, optional, tag = "81")]
    pub stock_range_lower: ::core::option::Option<f64>,
    /// The upper value for the acceptable underlying stock price range. For price improvement option orders on BOX and VOL orders with dynamic management.
    #[prost(double, optional, tag = "82")]
    pub stock_range_upper: ::core::option::Option<f64>,
    /// Orders routed to IBDARK are tagged as "post only" and are held in IB's order book.
    #[prost(bool, optional, tag = "83")]
    pub not_held: ::core::option::Option<bool>,
    /// For internal use only. Use the default value XYZ.
    #[prost(map = "string, string", tag = "84")]
    pub order_misc_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// The Solicited field should be used for orders initiated or recommended by the broker or adviser that were approved by the client (by phone, email, chat, verbally, etc.) prior to entry. Please note that orders that the adviser or broker placed without specifically discussing with the client are discretionary orders, not solicited.
    #[prost(bool, optional, tag = "85")]
    pub solicited: ::core::option::Option<bool>,
    /// Randomizes the order's size. Only for Volatility and Pegged to Volatility orders.
    #[prost(bool, optional, tag = "86")]
    pub randomize_size: ::core::option::Option<bool>,
    /// Randomizes the order's price. Only for Volatility and Pegged to Volatility orders.
    #[prost(bool, optional, tag = "87")]
    pub randomize_price: ::core::option::Option<bool>,
    /// Pegged-to-benchmark orders: this attribute will contain the conId of the contract against which the order will be pegged.
    #[prost(int32, optional, tag = "88")]
    pub reference_contract_id: ::core::option::Option<i32>,
    /// Pegged-to-benchmark orders: amount by which the order's pegged price should move.
    #[prost(double, optional, tag = "89")]
    pub pegged_change_amount: ::core::option::Option<f64>,
    /// Pegged-to-benchmark orders: indicates whether the order's pegged price should increase or decreases.
    #[prost(bool, optional, tag = "90")]
    pub is_pegged_change_amount_decrease: ::core::option::Option<bool>,
    /// Pegged-to-benchmark orders: the amount the reference contract needs to move to adjust the pegged order.
    #[prost(double, optional, tag = "91")]
    pub reference_change_amount: ::core::option::Option<f64>,
    /// Pegged-to-benchmark orders: the exchange identifer for the contract pegged to.
    #[prost(string, optional, tag = "92")]
    pub reference_exchange_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Adjusted Stop orders: the parent order will be adjusted to the given type when the adjusted trigger price is penetrated.
    #[prost(string, optional, tag = "93")]
    pub adjusted_order_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Adjusted Stop orders: specifies the trigger price to execute.
    #[prost(double, optional, tag = "94")]
    pub trigger_price: ::core::option::Option<f64>,
    /// Adjusted Stop orders: specifies the stop price of the adjusted (STP) parent.
    #[prost(double, optional, tag = "95")]
    pub adjusted_stop_price: ::core::option::Option<f64>,
    /// Adjusted Stop orders: specifies the stop limit price of the adjusted (STPL LMT) parent.
    #[prost(double, optional, tag = "96")]
    pub adjusted_stop_limit_price: ::core::option::Option<f64>,
    /// Adjusted Stop orders: specifies the trailing amount of the adjusted (TRAIL) parent.
    #[prost(double, optional, tag = "97")]
    pub adjusted_trailing_amount: ::core::option::Option<f64>,
    /// Adjusted Stop orders: specifies where the trailing unit is an amount (set to 0) or a percentage (set to 1).
    #[prost(int32, optional, tag = "98")]
    pub adjustable_trailing_unit: ::core::option::Option<i32>,
    /// Adjusted Stop orders: specifies the price offset for the stop to move in increments.
    #[prost(double, optional, tag = "99")]
    pub lmt_price_offset: ::core::option::Option<f64>,
    /// Conditions determining when the order will be activated or canceled.
    #[prost(message, repeated, tag = "100")]
    pub conditions: ::prost::alloc::vec::Vec<OrderCondition>,
    /// Conditions can determine if an order should become active or canceled.
    #[prost(bool, optional, tag = "101")]
    pub conditions_cancel_order: ::core::option::Option<bool>,
    /// Indicates whether or not conditions will also be valid outside Regular Trading Hours.
    #[prost(bool, optional, tag = "102")]
    pub conditions_ignore_rth: ::core::option::Option<bool>,
    /// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
    #[prost(string, optional, tag = "103")]
    pub model_code: ::core::option::Option<::prost::alloc::string::String>,
    /// Following CME Rule 576, the ExtOperator field will signify if the unique API operator at the time of trading for order management.
    #[prost(string, optional, tag = "104")]
    pub ext_operator: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "105")]
    pub soft_dollar_tier: ::core::option::Option<SoftDollarTier>,
    /// The native cash quantity.
    #[prost(double, optional, tag = "106")]
    pub cash_qty: ::core::option::Option<f64>,
    /// Identifies a person as the responsible party for investment decisions within the firm. Orders covered by MiFID 2 (Markets in Financial Instruments Directive 2) must include either Mifid2DecisionMaker or Mifid2DecisionAlgo field (but not both).
    #[prost(string, optional, tag = "107")]
    pub mifid2_decision_maker: ::core::option::Option<::prost::alloc::string::String>,
    /// Identifies the algorithm responsible for investment decisions within the firm. Orders covered under MiFID 2 must include either Mifid2DecisionMaker or Mifid2DecisionAlgo.
    #[prost(string, optional, tag = "108")]
    pub mifid2_decision_algo: ::core::option::Option<::prost::alloc::string::String>,
    /// For MiFID 2 reporting; identifies a person as the responsible party for the execution of a transaction within the firm.
    #[prost(string, optional, tag = "109")]
    pub mifid2_execution_trader: ::core::option::Option<::prost::alloc::string::String>,
    /// For MiFID 2 reporting; identifies the algorithm responsible for the execution of a transaction within the firm.
    #[prost(string, optional, tag = "110")]
    pub mifid2_execution_algo: ::core::option::Option<::prost::alloc::string::String>,
    /// Don't use automatic pricing for hedge orders.
    #[prost(bool, optional, tag = "111")]
    pub dont_use_auto_price_for_hedge: ::core::option::Option<bool>,
    /// Set to true to create tickets from API orders when TWS is used as an OMS.
    #[prost(bool, optional, tag = "112")]
    pub is_oms_container: ::core::option::Option<bool>,
    /// Set to true to convert order of type 'Primary Peg' to 'D-Peg'.
    #[prost(bool, optional, tag = "113")]
    pub discretionary_up_to_limit_price: ::core::option::Option<bool>,
    /// Specifies the date to auto cancel the order.
    #[prost(string, optional, tag = "114")]
    pub auto_cancel_date: ::core::option::Option<::prost::alloc::string::String>,
    /// Specifies the initial order quantity to be filled.
    #[prost(string, optional, tag = "115")]
    pub filled_quantity: ::core::option::Option<::prost::alloc::string::String>,
    /// Identifies the reference future conId.
    #[prost(int32, optional, tag = "116")]
    pub ref_futures_con_id: ::core::option::Option<i32>,
    /// Cancels the parent order if child order was cancelled.
    #[prost(bool, optional, tag = "117")]
    pub auto_cancel_parent: ::core::option::Option<bool>,
    /// Identifies the Shareholder.
    #[prost(string, optional, tag = "118")]
    pub shareholder: ::core::option::Option<::prost::alloc::string::String>,
    /// Used to specify "imbalance only open orders" or "imbalance only closing orders".
    #[prost(bool, optional, tag = "119")]
    pub imbalance_only: ::core::option::Option<bool>,
    /// Routes market order to Best Bid Offer.
    #[prost(int32, optional, tag = "120")]
    pub route_marketable_to_bbo: ::core::option::Option<i32>,
    /// Parent's permanent order Id.
    #[prost(int64, optional, tag = "121")]
    pub parent_perm_id: ::core::option::Option<i64>,
    /// Specifies wether to use Price Management Algo. CTCI users only.
    #[prost(int32, optional, tag = "122")]
    pub use_price_mgmt_algo: ::core::option::Option<i32>,
    /// Specifies the number of seconds the order should remain active. For GTD orders only. Users that would prefer to specify an exact date should user the "GoodTillDate" parameter instead. Both values cannot be specified at the same time.
    #[prost(int32, optional, tag = "123")]
    pub duration: ::core::option::Option<i32>,
    /// List your order on the IBKR Alternative Trading System.
    #[prost(int32, optional, tag = "124")]
    pub post_to_ats: ::core::option::Option<i32>,
    /// Accepts a string with parameters obtained from advancedOrderRejectJson.
    #[prost(string, optional, tag = "125")]
    pub advanced_error_override: ::core::option::Option<::prost::alloc::string::String>,
    /// Used by brokers and advisors when manually entering an order request. Format should be "YYYYMMDD-HH:mm:ss" using UTC as the timezone value.
    #[prost(string, optional, tag = "126")]
    pub manual_order_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Defines the minimum trade quantity to fill. For IBKRATS orders.
    #[prost(int32, optional, tag = "127")]
    pub min_trade_qty: ::core::option::Option<i32>,
    /// Defines the minimum size to compete. For IBKRATS orders.
    #[prost(int32, optional, tag = "128")]
    pub min_compete_size: ::core::option::Option<i32>,
    /// Specifies the offset Off The Midpoint that will be applied to the order. For IBKRATS orders.
    #[prost(double, optional, tag = "129")]
    pub compete_against_best_offset: ::core::option::Option<f64>,
    /// This offset is applied when the spread is an even number of cents wide. This offset must be in whole-penny increments or zero. For IBKRATS orders.
    #[prost(double, optional, tag = "130")]
    pub mid_offset_at_whole: ::core::option::Option<f64>,
    /// This offset is applied when the spread is an odd number of cents wide. This offset must be in half-penny increments. For IBKRATS orders.
    #[prost(double, optional, tag = "131")]
    pub mid_offset_at_half: ::core::option::Option<f64>,
    /// Required for Nondisclosed Omnibus Accounts. A unique identifier for each account within the Omnibus structure to signify the account holder being traded. Best practice (Not Required): clients should look to hash this value, using something along the lines of 5 digits of SHA1 of the account number. This should not be implemented for non-omnibus accounts.
    #[prost(string, optional, tag = "132")]
    pub customer_account: ::core::option::Option<::prost::alloc::string::String>,
    /// Identify the order as a full time, professional trader.
    #[prost(bool, optional, tag = "133")]
    pub professional_customer: ::core::option::Option<bool>,
    /// Defines the interest acrrual of the bond.
    #[prost(string, optional, tag = "134")]
    pub bond_accrued_interest: ::core::option::Option<::prost::alloc::string::String>,
    /// Specify if the order should include overnight trading or not. False (no Overnight) is set by default.
    #[prost(bool, optional, tag = "135")]
    pub include_overnight: ::core::option::Option<bool>,
    /// Following CME Rule 576, the ManualOrderIndicator field will signify if an order is manual (1) or automated (0).
    #[prost(int32, optional, tag = "136")]
    pub manual_order_indicator: ::core::option::Option<i32>,
    /// Define the user that submitted the order.
    #[prost(string, optional, tag = "137")]
    pub submitter: ::core::option::Option<::prost::alloc::string::String>,
    /// Determines if the order is Active (False) or Deactivated (True). Orders that are deactivated are not submitted and will not execute, though they can be reviewed and transmitted via API, Trader Workstation, or Client Portal. This is unique from the Transmit field as orders submitted as Transmit=False will not leave the current TWS instance, and will be erased upon logout. Deactivated orders will persist internally at Interactive Brokers.
    #[prost(bool, optional, tag = "138")]
    pub deactivate: ::core::option::Option<bool>,
    /// If set to true, when there is non-displayed liquidity at the same price point, the order price is adjusted low (for a buy) or higher (for a sell) by one penny to avoid taking that liquidity. If the order comes in at a price higher (for a buy) or lower (for a sell) than an order already sitting on the book, it becomes an IOC (immediate-or-cancel) order at the better price.
    #[prost(bool, optional, tag = "139")]
    pub post_only: ::core::option::Option<bool>,
    /// Set to true to allow orders to participate in the pre-open session from 4:00 - 9:30 am.
    #[prost(bool, optional, tag = "140")]
    pub allow_pre_open: ::core::option::Option<bool>,
    /// Set to true ignore the opening auction.
    #[prost(bool, optional, tag = "141")]
    pub ignore_open_auction: ::core::option::Option<bool>,
    /// Set to true to seek a better price than that submitted with the order.
    #[prost(int32, optional, tag = "142")]
    pub seek_price_improvement: ::core::option::Option<i32>,
    /// {0: Full order check, 1: Check margin requirements of the order, 2: Internal use only., 3: Projected destination for auto-routing. Internal use only., 4: Disregards trading hours. Internal use only., 7: Records display of Japan mutual fund prospectus. Internal use only., 8: Commission-only calculation. Internal use only. }.
    #[prost(int32, optional, tag = "143")]
    pub what_if_type: ::core::option::Option<i32>,
    /// hedgeMaxSize (also referred to as "Max Hedging Size") is a user-supplied parameter that caps the maximum number of shares that can be shorted in a beta hedge child order. It provides an upper bound for risk and credit assessment purposes. Applied only to beta hedge orders (sell side only) for stocks in IB- cleared accounts.
    #[prost(int32, optional, tag = "144")]
    pub hedge_max_size: ::core::option::Option<i32>,
    /// Declares that order conditions should be followed when includeOvernight=True.
    #[prost(bool, optional, tag = "145")]
    pub conditions_include_overnight: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderAllocation {
    /// References the Account ID, i.e. U1234567, being allocated to.
    #[prost(string, optional, tag = "1")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// References the current position of the account being allocated to.
    #[prost(string, optional, tag = "2")]
    pub position: ::core::option::Option<::prost::alloc::string::String>,
    /// States the full position increase intended by the current trade.
    #[prost(string, optional, tag = "3")]
    pub position_desired: ::core::option::Option<::prost::alloc::string::String>,
    /// Size of the position once the order has been allocated.
    #[prost(string, optional, tag = "4")]
    pub position_after: ::core::option::Option<::prost::alloc::string::String>,
    /// Reference the quantity to increase by based on allocation.
    #[prost(string, optional, tag = "5")]
    pub desired_alloc_qty: ::core::option::Option<::prost::alloc::string::String>,
    /// References the maximum allowed quantity increase.
    #[prost(string, optional, tag = "6")]
    pub allowed_alloc_qty: ::core::option::Option<::prost::alloc::string::String>,
    /// Denotes whether the order is a monetary allocation (true) or whole share allocation (false).
    #[prost(bool, optional, tag = "7")]
    pub is_monetary: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderState {
    /// The order's current status.
    #[prost(string, optional, tag = "1")]
    pub status: ::core::option::Option<::prost::alloc::string::String>,
    /// The account's current initial margin.
    #[prost(double, optional, tag = "2")]
    pub init_margin_before: ::core::option::Option<f64>,
    /// The account's current maintenance margin.
    #[prost(double, optional, tag = "3")]
    pub maint_margin_before: ::core::option::Option<f64>,
    /// The account's current equity with loan.
    #[prost(double, optional, tag = "4")]
    pub equity_with_loan_before: ::core::option::Option<f64>,
    /// The change of the account's initial margin.
    #[prost(double, optional, tag = "5")]
    pub init_margin_change: ::core::option::Option<f64>,
    /// The change of the account's maintenance margin.
    #[prost(double, optional, tag = "6")]
    pub maint_margin_change: ::core::option::Option<f64>,
    /// The change of the account's equity with loan.
    #[prost(double, optional, tag = "7")]
    pub equity_with_loan_change: ::core::option::Option<f64>,
    /// The order's impact on the account's initial margin.
    #[prost(double, optional, tag = "8")]
    pub init_margin_after: ::core::option::Option<f64>,
    /// The order's impact on the account's maintenance margin.
    #[prost(double, optional, tag = "9")]
    pub maint_margin_after: ::core::option::Option<f64>,
    /// Shows the impact the order would have on the account's equity with loan.
    #[prost(double, optional, tag = "10")]
    pub equity_with_loan_after: ::core::option::Option<f64>,
    /// Additional order cost for fees and commissions.
    #[prost(double, optional, tag = "11")]
    pub commission_and_fees: ::core::option::Option<f64>,
    /// Lowest possible commission and fee value for the order.
    #[prost(double, optional, tag = "12")]
    pub min_commission_and_fees: ::core::option::Option<f64>,
    /// Highest possible commission and fee value for the order.
    #[prost(double, optional, tag = "13")]
    pub max_commission_and_fees: ::core::option::Option<f64>,
    /// Type of currency representing commissions and fee values.
    #[prost(string, optional, tag = "14")]
    pub commission_and_fees_currency: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Type of currency representing margin values.
    #[prost(string, optional, tag = "15")]
    pub margin_currency: ::core::option::Option<::prost::alloc::string::String>,
    /// The account's expected initial margin outside of regular trading hours.
    #[prost(double, optional, tag = "16")]
    pub init_margin_before_outside_rth: ::core::option::Option<f64>,
    /// The account's expected maintenance margin outside of regular trading hours.
    #[prost(double, optional, tag = "17")]
    pub maint_margin_before_outside_rth: ::core::option::Option<f64>,
    /// The account's expected equity with loan outside of regular trading hours.
    #[prost(double, optional, tag = "18")]
    pub equity_with_loan_before_outside_rth: ::core::option::Option<f64>,
    /// The expected change of the account's initial margin outside of regular trading hours.
    #[prost(double, optional, tag = "19")]
    pub init_margin_change_outside_rth: ::core::option::Option<f64>,
    /// The expected change of the account's maintenance margin outside of regular trading hours.
    #[prost(double, optional, tag = "20")]
    pub maint_margin_change_outside_rth: ::core::option::Option<f64>,
    /// The expected change of the account's equity with loan outside of regular trading hours.
    #[prost(double, optional, tag = "21")]
    pub equity_with_loan_change_outside_rth: ::core::option::Option<f64>,
    /// The order's expected impact on the account's initial margin outside of regular trading hours.
    #[prost(double, optional, tag = "22")]
    pub init_margin_after_outside_rth: ::core::option::Option<f64>,
    /// The order's expected impact on the account's maintenance margin outside of regular trading hours.
    #[prost(double, optional, tag = "23")]
    pub maint_margin_after_outside_rth: ::core::option::Option<f64>,
    /// Shows the expected impact the order would have on the account's equity with loan outside of regular trading hours.
    #[prost(double, optional, tag = "24")]
    pub equity_with_loan_after_outside_rth: ::core::option::Option<f64>,
    /// Suggested size of the order based on account balances.
    #[prost(string, optional, tag = "25")]
    pub suggested_size: ::core::option::Option<::prost::alloc::string::String>,
    /// Audit trail details for why the order was rejected.
    #[prost(string, optional, tag = "26")]
    pub reject_reason: ::core::option::Option<::prost::alloc::string::String>,
    /// Proto object containing order allocation behaviors.
    #[prost(message, repeated, tag = "27")]
    pub order_allocations: ::prost::alloc::vec::Vec<OrderAllocation>,
    /// If the order is warranted, a descriptive message will be provided.
    #[prost(string, optional, tag = "28")]
    pub warning_text: ::core::option::Option<::prost::alloc::string::String>,
    /// Time when the order was completed.
    #[prost(string, optional, tag = "29")]
    pub completed_time: ::core::option::Option<::prost::alloc::string::String>,
    /// The current status of the order. Supports "Inactive", "PendingSubmit", "PreSubmitted", "Submitted", "Filled", "PendingCancel", "PreCancelled", "Cancelled", "WarnState".
    #[prost(string, optional, tag = "30")]
    pub completed_status: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpenOrder {
    /// The API client's order id.
    #[prost(int32, optional, tag = "1")]
    pub order_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// The currently active Order.
    #[prost(message, optional, tag = "3")]
    pub order: ::core::option::Option<Order>,
    /// The order's OrderState.
    #[prost(message, optional, tag = "4")]
    pub order_state: ::core::option::Option<OrderState>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScannerSubscriptionRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// A scanner subscription objection containing all details required to request scanner data.
    #[prost(message, optional, tag = "2")]
    pub scanner_subscription: ::core::option::Option<ScannerSubscription>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsBulletin {
    /// Unique identifier to track a given news article.
    #[prost(int32, optional, tag = "1")]
    pub news_msg_id: ::core::option::Option<i32>,
    /// Bulletin type to define a given article.
    #[prost(int32, optional, tag = "2")]
    pub news_msg_type: ::core::option::Option<i32>,
    /// Content of a given news article.
    #[prost(string, optional, tag = "3")]
    pub news_message: ::core::option::Option<::prost::alloc::string::String>,
    /// Exchange reporting a bulletin.
    #[prost(string, optional, tag = "4")]
    pub originating_exch: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelScannerSubscription {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IneligibilityReason {
    /// The order's unique identifier. If a new order is placed with an order ID less than or equal to the order ID of a previous order an error will occur.
    #[prost(string, optional, tag = "1")]
    pub id: ::core::option::Option<::prost::alloc::string::String>,
    /// Description of the contract.
    #[prost(string, optional, tag = "2")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsProvider {
    /// News provider code based on requested data.
    #[prost(string, optional, tag = "1")]
    pub provider_code: ::core::option::Option<::prost::alloc::string::String>,
    /// Cites the source producing the news article.
    #[prost(string, optional, tag = "2")]
    pub provider_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarketRuleRequest {
    /// Market Rule ID requested.
    #[prost(int32, optional, tag = "1")]
    pub market_rule_id: ::core::option::Option<i32>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelNewsBulletins {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelHistogramData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelPnL {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickString {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Type of data the tick represents.
    #[prost(int32, optional, tag = "2")]
    pub tick_type: ::core::option::Option<i32>,
    /// Representative information for a given Key.
    #[prost(string, optional, tag = "3")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepth {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Market depth price attributes.
    #[prost(message, optional, tag = "2")]
    pub market_depth_data: ::core::option::Option<MarketDepthData>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepthL2 {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Market depth price attributes.
    #[prost(message, optional, tag = "2")]
    pub market_depth_data: ::core::option::Option<MarketDepthData>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountDataEnd {
    /// The account identifier.
    #[prost(string, optional, tag = "1")]
    pub account_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderStatus {
    /// The API client's order id.
    #[prost(int32, optional, tag = "1")]
    pub order_id: ::core::option::Option<i32>,
    /// Current status of the order.
    #[prost(string, optional, tag = "2")]
    pub status: ::core::option::Option<::prost::alloc::string::String>,
    /// Number of shares filled.
    #[prost(string, optional, tag = "3")]
    pub filled: ::core::option::Option<::prost::alloc::string::String>,
    /// The remaining shares of the order.
    #[prost(string, optional, tag = "4")]
    pub remaining: ::core::option::Option<::prost::alloc::string::String>,
    /// Average execution price of shares in the order.
    #[prost(double, optional, tag = "5")]
    pub avg_fill_price: ::core::option::Option<f64>,
    /// The Host order identifier.
    #[prost(int64, optional, tag = "6")]
    pub perm_id: ::core::option::Option<i64>,
    /// The order ID of the parent order, used for bracket and auto trailing stop orders.
    #[prost(int32, optional, tag = "7")]
    pub parent_id: ::core::option::Option<i32>,
    /// Price at which the last positions were filled.
    #[prost(double, optional, tag = "8")]
    pub last_fill_price: ::core::option::Option<f64>,
    /// The API client id which placed the order.
    #[prost(int32, optional, tag = "9")]
    pub client_id: ::core::option::Option<i32>,
    /// Indication of why an order was held.
    #[prost(string, optional, tag = "10")]
    pub why_held: ::core::option::Option<::prost::alloc::string::String>,
    /// If an order has been capped, this indicates the current capped price.
    #[prost(double, optional, tag = "11")]
    pub mkt_cap_price: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SymbolSamples {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Object containing a Contract and a list of supported Derivative Security Types available.
    #[prost(message, repeated, tag = "2")]
    pub contract_descriptions: ::prost::alloc::vec::Vec<ContractDescription>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelPnLSingle {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelContractData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelAccountSummary {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelCalculateOptionPrice {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SecDefOptParameterEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HeadTimestamp {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Value identifying earliest data date.
    #[prost(string, optional, tag = "2")]
    pub head_timestamp: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountUpdateTime {
    /// Epoch timestamp of the response.
    #[prost(string, optional, tag = "1")]
    pub time_stamp: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompletedOrder {
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "1")]
    pub contract: ::core::option::Option<Contract>,
    /// The [Order](<https://www.interactivebrokers.com/docs/tws-api/ref/order>) details of the completed orders.
    #[prost(message, optional, tag = "2")]
    pub order: ::core::option::Option<Order>,
    /// The current [Order State](<https://www.interactivebrokers.com/docs/tws-api/ref/order-state>) details of the Order.
    #[prost(message, optional, tag = "3")]
    pub order_state: ::core::option::Option<OrderState>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MessageConfig {
    /// The order's unique identifier. If a new order is placed with an order ID less than or equal to the order ID of a previous order an error will occur.
    #[prost(int32, optional, tag = "1")]
    pub id: ::core::option::Option<i32>,
    /// Message headline or summary.
    #[prost(string, optional, tag = "2")]
    pub title: ::core::option::Option<::prost::alloc::string::String>,
    /// The news bulletin context.
    #[prost(string, optional, tag = "3")]
    pub message: ::core::option::Option<::prost::alloc::string::String>,
    /// Default action for handling the message. Supports "Yes", "No", and "Hidden".
    #[prost(string, optional, tag = "4")]
    pub default_action: ::core::option::Option<::prost::alloc::string::String>,
    /// Declare that the message should be enabled to warn based on given actions.
    #[prost(bool, optional, tag = "5")]
    pub enabled: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CurrentTime {
    /// 10 digit timestamp indicating current Epoch timestamp with second precision.
    #[prost(int64, optional, tag = "1")]
    pub current_time: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FaRequest {
    /// Receive the faDataType value specified in the requestFA. See [FA Data Types](#fa-data-types).
    #[prost(int32, optional, tag = "1")]
    pub fa_data_type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserInfo {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Company identifier for white branded integrations.
    #[prost(string, optional, tag = "2")]
    pub white_branding_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickReqParams {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Minimum number of ticks returned.
    #[prost(string, optional, tag = "2")]
    pub min_tick: ::core::option::Option<::prost::alloc::string::String>,
    /// Identifier for the exchange with the best bid and offer.
    #[prost(string, optional, tag = "3")]
    pub bbo_exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// Market data permissions to retrieve instrument data.
    #[prost(int32, optional, tag = "4")]
    pub snapshot_permissions: ::core::option::Option<i32>,
    /// The decimal precision for supported prices.
    #[prost(string, optional, tag = "5")]
    pub last_price_precision: ::core::option::Option<::prost::alloc::string::String>,
    /// The decimal precision supported for order sizes.
    #[prost(string, optional, tag = "6")]
    pub last_size_precision: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReceiveFa {
    /// Receive the faDataType value specified in the requestFA. See [FA Data Types](#fa-data-types).
    #[prost(int32, optional, tag = "1")]
    pub fa_data_type: ::core::option::Option<i32>,
    /// String Representation of an XML document.
    #[prost(string, optional, tag = "2")]
    pub xml: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LockAndExitConfig {
    /// Define the 12-hour time to logoff or restart. Formatted as "HH:MM".
    #[prost(string, optional, tag = "1")]
    pub auto_logoff_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Declare "AM" or "PM" for your logout time.
    #[prost(string, optional, tag = "2")]
    pub auto_logoff_period: ::core::option::Option<::prost::alloc::string::String>,
    /// Declare if the system should "logoff" or "restart" at the defined time.
    #[prost(string, optional, tag = "3")]
    pub auto_logoff_type: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigResponse {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// API Settings configuration for the "Lock and Exit" Global Configuration page.
    #[prost(message, optional, tag = "2")]
    pub lock_and_exit: ::core::option::Option<LockAndExitConfig>,
    /// Complementary messages identifying settings.
    #[prost(message, repeated, tag = "3")]
    pub messages: ::prost::alloc::vec::Vec<MessageConfig>,
    /// Host object of all Global Configuration -> API sub-menu settings.
    #[prost(message, optional, tag = "4")]
    pub api: ::core::option::Option<ApiConfig>,
    /// Order configuration settings from the Global Configuration.
    #[prost(message, optional, tag = "5")]
    pub orders: ::core::option::Option<OrdersConfig>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelWshMetaData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickNews {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Epoch timestamp of the response.
    #[prost(int64, optional, tag = "2")]
    pub timestamp: ::core::option::Option<i64>,
    /// News provider code based on requested data.
    #[prost(string, optional, tag = "3")]
    pub provider_code: ::core::option::Option<::prost::alloc::string::String>,
    /// Identifier used to track the news article. See [EClient.reqNewsArticle](/tws-api/doc/news/news-articles/request-news-articles) for more details.
    #[prost(string, optional, tag = "4")]
    pub article_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Headline of the provided news article.
    #[prost(string, optional, tag = "5")]
    pub headline: ::core::option::Option<::prost::alloc::string::String>,
    /// Returns any additional data available about the article.
    #[prost(string, optional, tag = "6")]
    pub extra_data: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RealTimeBarsRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// Currently being ignored.
    #[prost(int32, optional, tag = "3")]
    pub bar_size: ::core::option::Option<i32>,
    /// Data source type.
    #[prost(string, optional, tag = "4")]
    pub what_to_show: ::core::option::Option<::prost::alloc::string::String>,
    /// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
    #[prost(bool, optional, tag = "5")]
    pub use_rth: ::core::option::Option<bool>,
    /// Internal use. Flag special behavior or properties for real time bar rquests.
    #[prost(map = "string, string", tag = "6")]
    pub real_time_bars_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WshEventDataRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The unique IB contract identifier.
    #[prost(int32, optional, tag = "2")]
    pub con_id: ::core::option::Option<i32>,
    /// The filter criteria used to determine which execution reports are returned.
    #[prost(string, optional, tag = "3")]
    pub filter: ::core::option::Option<::prost::alloc::string::String>,
    /// Automatically fill in values from your watchlist.
    #[prost(bool, optional, tag = "4")]
    pub fill_watchlist: ::core::option::Option<bool>,
    /// Automatically fill in values from your portfolio.
    #[prost(bool, optional, tag = "5")]
    pub fill_portfolio: ::core::option::Option<bool>,
    /// Automatically fill in competitor values of existing positions.
    #[prost(bool, optional, tag = "6")]
    pub fill_competitors: ::core::option::Option<bool>,
    /// The earliest starting point of the request. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
    #[prost(string, optional, tag = "7")]
    pub start_date: ::core::option::Option<::prost::alloc::string::String>,
    /// Specify the end date of the event requests. Formatted as "YYYYMMDD".
    #[prost(string, optional, tag = "8")]
    pub end_date: ::core::option::Option<::prost::alloc::string::String>,
    /// Maximum number of WSH Events that may be returned.
    #[prost(int32, optional, tag = "9")]
    pub total_limit: ::core::option::Option<i32>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PositionEnd {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Execution {
    /// The API client's order Id. May not be unique to an account.
    #[prost(int32, optional, tag = "1")]
    pub order_id: ::core::option::Option<i32>,
    /// The execution's identifier. Each partial fill has a separate ExecId. A correction is indicated by an ExecId which differs from a previous ExecId in only the digits after the final period.
    #[prost(string, optional, tag = "2")]
    pub exec_id: ::core::option::Option<::prost::alloc::string::String>,
    /// The execution's server time.
    #[prost(string, optional, tag = "3")]
    pub time: ::core::option::Option<::prost::alloc::string::String>,
    /// The account to which the order was allocated.
    #[prost(string, optional, tag = "4")]
    pub acct_number: ::core::option::Option<::prost::alloc::string::String>,
    /// The exchange where the execution took place.
    #[prost(string, optional, tag = "5")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// Specifies if the transaction was buy or sale BOT for bought.
    #[prost(string, optional, tag = "6")]
    pub side: ::core::option::Option<::prost::alloc::string::String>,
    /// The number of shares filled.
    #[prost(string, optional, tag = "7")]
    pub shares: ::core::option::Option<::prost::alloc::string::String>,
    /// The order's execution price excluding commissions.
    #[prost(double, optional, tag = "8")]
    pub price: ::core::option::Option<f64>,
    /// The TWS order identifier. The PermId can be 0 for trades originating outside IB.
    #[prost(int64, optional, tag = "9")]
    pub perm_id: ::core::option::Option<i64>,
    /// The API client identifier which placed the order which originated this execution.
    #[prost(int32, optional, tag = "10")]
    pub client_id: ::core::option::Option<i32>,
    /// Indicates the order was triggered as an IB Liquidation.
    #[prost(bool, optional, tag = "11")]
    pub is_liquidation: ::core::option::Option<bool>,
    /// Cumulative quantity. Used in regular trades.
    #[prost(string, optional, tag = "12")]
    pub cum_qty: ::core::option::Option<::prost::alloc::string::String>,
    /// Average price. Used in regular trades.
    #[prost(double, optional, tag = "13")]
    pub avg_price: ::core::option::Option<f64>,
    /// The OrderRef is a user-customizable string that can be set from the API or TWS and will be associated with an order for its lifetime.
    #[prost(string, optional, tag = "14")]
    pub order_ref: ::core::option::Option<::prost::alloc::string::String>,
    /// The Economic Value Rule name and the respective optional argument. The two values should be separated by a colon.
    #[prost(string, optional, tag = "15")]
    pub ev_rule: ::core::option::Option<::prost::alloc::string::String>,
    /// Tells you approximately how much the market value of a contract would change if the price were to change by 1. It cannot be used to get market value by multiplying the price by the approximate multiplier.
    #[prost(double, optional, tag = "16")]
    pub ev_multiplier: ::core::option::Option<f64>,
    /// Identifier of the financial advisor's model.
    #[prost(string, optional, tag = "17")]
    pub model_code: ::core::option::Option<::prost::alloc::string::String>,
    /// The liquidity type of the execution.
    #[prost(int32, optional, tag = "18")]
    pub last_liquidity: ::core::option::Option<i32>,
    /// Indicates the price the order executed as may be changed.
    #[prost(bool, optional, tag = "19")]
    pub is_price_revision_pending: ::core::option::Option<bool>,
    /// Username that placed the executing order.
    #[prost(string, optional, tag = "20")]
    pub submitter: ::core::option::Option<::prost::alloc::string::String>,
    /// Flags the type of exercise that traded the order.
    #[prost(int32, optional, tag = "21")]
    pub opt_exercise_or_lapse_type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramDataRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
    #[prost(bool, optional, tag = "3")]
    pub use_rth: ::core::option::Option<bool>,
    /// Range of time covered by historgram.
    #[prost(string, optional, tag = "4")]
    pub time_period: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractDetails {
    /// The market name for this product.
    #[prost(string, optional, tag = "1")]
    pub market_name: ::core::option::Option<::prost::alloc::string::String>,
    /// The minimum allowed price variation. Note that many securities vary their minimum tick size according to their price. This value will only show the smallest of the different minimum tick sizes regardless of the product's price. Full information about the minimum increment price structure can be obtained with the reqMarketRule function or the IB Contract and Security Search site.
    #[prost(string, optional, tag = "2")]
    pub min_tick: ::core::option::Option<::prost::alloc::string::String>,
    /// Supported order types for this product.
    #[prost(string, optional, tag = "3")]
    pub order_types: ::core::option::Option<::prost::alloc::string::String>,
    /// Valid exchange fields when placing an order for this contract.
    #[prost(string, optional, tag = "4")]
    pub valid_exchanges: ::core::option::Option<::prost::alloc::string::String>,
    /// Price scaling indicating distinction of the market data or order prices against the traded currency. As an example, SHEL@LSE maintains a currency in Great British Pounds; however, quotes are displayed in Pence, so the displayed price is 100x (magnified) what an order is submitted as.
    #[prost(int32, optional, tag = "5")]
    pub price_magnifier: ::core::option::Option<i32>,
    /// Underlying contract identifier for our derivative contract.
    #[prost(int32, optional, tag = "6")]
    pub under_con_id: ::core::option::Option<i32>,
    /// Descriptive name of the product.
    #[prost(string, optional, tag = "7")]
    pub long_name: ::core::option::Option<::prost::alloc::string::String>,
    /// The contract month of the underlying for a Future contract.
    #[prost(string, optional, tag = "8")]
    pub contract_month: ::core::option::Option<::prost::alloc::string::String>,
    /// The industry classification of the underlying/product.
    #[prost(string, optional, tag = "9")]
    pub industry: ::core::option::Option<::prost::alloc::string::String>,
    /// The industry category of the underlying.
    #[prost(string, optional, tag = "10")]
    pub category: ::core::option::Option<::prost::alloc::string::String>,
    /// The industry subcategory of the underlying.
    #[prost(string, optional, tag = "11")]
    pub subcategory: ::core::option::Option<::prost::alloc::string::String>,
    /// The time zone for the trading hours of the product.
    #[prost(string, optional, tag = "12")]
    pub time_zone_id: ::core::option::Option<::prost::alloc::string::String>,
    /// The trading hours of the product. This value will contain the trading hours of the current day as well as the next's.
    #[prost(string, optional, tag = "13")]
    pub trading_hours: ::core::option::Option<::prost::alloc::string::String>,
    /// The liquid hours of the product. This value will contain the liquid hours (regular trading hours) of the contract on the specified exchange.
    #[prost(string, optional, tag = "14")]
    pub liquid_hours: ::core::option::Option<::prost::alloc::string::String>,
    /// Contains the Economic Value Rule name and the respective optional argument. The two values should be separated by a colon.
    #[prost(string, optional, tag = "15")]
    pub ev_rule: ::core::option::Option<::prost::alloc::string::String>,
    /// Tells you approximately how much the market value of a contract would change if the price were to change by 1. It cannot be used to get market value by multiplying the price by the approximate multiplier.
    #[prost(double, optional, tag = "16")]
    pub ev_multiplier: ::core::option::Option<f64>,
    /// A list of contract identifiers that the customer is allowed to view. CUSIP/ISIN/etc. For US stocks.
    #[prost(map = "string, string", tag = "17")]
    pub sec_id_list: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Aggregated group Indicates the smart-routing group to which a contract belongs. contracts which cannot be smart-routed have aggGroup = -1.
    #[prost(int32, optional, tag = "18")]
    pub agg_group: ::core::option::Option<i32>,
    /// Underlying contract's symbol for our derivative contract.
    #[prost(string, optional, tag = "19")]
    pub under_symbol: ::core::option::Option<::prost::alloc::string::String>,
    /// Underlying contract's security type (STK, IND) for our derivative contract.
    #[prost(string, optional, tag = "20")]
    pub under_sec_type: ::core::option::Option<::prost::alloc::string::String>,
    /// The list of market rule IDs separated by comma Market rule IDs can be used to determine the minimum price increment at a given price.
    #[prost(string, optional, tag = "21")]
    pub market_rule_ids: ::core::option::Option<::prost::alloc::string::String>,
    /// Expiration date for the contract in contrast to the last trading date.
    #[prost(string, optional, tag = "22")]
    pub real_expiration_date: ::core::option::Option<::prost::alloc::string::String>,
    /// Stock type: Common, CORP, ADR, ETF, ETN, REIT, CEF, ETMF, EFN.
    #[prost(string, optional, tag = "23")]
    pub stock_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Order's minimal size.
    #[prost(string, optional, tag = "24")]
    pub min_size: ::core::option::Option<::prost::alloc::string::String>,
    /// Order's size increment.
    #[prost(string, optional, tag = "25")]
    pub size_increment: ::core::option::Option<::prost::alloc::string::String>,
    /// Order's suggested size increment.
    #[prost(string, optional, tag = "26")]
    pub suggested_size_increment: ::core::option::Option<::prost::alloc::string::String>,
    /// Fund's name.
    #[prost(string, optional, tag = "27")]
    pub fund_name: ::core::option::Option<::prost::alloc::string::String>,
    /// Fund's family.
    #[prost(string, optional, tag = "28")]
    pub fund_family: ::core::option::Option<::prost::alloc::string::String>,
    /// Fund's type.
    #[prost(string, optional, tag = "29")]
    pub fund_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Fund's front load.
    #[prost(string, optional, tag = "30")]
    pub fund_front_load: ::core::option::Option<::prost::alloc::string::String>,
    /// Fund's back load.
    #[prost(string, optional, tag = "31")]
    pub fund_back_load: ::core::option::Option<::prost::alloc::string::String>,
    /// Fund's back load time interval.
    #[prost(string, optional, tag = "32")]
    pub fund_back_load_time_interval: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Fund's management fee.
    #[prost(string, optional, tag = "33")]
    pub fund_management_fee: ::core::option::Option<::prost::alloc::string::String>,
    /// Fund closed flag.
    #[prost(bool, optional, tag = "34")]
    pub fund_closed: ::core::option::Option<bool>,
    /// Fund closed for new investors flag.
    #[prost(bool, optional, tag = "35")]
    pub fund_closed_for_new_investors: ::core::option::Option<bool>,
    /// Fund closed for new money flag.
    #[prost(bool, optional, tag = "36")]
    pub fund_closed_for_new_money: ::core::option::Option<bool>,
    /// Fund's notify amount.
    #[prost(string, optional, tag = "37")]
    pub fund_notify_amount: ::core::option::Option<::prost::alloc::string::String>,
    /// Fund's minimum initial purchase.
    #[prost(string, optional, tag = "38")]
    pub fund_minimum_initial_purchase: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Minimum purchase for additional fund contracts.
    #[prost(string, optional, tag = "39")]
    pub fund_minimum_subsequent_purchase: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Home state for the fund's Blue Sky filing.
    #[prost(string, optional, tag = "40")]
    pub fund_blue_sky_states: ::core::option::Option<::prost::alloc::string::String>,
    /// Home territory for the fund's Blue Sky filing.
    #[prost(string, optional, tag = "41")]
    pub fund_blue_sky_territories: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Fund's distribution policy indicator.
    #[prost(string, optional, tag = "42")]
    pub fund_distribution_policy_indicator: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Fund's asset type.
    #[prost(string, optional, tag = "43")]
    pub fund_asset_type: ::core::option::Option<::prost::alloc::string::String>,
    /// The nine-character bond CUSIP. For Bonds only. Receiving CUSIPs requires a CUSIP market data subscription.
    #[prost(string, optional, tag = "44")]
    pub cusip: ::core::option::Option<::prost::alloc::string::String>,
    /// The date the bond was issued. This field is currently not available from the TWS API. For Bonds only. Not currently implemented due to bond market data restrictions.
    #[prost(string, optional, tag = "45")]
    pub issue_date: ::core::option::Option<::prost::alloc::string::String>,
    /// Identifies the credit rating of the issuer. This field is not currently available from the TWS API. For Bonds only. A higher credit rating generally indicates a less risky investment. Bond ratings are from Moody's and S&P respectively. Not currently implemented due to bond market data restrictions.
    #[prost(string, optional, tag = "46")]
    pub ratings: ::core::option::Option<::prost::alloc::string::String>,
    /// The type of bond.
    #[prost(string, optional, tag = "47")]
    pub bond_type: ::core::option::Option<::prost::alloc::string::String>,
    /// The interest rate used to calculate the amount you will receive in interest payments over the course of the year. This field is currently not available from the TWS API. For Bonds only.
    #[prost(double, optional, tag = "48")]
    pub coupon: ::core::option::Option<f64>,
    /// The type of bond coupon. This field is currently not available from the TWS API. For Bonds only.
    #[prost(string, optional, tag = "49")]
    pub coupon_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Indicates a debt instrument that can be converted into stock (equity) at a predetermined time at the discretion of the bondholder.
    #[prost(bool, optional, tag = "50")]
    pub convertible: ::core::option::Option<bool>,
    /// Indicates a debt security that lets the issuer buy back or redeem the principal before the scheduled maturity date.
    #[prost(bool, optional, tag = "51")]
    pub callable: ::core::option::Option<bool>,
    /// Indicates a debt security that lets the bondholder require the issuer to repurchase the bond at specified dates before its maturity.
    #[prost(bool, optional, tag = "52")]
    pub puttable: ::core::option::Option<bool>,
    /// A description string containing further descriptive information about the bond. For Bonds only.
    #[prost(string, optional, tag = "53")]
    pub desc_append: ::core::option::Option<::prost::alloc::string::String>,
    /// Only if bond has embedded options. This field is currently not available from the TWS API. Refers to callable bonds and puttable bonds. Available in TWS description window for bonds.
    #[prost(string, optional, tag = "54")]
    pub next_option_date: ::core::option::Option<::prost::alloc::string::String>,
    /// Type of embedded option. This field is currently not available from the TWS API. Only if bond has embedded options.
    #[prost(string, optional, tag = "55")]
    pub next_option_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Only if bond has embedded options. This field is currently not available from the TWS API. For Bonds only.
    #[prost(bool, optional, tag = "56")]
    pub next_option_partial: ::core::option::Option<bool>,
    /// Additional context regarding bond behavior.
    #[prost(string, optional, tag = "57")]
    pub bond_notes: ::core::option::Option<::prost::alloc::string::String>,
    /// List of details why the account cannot trade the given security.
    #[prost(message, repeated, tag = "58")]
    pub ineligibility_reason_list: ::prost::alloc::vec::Vec<IneligibilityReason>,
    /// Event Contract's topic.
    #[prost(string, optional, tag = "59")]
    pub event_contract1: ::core::option::Option<::prost::alloc::string::String>,
    /// Event contract's strike, expiry, and right.
    #[prost(string, optional, tag = "60")]
    pub event_contract_description1: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Complete event contract question.
    #[prost(string, optional, tag = "61")]
    pub event_contract_description2: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// Smallest order quantity for an algorithmic order.
    #[prost(string, optional, tag = "62")]
    pub min_algo_size: ::core::option::Option<::prost::alloc::string::String>,
    /// Decimal level rounding for the contract.
    #[prost(string, optional, tag = "63")]
    pub last_price_precision: ::core::option::Option<::prost::alloc::string::String>,
    /// Floating point rounding for order sizes.
    #[prost(string, optional, tag = "64")]
    pub last_size_precision: ::core::option::Option<::prost::alloc::string::String>,
    /// How a product may settle on expiry. Supports "Physical" and "Cash".
    #[prost(string, optional, tag = "65")]
    pub settlement_method: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PositionMulti {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "2")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "3")]
    pub contract: ::core::option::Option<Contract>,
    /// The number of shares held.
    #[prost(string, optional, tag = "4")]
    pub position: ::core::option::Option<::prost::alloc::string::String>,
    /// Average cost of the overall position.
    #[prost(double, optional, tag = "5")]
    pub avg_cost: ::core::option::Option<f64>,
    /// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
    #[prost(string, optional, tag = "6")]
    pub model_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WshMetaData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Json formatted data containing WSH details.
    #[prost(string, optional, tag = "2")]
    pub data_json: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateDisplayGroupRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The encoded value that uniquely represents the contract in IB. Possible values include:\[none: empty selection, contractID@exchange: any non-combination contract., combo: if any combo is selected.\].
    #[prost(string, optional, tag = "2")]
    pub contract_info: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelWshEventData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaceOrderRequest {
    /// The API client's order id.
    #[prost(int32, optional, tag = "1")]
    pub order_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// The currently active Order.
    #[prost(message, optional, tag = "3")]
    pub order: ::core::option::Option<Order>,
    /// Attached Take Profit and Stop Loss order identifiers.
    #[prost(message, optional, tag = "4")]
    pub attached_orders: ::core::option::Option<AttachedOrders>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PnL {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Current day's total profit and loss.
    #[prost(double, optional, tag = "2")]
    pub daily_pn_l: ::core::option::Option<f64>,
    /// Unrealized profit and loss for the current day's trading session.
    #[prost(double, optional, tag = "3")]
    pub unrealized_pn_l: ::core::option::Option<f64>,
    /// Daily realized profit and loss on the position.
    #[prost(double, optional, tag = "4")]
    pub realized_pn_l: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HistoricalSession {
    /// The datetime when the request should be submitted. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
    #[prost(string, optional, tag = "1")]
    pub start_date_time: ::core::option::Option<::prost::alloc::string::String>,
    /// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
    #[prost(string, optional, tag = "2")]
    pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Reference date for the bar.
    #[prost(string, optional, tag = "3")]
    pub ref_date: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalSchedule {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The datetime when the request should be submitted. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
    #[prost(string, optional, tag = "2")]
    pub start_date_time: ::core::option::Option<::prost::alloc::string::String>,
    /// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
    #[prost(string, optional, tag = "3")]
    pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Timezone of the schedule request.
    #[prost(string, optional, tag = "4")]
    pub time_zone: ::core::option::Option<::prost::alloc::string::String>,
    /// An array of objects containing Start, End, and Ref Date.
    #[prost(message, repeated, tag = "5")]
    pub historical_sessions: ::prost::alloc::vec::Vec<HistoricalSession>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionDetails {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// The Execution Object details.
    #[prost(message, optional, tag = "3")]
    pub execution: ::core::option::Option<Execution>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeToGroupEventsRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The identifier for a set of groups to receive data from.
    #[prost(int32, optional, tag = "2")]
    pub group_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderBound {
    /// The Host order identifier.
    #[prost(int64, optional, tag = "1")]
    pub perm_id: ::core::option::Option<i64>,
    /// The API client id which placed the order.
    #[prost(int32, optional, tag = "2")]
    pub client_id: ::core::option::Option<i32>,
    /// The API client's order id.
    #[prost(int32, optional, tag = "3")]
    pub order_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetServerLogLevelRequest {
    /// Internal use. Declare level of logging from server.
    #[prost(int32, optional, tag = "1")]
    pub log_level: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SmartComponents {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Exchange mapping identifiers (such as "a6" or "a9") used in the TWS API via the reqSmartComponents function to decode single-letter exchange routing codes and aggregate multi-venue quotes.
    #[prost(message, repeated, tag = "2")]
    pub smart_components: ::prost::alloc::vec::Vec<SmartComponent>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StartApiRequest {
    /// The API client id which placed the order.
    #[prost(int32, optional, tag = "1")]
    pub client_id: ::core::option::Option<i32>,
    /// Additional behavior triggers when connecting the API.
    #[prost(string, optional, tag = "2")]
    pub optional_capabilities: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompletedOrdersEnd {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDataRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// Comma separated ids of the available generic ticks.
    #[prost(string, optional, tag = "3")]
    pub generic_tick_list: ::core::option::Option<::prost::alloc::string::String>,
    /// Indicate that a snapshot should be requested rather than a data stream.
    #[prost(bool, optional, tag = "4")]
    pub snapshot: ::core::option::Option<bool>,
    /// Set to True for a paid, regulatory snapshot or False for live data.
    #[prost(bool, optional, tag = "5")]
    pub regulatory_snapshot: ::core::option::Option<bool>,
    /// Internal use. Unique attributes for market data request.
    #[prost(map = "string, string", tag = "6")]
    pub market_data_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TickByTickRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// Type of data the tick represents.
    #[prost(string, optional, tag = "3")]
    pub tick_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Number of distinct data points. Max is 1000 per request.
    #[prost(int32, optional, tag = "4")]
    pub number_of_ticks: ::core::option::Option<i32>,
    /// Omit updates that reflect only changes in size, and not price. Applicable to Bid\_Ask data requests.
    #[prost(bool, optional, tag = "5")]
    pub ignore_size: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryDisplayGroupsRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PriceIncrement {
    /// The minimum value for triggering the affiliate increment.
    #[prost(double, optional, tag = "1")]
    pub low_edge: ::core::option::Option<f64>,
    /// The change in price or size value.
    #[prost(double, optional, tag = "2")]
    pub increment: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NextValidId {
    /// The API client's order id.
    #[prost(int32, optional, tag = "1")]
    pub order_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateConfigWarning {
    /// Unique identifier for the setting.
    #[prost(int32, optional, tag = "1")]
    pub message_id: ::core::option::Option<i32>,
    /// Message headline or summary.
    #[prost(string, optional, tag = "2")]
    pub title: ::core::option::Option<::prost::alloc::string::String>,
    /// The news bulletin context.
    #[prost(string, optional, tag = "3")]
    pub message: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsArticle {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The type of news article (0 – plain text or html, 1 – binary data / pdf).
    #[prost(int32, optional, tag = "2")]
    pub article_type: ::core::option::Option<i32>,
    /// The body of article. If articleType == 1, the binary data is encoded using the Base64 scheme.
    #[prost(string, optional, tag = "3")]
    pub article_text: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalDataRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
    #[prost(string, optional, tag = "3")]
    pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
    /// The data’s granularity or Valid Bar Sizes.
    #[prost(string, optional, tag = "4")]
    pub bar_size_setting: ::core::option::Option<::prost::alloc::string::String>,
    /// Specifies the number of seconds the order should remain active. For GTD orders only. Users that would prefer to specify an exact date should user the "GoodTillDate" parameter instead. Both values cannot be specified at the same time.
    #[prost(string, optional, tag = "5")]
    pub duration: ::core::option::Option<::prost::alloc::string::String>,
    /// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
    #[prost(bool, optional, tag = "6")]
    pub use_rth: ::core::option::Option<bool>,
    /// Data source type.
    #[prost(string, optional, tag = "7")]
    pub what_to_show: ::core::option::Option<::prost::alloc::string::String>,
    /// Using 1 will return UTC time in YYYYMMDD-hh:mm:ss format. Using 2 will return epoch time.
    #[prost(int32, optional, tag = "8")]
    pub format_date: ::core::option::Option<i32>,
    /// true indicates that historical data should be continuously delivered to EWrapper.HistoricalDataUpdate.
    #[prost(bool, optional, tag = "9")]
    pub keep_up_to_date: ::core::option::Option<bool>,
    /// This is a field used exclusively for internal use.
    #[prost(map = "string, string", tag = "10")]
    pub chart_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScannerParameters {
    /// String Representation of an XML document.
    #[prost(string, optional, tag = "1")]
    pub xml: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RerouteMarketDepthRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The unique IB contract identifier.
    #[prost(int32, optional, tag = "2")]
    pub con_id: ::core::option::Option<i32>,
    /// The destination exchange.
    #[prost(string, optional, tag = "3")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PnLRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "2")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
    #[prost(string, optional, tag = "3")]
    pub model_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PositionsMultiRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "2")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
    #[prost(string, optional, tag = "3")]
    pub model_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConfigResponse {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Current status of the order.
    #[prost(string, optional, tag = "2")]
    pub status: ::core::option::Option<::prost::alloc::string::String>,
    /// The news bulletin context.
    #[prost(string, optional, tag = "3")]
    pub message: ::core::option::Option<::prost::alloc::string::String>,
    /// All fields changed from the UpdateConfigRequest.
    #[prost(string, repeated, tag = "4")]
    pub changed_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Proto path that failed to update.
    #[prost(string, repeated, tag = "5")]
    pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Object containing detailed warnings about setting modification.
    #[prost(message, repeated, tag = "6")]
    pub warnings: ::prost::alloc::vec::Vec<UpdateConfigWarning>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScannerDataElement {
    /// Position of the sorted scanner results.
    #[prost(int32, optional, tag = "1")]
    pub rank: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// Instrument's local name.
    #[prost(string, optional, tag = "3")]
    pub market_name: ::core::option::Option<::prost::alloc::string::String>,
    /// Internal use only.
    #[prost(string, optional, tag = "4")]
    pub distance: ::core::option::Option<::prost::alloc::string::String>,
    /// Always returns an empty string.
    #[prost(string, optional, tag = "5")]
    pub benchmark: ::core::option::Option<::prost::alloc::string::String>,
    /// Internal use only.
    #[prost(string, optional, tag = "6")]
    pub projection: ::core::option::Option<::prost::alloc::string::String>,
    /// Describes the combo legs when the scanner is returning EFP.
    #[prost(string, optional, tag = "7")]
    pub combo_key: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScannerData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Represents a single scanner data object, which contains rank, contract, marketName, distance, benchmark, projection, and comboKey.
    #[prost(message, repeated, tag = "2")]
    pub scanner_data_element: ::prost::alloc::vec::Vec<ScannerDataElement>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MatchingSymbolsRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Either start of ticker symbol or (for larger strings) company name.
    #[prost(string, optional, tag = "2")]
    pub pattern: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FamilyCode {
    /// The account identifier.
    #[prost(string, optional, tag = "1")]
    pub account_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Account identifiers.
    #[prost(string, optional, tag = "2")]
    pub family_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FamilyCodes {
    /// Unique family codes array of accountIds.
    #[prost(message, repeated, tag = "1")]
    pub family_codes: ::prost::alloc::vec::Vec<FamilyCode>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewsArticleRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// News provider code based on requested data.
    #[prost(string, optional, tag = "2")]
    pub provider_code: ::core::option::Option<::prost::alloc::string::String>,
    /// Identifier used to track the news article. See [EClient.reqNewsArticle](/tws-api/doc/news/news-articles/request-news-articles) for more details.
    #[prost(string, optional, tag = "3")]
    pub article_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Reserved for internal use. Should be defined as null.
    #[prost(map = "string, string", tag = "4")]
    pub news_article_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyCompleted {
    /// States that verification succeeded.
    #[prost(bool, optional, tag = "1")]
    pub is_successful: ::core::option::Option<bool>,
    /// Failed verification text.
    #[prost(string, optional, tag = "2")]
    pub error_text: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// Object containing a Contract object along with related attributes for trading. See ContractDetails for more details.
    #[prost(message, optional, tag = "3")]
    pub contract_details: ::core::option::Option<ContractDetails>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RealTimeBarTick {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Trigger time for the request. Formatted as HH:MM:ss (UTC assumed if timezone note set).
    #[prost(int64, optional, tag = "2")]
    pub time: ::core::option::Option<i64>,
    /// The bar's open point.
    #[prost(double, optional, tag = "3")]
    pub open: ::core::option::Option<f64>,
    /// The bar's high point.
    #[prost(double, optional, tag = "4")]
    pub high: ::core::option::Option<f64>,
    /// The bar's low point.
    #[prost(double, optional, tag = "5")]
    pub low: ::core::option::Option<f64>,
    /// The last execution price of the bar.
    #[prost(double, optional, tag = "6")]
    pub close: ::core::option::Option<f64>,
    /// The bar's traded volume (only returned for TRADES data).
    #[prost(string, optional, tag = "7")]
    pub volume: ::core::option::Option<::prost::alloc::string::String>,
    /// Weighted Average Price of the returning bar.
    #[prost(string, optional, tag = "8")]
    pub wap: ::core::option::Option<::prost::alloc::string::String>,
    /// Total trades within the bar.
    #[prost(int32, optional, tag = "9")]
    pub count: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ManagedAccounts {
    /// A comma-separated string with the managed account ids.
    #[prost(string, optional, tag = "1")]
    pub accounts_list: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickSize {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Type of data the tick represents.
    #[prost(int32, optional, tag = "2")]
    pub tick_type: ::core::option::Option<i32>,
    /// Represents volume of the order data.
    #[prost(string, optional, tag = "3")]
    pub size: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisplayGroupUpdated {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The encoded value that uniquely represents the contract in IB. Possible values include:\[none: empty selection, contractID@exchange: any non-combination contract., combo: if any combo is selected\].
    #[prost(string, optional, tag = "2")]
    pub contract_info: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewsProviders {
    /// Unique array containing all available news sources.
    #[prost(message, repeated, tag = "1")]
    pub news_providers: ::prost::alloc::vec::Vec<NewsProvider>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// An array of HistoricalDataBar objects.
    #[prost(message, repeated, tag = "2")]
    pub historical_data_bars: ::prost::alloc::vec::Vec<HistoricalDataBar>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelHeadTimestamp {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepthExchanges {
    /// A proprietary list of objects containing Exchange, SecType, ListingExch, serviceDataType, and AggGroup.
    #[prost(message, repeated, tag = "1")]
    pub depth_market_data_descriptions: ::prost::alloc::vec::Vec<
        DepthMarketDataDescription,
    >,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AllOpenOrdersRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecDefOptParameter {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The destination exchange.
    #[prost(string, optional, tag = "2")]
    pub exchange: ::core::option::Option<::prost::alloc::string::String>,
    /// IBKR Contract Identifier of the underlying contract.
    #[prost(int32, optional, tag = "3")]
    pub underlying_con_id: ::core::option::Option<i32>,
    /// The trading class name for this contract. Available in TWS contract description window as well. For example, weekly S&P options are "SPXW" compared to the monthly contract which uses "SPX".
    #[prost(string, optional, tag = "4")]
    pub trading_class: ::core::option::Option<::prost::alloc::string::String>,
    /// The instrument's multiplier (i.e. options, futures).
    #[prost(string, optional, tag = "5")]
    pub multiplier: ::core::option::Option<::prost::alloc::string::String>,
    /// A list of the expiries for the options of this underlying on this exchange.
    #[prost(string, repeated, tag = "6")]
    pub expirations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The list of strikes for the given contract.
    #[prost(double, repeated, tag = "7")]
    pub strikes: ::prost::alloc::vec::Vec<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsBulletinsRequest {
    /// Indicate if all bulletins should be returned.
    #[prost(bool, optional, tag = "1")]
    pub all_messages: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SoftDollarTiers {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Financial Advisor commission tiers.
    #[prost(message, repeated, tag = "2")]
    pub soft_dollar_tiers: ::prost::alloc::vec::Vec<SoftDollarTier>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelPositions {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExerciseOptionsRequest {
    /// The API client's order id.
    #[prost(int32, optional, tag = "1")]
    pub order_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// Set to 1 to exercise the option, set to 2 to let the option lapse.
    #[prost(int32, optional, tag = "3")]
    pub exercise_action: ::core::option::Option<i32>,
    /// Number of contracts to be exercised.
    #[prost(int32, optional, tag = "4")]
    pub exercise_quantity: ::core::option::Option<i32>,
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "5")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Indicate if the default options exercise behavior should be overwritten.
    #[prost(bool, optional, tag = "6")]
    pub r#override: ::core::option::Option<bool>,
    /// Used by brokers and advisors when manually entering an order request. Format should be "YYYYMMDD-HH:mm:ss" using UTC as the timezone value.
    #[prost(string, optional, tag = "7")]
    pub manual_order_time: ::core::option::Option<::prost::alloc::string::String>,
    /// Required for Nondisclosed Omnibus Accounts. A unique identifier for each account within the Omnibus structure to signify the account holder being traded. Best practice (Not Required): clients should look to hash this value, using something along the lines of 5 digits of SHA1 of the account number. This should not be implemented for non-omnibus accounts.
    #[prost(string, optional, tag = "8")]
    pub customer_account: ::core::option::Option<::prost::alloc::string::String>,
    /// true indicates account represents an institutional or professional trader.
    #[prost(bool, optional, tag = "9")]
    pub professional_customer: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConfigRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// API Settings configuration for the "Lock and Exit" Global Configuration page.
    #[prost(message, optional, tag = "2")]
    pub lock_and_exit: ::core::option::Option<LockAndExitConfig>,
    /// Complementary messages identifying settings.
    #[prost(message, repeated, tag = "3")]
    pub messages: ::prost::alloc::vec::Vec<MessageConfig>,
    /// Host object of all Global Configuration -> API sub-menu settings.
    #[prost(message, optional, tag = "4")]
    pub api: ::core::option::Option<ApiConfig>,
    /// Order configuration settings from the Global Configuration.
    #[prost(message, optional, tag = "5")]
    pub orders: ::core::option::Option<OrdersConfig>,
    /// A list of warning messages displayed in the Global Configuration -> Messages.
    #[prost(message, repeated, tag = "6")]
    pub accepted_warnings: ::prost::alloc::vec::Vec<UpdateConfigWarning>,
    /// Submit as true to reset the orderId sequence back to 0.
    #[prost(bool, optional, tag = "7")]
    pub reset_api_order_sequence: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountUpdatesMultiRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "2")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
    #[prost(string, optional, tag = "3")]
    pub model_code: ::core::option::Option<::prost::alloc::string::String>,
    /// Set as True if currency and net liquidation values should be delivered with updates.
    #[prost(bool, optional, tag = "4")]
    pub ledger_and_nlv: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WshEventData {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// All event data delivered as a string formatted as JSON.
    #[prost(string, optional, tag = "2")]
    pub data_json: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelPositionsMulti {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PnLSingleRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// The IBKR account identifier to affiliate the request with.
    #[prost(string, optional, tag = "2")]
    pub account: ::core::option::Option<::prost::alloc::string::String>,
    /// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
    #[prost(string, optional, tag = "3")]
    pub model_code: ::core::option::Option<::prost::alloc::string::String>,
    /// The unique IB contract identifier.
    #[prost(int32, optional, tag = "4")]
    pub con_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountSummaryEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyMessageApi {
    /// Displays data coming from a third party resource.
    #[prost(string, optional, tag = "1")]
    pub api_data: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnsubscribeFromGroupEventsRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketRule {
    /// Market Rule ID requested.
    #[prost(int32, optional, tag = "1")]
    pub market_rule_id: ::core::option::Option<i32>,
    /// Returns the available price increments based on the market rule.
    #[prost(message, repeated, tag = "2")]
    pub price_increments: ::prost::alloc::vec::Vec<PriceIncrement>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CurrentTimeInMillisRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisplayGroupList {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Returns a list of integers representing visible Group ID separated by the pipe "|" character and sorted by most used group first.
    #[prost(string, optional, tag = "2")]
    pub groups: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReplaceFaEnd {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Additional details of the Allocation Group replacements.
    #[prost(string, optional, tag = "2")]
    pub text: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FaReplace {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Receive the faDataType value specified in the requestFA. See [FA Data Types](#fa-data-types).
    #[prost(int32, optional, tag = "2")]
    pub fa_data_type: ::core::option::Option<i32>,
    /// String Representation of an XML document.
    #[prost(string, optional, tag = "3")]
    pub xml: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarketDepthExchangesRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractDataRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountDataRequest {
    /// Indicate if data should be continuously returned.
    #[prost(bool, optional, tag = "1")]
    pub subscribe: ::core::option::Option<bool>,
    /// Account code identifying the account to receive updates for.
    #[prost(string, optional, tag = "2")]
    pub acct_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PortfolioValue {
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "1")]
    pub contract: ::core::option::Option<Contract>,
    /// The number of shares held.
    #[prost(string, optional, tag = "2")]
    pub position: ::core::option::Option<::prost::alloc::string::String>,
    /// The instrument's unitary price.
    #[prost(double, optional, tag = "3")]
    pub market_price: ::core::option::Option<f64>,
    /// Total market value of the instrument.
    #[prost(double, optional, tag = "4")]
    pub market_value: ::core::option::Option<f64>,
    /// Average cost of the overall position.
    #[prost(double, optional, tag = "5")]
    pub average_cost: ::core::option::Option<f64>,
    /// Unrealized profit and loss for the current day's trading session.
    #[prost(double, optional, tag = "6")]
    pub unrealized_pnl: ::core::option::Option<f64>,
    /// Daily realized profit and loss on the position.
    #[prost(double, optional, tag = "7")]
    pub realized_pnl: ::core::option::Option<f64>,
    /// The account identifier.
    #[prost(string, optional, tag = "8")]
    pub account_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalculateOptionPriceRequest {
    /// Unique request identifier used for tracking across EWrapper.
    #[prost(int32, optional, tag = "1")]
    pub req_id: ::core::option::Option<i32>,
    /// Contract object containing defining characteristics for ticker.
    #[prost(message, optional, tag = "2")]
    pub contract: ::core::option::Option<Contract>,
    /// The implied volatility to use for calculating the option price.
    #[prost(double, optional, tag = "3")]
    pub volatility: ::core::option::Option<f64>,
    /// Price of the underlying contract to calculate against.
    #[prost(double, optional, tag = "4")]
    pub under_price: ::core::option::Option<f64>,
    /// Internal use only. Send an empty tag value list.
    #[prost(map = "string, string", tag = "5")]
    pub option_price_options: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}