-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDTCProtocol.proto
1605 lines (1300 loc) · 43.5 KB
/
DTCProtocol.proto
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
syntax = "proto2";
package DTC_PB;
//============================================================================
// DTC protocol version
enum DTCVersion
{
CURRENT_VERSION = 8;
}
//============================================================================
// All messages are preceeded by the following 4-byte little-endian binary
// header on the wire:
//
// uint16 Size; // size of the entire message including this 4-byte header
// uint16 Type; // DTC message type - see DTCProtocol.h
//
// Note: All fields are marked optional in preparation for using proto3 syntax
// in the future when all fields are optional. Similarly, the fields do
// not have default values set.
//
// Note: DateTime fields have three different types based on the field type:
//
// * sfixed64 - standard UNIX Date-Time
// * sfixed32 - 4-byte UNIX Date-Time value used in messages where compactness is an important consideration. Or where only the Date is needed.
// * double - UNIX Date-Time value with fractional portion for milliseconds
//
//============================================================================
//----Message types----
enum DTCMessageType
{
// Authentication and connection monitoring
LOGON_REQUEST = 1;
LOGON_RESPONSE = 2;
HEARTBEAT = 3;
LOGOFF = 5;
ENCODING_REQUEST = 6;
ENCODING_RESPONSE = 7;
// Market data
MARKET_DATA_REQUEST = 101;
MARKET_DATA_REJECT = 103;
MARKET_DATA_SNAPSHOT = 104;
MARKET_DATA_SNAPSHOT_INT = 125;
MARKET_DATA_UPDATE_TRADE = 107;
MARKET_DATA_UPDATE_TRADE_COMPACT = 112;
MARKET_DATA_UPDATE_TRADE_INT = 126;
MARKET_DATA_UPDATE_LAST_TRADE_SNAPSHOT = 134;
MARKET_DATA_UPDATE_BID_ASK = 108;
MARKET_DATA_UPDATE_BID_ASK_COMPACT = 117;
MARKET_DATA_UPDATE_BID_ASK_INT = 127;
MARKET_DATA_UPDATE_SESSION_OPEN = 120;
MARKET_DATA_UPDATE_SESSION_OPEN_INT = 128;
MARKET_DATA_UPDATE_SESSION_HIGH = 114;
MARKET_DATA_UPDATE_SESSION_HIGH_INT = 129;
MARKET_DATA_UPDATE_SESSION_LOW = 115;
MARKET_DATA_UPDATE_SESSION_LOW_INT = 130;
MARKET_DATA_UPDATE_SESSION_VOLUME = 113;
MARKET_DATA_UPDATE_OPEN_INTEREST = 124;
MARKET_DATA_UPDATE_SESSION_SETTLEMENT = 119;
MARKET_DATA_UPDATE_SESSION_SETTLEMENT_INT = 131;
MARKET_DATA_UPDATE_SESSION_NUM_TRADES = 135;
MARKET_DATA_UPDATE_TRADING_SESSION_DATE = 136;
MARKET_DEPTH_REQUEST = 102;
MARKET_DEPTH_REJECT = 121;
MARKET_DEPTH_SNAPSHOT_LEVEL = 122;
MARKET_DEPTH_SNAPSHOT_LEVEL_INT = 132;
MARKET_DEPTH_UPDATE_LEVEL = 106;
MARKET_DEPTH_UPDATE_LEVEL_COMPACT = 118;
MARKET_DEPTH_UPDATE_LEVEL_COMPACT_2 = 139;
MARKET_DEPTH_UPDATE_LEVEL_INT = 133;
MARKET_DEPTH_FULL_UPDATE_10 = 123;
MARKET_DEPTH_FULL_UPDATE_20 = 105;
MARKET_DATA_FEED_STATUS = 100;
MARKET_DATA_FEED_SYMBOL_STATUS = 116;
TRADING_SYMBOL_STATUS = 138;
// Order entry and modification
SUBMIT_NEW_SINGLE_ORDER = 208;
SUBMIT_NEW_SINGLE_ORDER_INT = 206;
SUBMIT_NEW_OCO_ORDER = 201;
SUBMIT_NEW_OCO_ORDER_INT = 207;
CANCEL_ORDER = 203;
CANCEL_REPLACE_ORDER = 204;
CANCEL_REPLACE_ORDER_INT = 205;
// Trading related
OPEN_ORDERS_REQUEST = 300;
OPEN_ORDERS_REJECT = 302;
ORDER_UPDATE = 301;
HISTORICAL_ORDER_FILLS_REQUEST = 303;
HISTORICAL_ORDER_FILL_RESPONSE = 304;
HISTORICAL_ORDER_FILLS_REJECT = 308;
CURRENT_POSITIONS_REQUEST = 305;
CURRENT_POSITIONS_REJECT = 307;
POSITION_UPDATE = 306;
// Account list
TRADE_ACCOUNTS_REQUEST = 400;
TRADE_ACCOUNT_RESPONSE = 401;
// Symbol discovery and security definitions
EXCHANGE_LIST_REQUEST = 500;
EXCHANGE_LIST_RESPONSE = 501;
SYMBOLS_FOR_EXCHANGE_REQUEST = 502;
UNDERLYING_SYMBOLS_FOR_EXCHANGE_REQUEST = 503;
SYMBOLS_FOR_UNDERLYING_REQUEST = 504;
SECURITY_DEFINITION_FOR_SYMBOL_REQUEST = 506;
SECURITY_DEFINITION_RESPONSE = 507;
SYMBOL_SEARCH_REQUEST = 508;
SECURITY_DEFINITION_REJECT = 509;
// Account balance
ACCOUNT_BALANCE_REQUEST = 601;
ACCOUNT_BALANCE_REJECT = 602;
ACCOUNT_BALANCE_UPDATE = 600;
HISTORICAL_ACCOUNT_BALANCES_REQUEST = 603;
HISTORICAL_ACCOUNT_BALANCES_REJECT = 604;
HISTORICAL_ACCOUNT_BALANCE_RESPONSE = 605;
// Logging
USER_MESSAGE = 700;
GENERAL_LOG_MESSAGE = 701;
ALERT_MESSAGE = 702;
JOURNAL_ENTRY_ADD = 703;
JOURNAL_ENTRIES_REQUEST = 704;
JOURNAL_ENTRIES_REJECT = 705;
JOURNAL_ENTRY_RESPONSE = 706;
// Historical price data
HISTORICAL_PRICE_DATA_REQUEST= 800;
HISTORICAL_PRICE_DATA_RESPONSE_HEADER = 801;
HISTORICAL_PRICE_DATA_REJECT = 802;
HISTORICAL_PRICE_DATA_RECORD_RESPONSE = 803;
HISTORICAL_PRICE_DATA_TICK_RECORD_RESPONSE = 804;
HISTORICAL_PRICE_DATA_RECORD_RESPONSE_INT = 805;
HISTORICAL_PRICE_DATA_TICK_RECORD_RESPONSE_INT = 806;
}
//============================================================================
enum EncodingEnum
{
BINARY_ENCODING = 0;
BINARY_WITH_VARIABLE_LENGTH_STRINGS = 1;
JSON_ENCODING = 2;
JSON_COMPACT_ENCODING = 3;
PROTOCOL_BUFFERS = 4;
}
//============================================================================
enum LogonStatusEnum
{
LOGON_SUCCESS = 1;
LOGON_ERROR = 2;
LOGON_ERROR_NO_RECONNECT = 3;
LOGON_RECONNECT_NEW_ADDRESS = 4;
}
//============================================================================
enum MessageSupportedEnum
{
MESSAGE_UNSUPPORTED = 0;
MESSAGE_SUPPORTED = 1;
}
//============================================================================
enum TradeModeEnum
{
TRADE_MODE_UNSET= 0;
TRADE_MODE_DEMO = 1;
TRADE_MODE_SIMULATED = 2;
TRADE_MODE_LIVE = 3;
}
//============================================================================
enum RequestActionEnum
{
SUBSCRIBE = 1;
UNSUBSCRIBE = 2;
SNAPSHOT = 3;
}
/*==========================================================================*/
enum UnbundledTradeIndicatorEnum
{
UNBUNDLED_TRADE_NONE = 0;
FIRST_SUB_TRADE_OF_UNBUNDLED_TRADE = 1;
LAST_SUB_TRADE_OF_UNBUNDLED_TRADE = 2;
};
//============================================================================
enum OrderStatusEnum
{
ORDER_STATUS_UNSPECIFIED = 0;
ORDER_STATUS_ORDER_SENT = 1;
ORDER_STATUS_PENDING_OPEN = 2;
ORDER_STATUS_PENDING_CHILD = 3;
ORDER_STATUS_OPEN = 4;
ORDER_STATUS_PENDING_CANCEL_REPLACE = 5;
ORDER_STATUS_PENDING_CANCEL = 6;
ORDER_STATUS_FILLED = 7;
ORDER_STATUS_CANCELED = 8;
ORDER_STATUS_REJECTED = 9;
ORDER_STATUS_PARTIALLY_FILLED = 10;
}
//============================================================================
enum OrderUpdateReasonEnum
{
ORDER_UPDATE_REASON_UNSET = 0;
OPEN_ORDERS_REQUEST_RESPONSE = 1;
NEW_ORDER_ACCEPTED = 2;
GENERAL_ORDER_UPDATE = 3;
ORDER_FILLED = 4;
ORDER_FILLED_PARTIALLY = 5;
ORDER_CANCELED = 6;
ORDER_CANCEL_REPLACE_COMPLETE = 7;
NEW_ORDER_REJECTED = 8;
ORDER_CANCEL_REJECTED = 9;
ORDER_CANCEL_REPLACE_REJECTED = 10;
}
//============================================================================
enum AtBidOrAskEnum
{
BID_ASK_UNSET = 0;
AT_BID = 1;
AT_ASK = 2;
}
//============================================================================
enum AtBidOrAskEnum8
{
BID_ASK_UNSET_8 = 0;
AT_BID_8 = 1;
AT_ASK_8 = 2;
}
//============================================================================
enum MarketDepthUpdateTypeEnum
{
DEPTH_UNSET = 0;
MARKET_DEPTH_INSERT_UPDATE_LEVEL = 1; // Insert or update depth at the given price level
MARKET_DEPTH_DELETE_LEVEL = 2; // Delete depth at the given price level
}
//============================================================================
enum OrderTypeEnum
{
ORDER_TYPE_UNSET = 0;
ORDER_TYPE_MARKET = 1;
ORDER_TYPE_LIMIT = 2;
ORDER_TYPE_STOP = 3;
ORDER_TYPE_STOP_LIMIT = 4;
ORDER_TYPE_MARKET_IF_TOUCHED = 5;
ORDER_TYPE_LIMIT_IF_TOUCHED = 6;
}
//============================================================================
enum TimeInForceEnum
{
TIF_UNSET = 0;
TIF_DAY = 1;
TIF_GOOD_TILL_CANCELED = 2;
TIF_GOOD_TILL_DATE_TIME = 3;
TIF_IMMEDIATE_OR_CANCEL = 4;
TIF_ALL_OR_NONE = 5;
TIF_FILL_OR_KILL = 6;
}
//============================================================================
enum BuySellEnum
{
BUY_SELL_UNSET = 0;
BUY = 1;
SELL = 2;
}
//============================================================================
enum OpenCloseTradeEnum
{
TRADE_UNSET = 0;
TRADE_OPEN = 1;
TRADE_CLOSE = 2;
}
//============================================================================
enum PartialFillHandlingEnum
{
PARTIAL_FILL_UNSET = 0;
PARTIAL_FILL_HANDLING_REDUCE_QUANTITY = 1;
PARTIAL_FILL_HANDLING_IMMEDIATE_CANCEL = 2;
}
//============================================================================
enum MarketDataFeedStatusEnum
{
MARKET_DATA_FEED_UNAVAILABLE = 1;
MARKET_DATA_FEED_AVAILABLE = 2;
}
//============================================================================
enum PriceDisplayFormatEnum
{
PRICE_DISPLAY_FORMAT_UNSET = -1;
PRICE_DISPLAY_FORMAT_DECIMAL_0 = 0;
PRICE_DISPLAY_FORMAT_DECIMAL_1 = 1;
PRICE_DISPLAY_FORMAT_DECIMAL_2 = 2;
PRICE_DISPLAY_FORMAT_DECIMAL_3 = 3;
PRICE_DISPLAY_FORMAT_DECIMAL_4 = 4;
PRICE_DISPLAY_FORMAT_DECIMAL_5 = 5;
PRICE_DISPLAY_FORMAT_DECIMAL_6 = 6;
PRICE_DISPLAY_FORMAT_DECIMAL_7 = 7;
PRICE_DISPLAY_FORMAT_DECIMAL_8 = 8;
PRICE_DISPLAY_FORMAT_DECIMAL_9 = 9;
PRICE_DISPLAY_FORMAT_DENOMINATOR_256 = 356;
PRICE_DISPLAY_FORMAT_DENOMINATOR_128 = 228;
PRICE_DISPLAY_FORMAT_DENOMINATOR_64 = 164;
PRICE_DISPLAY_FORMAT_DENOMINATOR_32_QUARTERS = 136;
PRICE_DISPLAY_FORMAT_DENOMINATOR_32_HALVES = 134;
PRICE_DISPLAY_FORMAT_DENOMINATOR_32 = 132;
PRICE_DISPLAY_FORMAT_DENOMINATOR_16 = 116;
PRICE_DISPLAY_FORMAT_DENOMINATOR_8 = 108;
PRICE_DISPLAY_FORMAT_DENOMINATOR_4 = 104;
PRICE_DISPLAY_FORMAT_DENOMINATOR_2 = 102;
}
//============================================================================
enum SecurityTypeEnum
{
SECURITY_TYPE_UNSET = 0;
SECURITY_TYPE_FUTURE = 1;
SECURITY_TYPE_STOCK = 2;
SECURITY_TYPE_FOREX = 3;
SECURITY_TYPE_INDEX = 4;
SECURITY_TYPE_FUTURES_STRATEGY = 5;
SECURITY_TYPE_FUTURES_OPTION = 7;
SECURITY_TYPE_STOCK_OPTION = 6;
SECURITY_TYPE_INDEX_OPTION = 8;
SECURITY_TYPE_BOND = 9;
SECURITY_TYPE_MUTUAL_FUND = 10;
}
//============================================================================
enum PutCallEnum
{
PC_UNSET = 0;
PC_CALL = 1;
PC_PUT = 2;
}
//============================================================================
enum SearchTypeEnum
{
SEARCH_TYPE_UNSET = 0;
SEARCH_TYPE_BY_SYMBOL = 1;
SEARCH_TYPE_BY_DESCRIPTION = 2;
}
//============================================================================
enum HistoricalDataIntervalEnum
{
INTERVAL_TICK = 0;
INTERVAL_1_SECOND = 1;
INTERVAL_2_SECONDS = 2;
INTERVAL_4_SECONDS = 4;
INTERVAL_5_SECONDS = 5;
INTERVAL_10_SECONDS = 10;
INTERVAL_30_SECONDS = 30;
INTERVAL_1_MINUTE = 60;
INTERVAL_1_DAY = 86400;
INTERVAL_1_WEEK = 604800;
}
//============================================================================
enum HistoricalPriceDataRejectReasonCodeEnum
{
HPDR_UNSET = 0;
HPDR_UNABLE_TO_SERVE_DATA_RETRY_LATER = 1;
HPDR_UNABLE_TO_SERVE_DATA_DO_NOT_RETRY = 2;
HPDR_DATA_REQUEST_OUTSIDE_BOUNDS_OF_AVAILABLE_DATA = 3;
HPDR_GENERAL_REJECT_ERROR = 4;
}
//============================================================================
enum TradingStatusEnum
{
TRADING_STATUS_UNKNOWN = 0;
TRADING_STATUS_PRE_OPEN = 1;
TRADING_STATUS_OPEN = 2;
TRADING_STATUS_CLOSE = 3;
TRADING_STATUS_TRADING_HALT = 4;
}
//============================================================================
message EncodingRequest
{
optional int32 ProtocolVersion = 1;
optional EncodingEnum Encoding = 2;
optional string ProtocolType = 3;
}
//============================================================================
message EncodingResponse
{
optional int32 ProtocolVersion = 1;
optional EncodingEnum Encoding = 2;
optional string ProtocolType = 3;
}
//============================================================================
message LogonRequest
{
optional int32 ProtocolVersion = 1;
optional string Username = 2;
optional string Password = 3;
optional string GeneralTextData = 4;
optional int32 Integer_1 = 5;
optional int32 Integer_2 = 6;
optional int32 HeartbeatIntervalInSeconds = 7;
optional TradeModeEnum TradeMode = 8;
optional string TradeAccount = 9;
optional string HardwareIdentifier = 10;
optional string ClientName = 11;
}
//============================================================================
message LogonResponse
{
optional int32 ProtocolVersion = 1;
optional LogonStatusEnum Result = 2;
optional string ResultText = 3;
optional string ReconnectAddress = 4;
optional int32 Integer_1 = 5;
optional string ServerName = 6;
optional uint32 MarketDepthUpdatesBestBidAndAsk = 7;
optional uint32 TradingIsSupported = 8;
optional uint32 OCOOrdersSupported = 9;
optional uint32 OrderCancelReplaceSupported = 10;
optional string SymbolExchangeDelimiter = 11;
optional uint32 SecurityDefinitionsSupported = 12;
optional uint32 HistoricalPriceDataSupported = 13;
optional uint32 ResubscribeWhenMarketDataFeedAvailable = 14;
optional uint32 MarketDepthIsSupported = 15;
optional uint32 OneHistoricalPriceDataRequestPerConnection = 16;
optional uint32 BracketOrdersSupported = 17;
optional uint32 UseIntegerPriceOrderMessages = 18;
optional uint32 UsesMultiplePositionsPerSymbolAndTradeAccount = 19;
optional uint32 MarketDataSupported = 20;
}
//============================================================================
message Logoff
{
optional string Reason = 1;
optional uint32 DoNotReconnect = 2;
}
//============================================================================
message Heartbeat
{
optional uint32 NumDroppedMessages = 1;
optional sfixed64 CurrentDateTime = 2;
}
//============================================================================
message MarketDataFeedStatus
{
optional MarketDataFeedStatusEnum Status = 1;
}
//============================================================================
message MarketDataFeedSymbolStatus
{
optional uint32 SymbolID = 1;
optional MarketDataFeedStatusEnum Status = 2;
}
//============================================================================
message TradingSymbolStatus
{
optional uint32 SymbolID = 1;
optional TradingStatusEnum Status = 2;
}
//============================================================================
message MarketDataRequest
{
optional RequestActionEnum RequestAction = 1;
optional uint32 SymbolID = 2;
optional string Symbol = 3;
optional string Exchange = 4;
}
//============================================================================
message MarketDepthRequest
{
optional RequestActionEnum RequestAction = 1;
optional uint32 SymbolID = 2;
optional string Symbol = 3;
optional string Exchange = 4;
optional int32 NumLevels = 5;
}
//============================================================================
message MarketDataReject
{
optional uint32 SymbolID = 1;
optional string RejectText = 2;
}
//============================================================================
message MarketDataSnapshot
{
optional uint32 SymbolID = 1;
optional double SessionSettlementPrice = 2;
optional double SessionOpenPrice = 3;
optional double SessionHighPrice = 4;
optional double SessionLowPrice = 5;
optional double SessionVolume = 6;
optional uint32 SessionNumTrades = 7;
optional uint32 OpenInterest = 8;
optional double BidPrice = 9;
optional double AskPrice = 10;
optional double AskQuantity = 11;
optional double BidQuantity = 12;
optional double LastTradePrice = 13;
optional double LastTradeVolume = 14;
optional double LastTradeDateTime = 15;
optional double BidAskDateTime = 16;
optional uint32 SessionSettlementDateTime = 17;
optional uint32 TradingSessionDate = 18;
optional TradingStatusEnum TradingStatus = 19;
}
//============================================================================
message MarketDataSnapshot_Int
{
optional uint32 SymbolID = 1;
optional int32 SessionSettlementPrice = 2;
optional int32 SessionOpenPrice = 3;
optional int32 SessionHighPrice = 4;
optional int32 SessionLowPrice = 5;
optional int32 SessionVolume = 6;
optional uint32 SessionNumTrades = 7;
optional uint32 OpenInterest = 8;
optional int32 BidPrice = 9;
optional int32 AskPrice = 10;
optional int32 AskQuantity = 11;
optional int32 BidQuantity = 12;
optional int32 LastTradePrice = 13;
optional int32 LastTradeVolume = 14;
optional double LastTradeDateTime = 15;
optional double BidAskDateTime = 16;
optional uint32 SessionSettlementDateTime = 17;
optional uint32 TradingSessionDate = 18;
optional TradingStatusEnum TradingStatus = 19;
}
//============================================================================
message DepthEntry
{
optional double Price = 1;
optional float Quantity = 12;
}
//============================================================================
message MarketDepthFullUpdate20
{
optional uint32 SymbolID = 1;
repeated DepthEntry BidDepth = 2;
repeated DepthEntry AskDepth = 3;
}
//============================================================================
message MarketDepthFullUpdate10
{
optional uint32 SymbolID = 1;
repeated DepthEntry BidDepth = 2;
repeated DepthEntry AskDepth = 3;
}
//============================================================================
message MarketDepthSnapshotLevel
{
optional uint32 SymbolID = 1;
optional AtBidOrAskEnum Side = 2;
optional double Price = 3;
optional double Quantity = 4;
optional uint32 Level = 5;
optional uint32 IsFirstMessageInBatch = 6;
optional uint32 IsLastMessageInBatch = 7;
optional double DateTime = 8;
optional uint32 NumOrders = 9;
}
//============================================================================
message MarketDepthSnapshotLevel_Int
{
optional uint32 SymbolID = 1;
optional AtBidOrAskEnum Side = 2;
optional int32 Price = 3;
optional int32 Quantity = 4;
optional uint32 Level = 5;
optional uint32 IsFirstMessageInBatch = 6;
optional uint32 IsLastMessageInBatch = 7;
optional double DateTime = 8;
optional uint32 NumOrders = 9;
}
//============================================================================
message MarketDepthUpdateLevel
{
optional uint32 SymbolID = 1;
optional AtBidOrAskEnum Side = 2;
optional double Price = 3;
optional double Quantity = 4;
optional MarketDepthUpdateTypeEnum UpdateType = 5;
optional double DateTime = 6;
optional uint32 NumOrders = 7;
}
//============================================================================
message MarketDepthUpdateLevel_Int
{
optional uint32 SymbolID = 1;
optional AtBidOrAskEnum Side = 2;
optional int32 Price = 3;
optional int32 Quantity = 4;
optional MarketDepthUpdateTypeEnum UpdateType = 5;
optional double DateTime = 6;
optional uint32 NumOrders = 7;
}
//============================================================================
message MarketDepthUpdateLevelCompact
{
optional uint32 SymbolID = 1;
optional AtBidOrAskEnum Side = 2;
optional float Price = 3;
optional float Quantity = 4;
optional MarketDepthUpdateTypeEnum UpdateType = 5;
optional uint32 DateTime = 6;
optional uint32 NumOrders = 7;
}
//============================================================================
message MarketDepthUpdateLevelCompact2
{
optional uint32 SymbolID = 1;
optional int32 Side = 2;
optional int32 UpdateType = 3;
optional uint32 NumOrders = 4;
optional float Price = 5;
optional float Quantity = 6;
optional uint32 DateTime = 7;
}
//============================================================================
message MarketDataUpdateSessionSettlement
{
optional uint32 SymbolID = 1;
optional double Price = 2;
optional uint32 DateTime = 3;
}
//============================================================================
message MarketDataUpdateSessionSettlement_Int
{
optional uint32 SymbolID = 1;
optional int32 Price = 2;
optional int32 DateTime = 3;
}
//============================================================================
message MarketDataUpdateSessionOpen
{
optional uint32 SymbolID = 1;
optional double Price = 2;
optional uint32 TradingSessionDate = 3;
}
//============================================================================
message MarketDataUpdateSessionOpen_Int
{
optional uint32 SymbolID = 1;
optional int32 Price = 2;
optional uint32 TradingSessionDate = 3;
}
//============================================================================
message MarketDataUpdateSessionNumTrades
{
optional uint32 SymbolID = 1;
optional int32 NumTrades = 2;
optional uint32 TradingSessionDate = 3;
}
//============================================================================
message MarketDataUpdateTradingSessionDate
{
optional uint32 SymbolID = 1;
optional uint32 Date = 2;
}
//============================================================================
message MarketDepthReject
{
optional uint32 SymbolID = 1;
optional string RejectText = 2;
}
//============================================================================
message MarketDataUpdateTrade
{
optional uint32 SymbolID = 1;
optional AtBidOrAskEnum AtBidOrAsk = 2;
optional double Price = 3;
optional double Volume = 4;
optional double DateTime = 5;
}
//============================================================================
message MarketDataUpdateTrade_Int
{
optional uint32 SymbolID = 1;
optional AtBidOrAskEnum AtBidOrAsk = 2;
optional int32 Price = 3;
optional int32 Volume = 4;
optional double DateTime = 5;
}
//============================================================================
message MarketDataUpdateTradeWithUnbundledIndicator
{
optional uint32 SymbolID = 1;
optional AtBidOrAskEnum8 AtBidOrAsk = 2;
optional UnbundledTradeIndicatorEnum UnbundledTradeIndicator = 3;
optional double Price = 4;
optional uint32 Volume = 5;
optional double DateTime = 6;
}
//============================================================================
message MarketDataUpdateBidAsk
{
optional uint32 SymbolID = 1;
optional double BidPrice = 2;
optional float BidQuantity = 3;
optional double AskPrice = 4;
optional float AskQuantity = 5;
optional sfixed32 DateTime = 6;
}
//============================================================================
message MarketDataUpdateBidAsk_Int
{
optional uint32 SymbolID = 1;
optional int32 BidPrice = 2;
optional int32 BidQuantity = 3;
optional int32 AskPrice = 4;
optional int32 AskQuantity = 5;
optional sfixed32 DateTime = 6;
}
//============================================================================
message MarketDataUpdateBidAskCompact
{
optional float BidPrice = 1;
optional float BidQuantity = 2;
optional float AskPrice = 3;
optional float AskQuantity = 4;
optional sfixed32 DateTime = 5;
optional uint32 SymbolID = 6;
}
//============================================================================
message MarketDataUpdateTradeCompact
{
optional float Price = 1;
optional float Volume = 2;
optional sfixed32 DateTime = 3;
optional uint32 SymbolID = 4;
optional AtBidOrAskEnum AtBidOrAsk = 5;
}
//============================================================================
message MarketDataUpdateSessionVolume
{
optional uint32 SymbolID = 1;
optional double Volume = 2;
optional uint32 TradingSessionDate = 3;
}
//============================================================================
message MarketDataUpdateOpenInterest
{
optional uint32 SymbolID = 1;
optional uint32 OpenInterest = 2;
optional uint32 TradingSessionDate = 3;
}
//============================================================================
message MarketDataUpdateSessionHigh
{
optional uint32 SymbolID = 1;
optional double Price = 2;
optional uint32 TradingSessionDate = 3;
}
//============================================================================
message MarketDataUpdateSessionHigh_Int
{
optional uint32 SymbolID = 1;
optional int32 Price = 2;
optional uint32 TradingSessionDate = 3;
}
//============================================================================
message MarketDataUpdateSessionLow
{
optional uint32 SymbolID = 1;
optional double Price = 2;
optional uint32 TradingSessionDate = 3;
}
//============================================================================
message MarketDataUpdateSessionLow_Int
{
optional uint32 SymbolID = 1;
optional int32 Price = 2;
optional uint32 TradingSessionDate = 3;
}
//============================================================================
message MarketDataUpdateLastTradeSnapshot
{
optional uint32 SymbolID = 1;
optional double LastTradePrice = 2;
optional double LastTradeVolume = 3;
optional double LastTradeDateTime = 4;
}
//============================================================================
message SubmitNewSingleOrder
{
optional string Symbol = 1;
optional string Exchange = 2;
optional string TradeAccount = 3;
optional string ClientOrderID = 4;
optional OrderTypeEnum OrderType = 5;
optional BuySellEnum BuySell = 6;
optional double Price1 = 7;
optional double Price2 = 8;
optional double Quantity = 9;
optional TimeInForceEnum TimeInForce = 10;
optional sfixed64 GoodTillDateTime = 11;
optional uint32 IsAutomatedOrder = 12;
optional uint32 IsParentOrder = 13;
optional string FreeFormText = 14;
optional OpenCloseTradeEnum OpenOrClose = 15;
}
//============================================================================
message SubmitNewSingleOrderInt
{
optional string Symbol = 1;
optional string Exchange = 2;
optional string TradeAccount = 3;
optional string ClientOrderID = 4;
optional OrderTypeEnum OrderType = 5;
optional BuySellEnum BuySell = 6;
optional int64 Price1 = 7;
optional int64 Price2 = 8;
optional float Divisor = 9;
optional int64 Quantity = 10;
optional TimeInForceEnum TimeInForce = 11;
optional sfixed64 GoodTillDateTime = 12;
optional uint32 IsAutomatedOrder = 13;
optional uint32 IsParentOrder = 14;
optional string FreeFormText = 15;
optional OpenCloseTradeEnum OpenOrClose = 16;
}
//============================================================================
message CancelReplaceOrder
{
optional string ServerOrderID = 1;
optional string ClientOrderID = 2;
optional double Price1 = 3;
optional double Price2 = 4;
optional double Quantity = 5;
optional uint32 Price1IsSet = 6;
optional uint32 Price2IsSet = 7;
optional TimeInForceEnum TimeInForce = 9;
optional uint64 GoodTillDateTime = 10;
optional uint32 UpdatePrice1OffsetToParent = 11;
}
//============================================================================
message CancelReplaceOrderInt
{
optional string ServerOrderID = 1;
optional string ClientOrderID = 2;
optional int64 Price1 = 3;
optional int64 Price2 = 4;
optional float Divisor = 5;
optional int64 Quantity = 6;
optional uint32 Price1IsSet = 7;
optional uint32 Price2IsSet = 8;
optional TimeInForceEnum TimeInForce = 10;
optional uint64 GoodTillDateTime = 11;
optional uint32 UpdatePrice1OffsetToParent = 12;
}
//============================================================================
message CancelOrder
{
optional string ServerOrderID = 1;
optional string ClientOrderID = 2;
}
//============================================================================
message SubmitNewOCOOrder
{
optional string Symbol = 1;
optional string Exchange = 2;
optional string ClientOrderID_1 = 3;
optional OrderTypeEnum OrderType_1 = 4;
optional BuySellEnum BuySell_1 = 5;
optional double Price1_1 = 6;
optional double Price2_1 = 7;