-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenfeed.proto
1084 lines (1006 loc) · 27.5 KB
/
openfeed.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
/**
* Copyright (C) 2011-2017 Barchart, Inc. <http://www.barchart.com/>
*
* All rights reserved. Licensed under the OSI BSD License.
*
* http://www.opensource.org/licenses/bsd-license.php
*/
syntax = "proto3";
package org.openfeed;
option java_multiple_files = true;
option java_generate_equals_and_hash = true;
option optimize_for = SPEED;
import "openfeed_instrument.proto";
// /////////////////////////////////////////////////////////////////
// Enums
// /////////////////////////////////////////////////////////////////
/// Book side
enum BookSide {
UNKNOWN_BOOK_SIDE = 0;
BID = 1;
OFFER = 2;
}
enum InstrumentTradingStatus {
UNKNOWN_TRADING_STATUS = 0;
TRADING_RESUME = 1;
PRE_OPEN = 2;
OPEN = 3;
PRE_CLOSE = 4;
CLOSE = 5;
TRADING_HALT = 6;
QUOTATION_RESUME = 7;
OPEN_DELAY = 8;
NO_OPEN_NO_RESUME = 9;
FAST_MARKET = 10;
FAST_MARKET_END = 11;
LATE_MARKET = 12;
LATE_MARKET_END = 13;
POST_SESSION = 14;
POST_SESSION_END = 15;
NEW_PRICE_INDICATION = 16;
NOT_AVAILABLE_FOR_TRADING = 17;
PRE_CROSS = 18;
CROSS = 19;
POST_CLOSE = 20;
NO_CHANGE = 21;
NAFT = 22; // Not available for trading.
TRADING_RANGE_INDICATION = 23;
MARKET_IMBALANCE_BUY = 24;
MARKET_IMBALANCE_SELL = 25;
MOC_IMBALANCE_BUY = 26; // Market On Close Imbalance Buy
MOC_IMBALANCE_SELL = 27;
NO_MARKET_IMBALANCE = 28;
NO_MOC_IMBALANCE = 29;
SHORT_SELL_RESTRICTION = 30;
LIMIT_UP_LIMIT_DOWN = 31;
}
enum RegulationSHOShortSalePriceTest {
UNKNOWN_PRICE_TEST = 0;
PRICE_TEST_NONE = 1;
PRICE_TEST_IN_EFFECT = 2;
PRICE_TEST_REMAINS_IN_EFFECT = 3;
}
enum SettlementTerms {
UNKNOWN_SETTLEMENT_TERMS = 0;
CASH = 1;
NON_NET = 2;
CONTINGENT_TRADE = 3;
CASH_TODAY = 4;
DATE = 5;
}
enum CrossType {
UNKNOWN_CROSS_TYPE = 0;
DEFAULT = 1;
INTERNAL = 2;
BASIS = 3;
CONTINGENT = 4;
SPECIAL = 5;
VWAP = 6;
REGULAR = 7;
}
enum OpenCloseSettlementFlag {
UNKNOWN = 0;
DAILY_OPEN = 1;
INDICATIVE_OPEN_PRICE = 2;
}
enum SettlementSource {
UNKNOWN_SETTLEMENT_SOURCE = 0;
GLOBEX = 1;
ITC = 2;
MANUAL = 3;
}
enum Service {
UNKNOWN_SERVICE = 0;
REAL_TIME = 1;
DELAYED = 2;
REAL_TIME_SNAPSHOT = 3;
DELAYED_SNAPSHOT = 4;
END_OF_DAY = 5;
}
enum MarketWideStatus {
STATUS_UNKNOWN = 0;
STATUS_START_OF_DAY = 1;
STATUS_END_OF_DAY = 2;
STATUS_OPEN = 3;
STATUS_CLOSE = 4;
}
// /////////////////////////////////////////////////////////////////
// Messages
// /////////////////////////////////////////////////////////////////
/// A wrapper for Openfeed data. Will contain exactly one of the supported
// message types
message OpenfeedMessage {
/// Nano second unix epoch at time of message transmission (UTC)
sint64 sendingTime = 1;
/// The total number of markets available on this channel
// at the time the message was sent. For UDP snapshot and definition feeds.
sint32 totalCount = 2;
/// The most recent packet sequence number sent on the incremental feed
// at the time this message was sent. For UDP snapshot and definition feeds.
int64 syncSequence = 3;
// Feed specific context data
Context context = 4;
oneof data {
ChannelReset channelReset = 10;
HeartBeat heartBeat = 11;
AdminMessage adminMessage = 12;
InstrumentDefinition instrumentDefinition = 13;
InstrumentGroupStatus instrumentGroupStatus = 14;
MarketSnapshot marketSnapshot = 15;
MarketUpdate marketUpdate = 16;
MarketStatus marketStatus = 17;
EODCommoditySummary eodCommoditySummary = 18;
InstrumentAction instrumentAction = 19;
}
}
// Channel Reset
message ChannelReset {
sint32 channel = 1;
sint64 transactionTime = 2;
}
/// Heart Beat
message HeartBeat {
/// UTC timestamp of transaction, nano seconds since Unix epoch
sint64 transactionTime = 1;
string status = 2;
bool exchange = 3;
sint32 channel = 4;
}
// Administrative Message
message AdminMessage {
// Origination time = UTC timestamp nano seconds since Unix epoch
sint64 originationTime = 1;
string source = 2;
string languageCode = 3;
string headLine = 4;
string text = 5;
enum Status {
OK = 0;
}
Status status = 6;
sint32 channel = 7;
}
/// Instrument Group Status
message InstrumentGroupStatus {
/// UTC Timestamp of transaction, nano seconds since Unix epoch
sint64 transactionTime = 1;
string instrumentGroupId = 2;
InstrumentTradingStatus tradingStatus = 3;
sint32 tradeDate = 4;
sint32 channel = 5;
}
/// Market Status
message MarketStatus {
/// UTC Timestamp of transaction, nano seconds since Unix epoch
sint64 transactionTime = 1;
sint32 channel = 2;
MarketWideStatus marketWideStatus = 3;
}
/// EOD commodity summary. Used to represent consolidated total values for the group of contracts. Total volume for
/// all ES futures, for example.
message EODCommoditySummary {
/// Trade date in the format YYYYMMDD
sint32 tradeDate = 1;
/// Contract root, for example ES.
string contractRoot = 2;
/// Consolidated volume.
sint64 consolidatedVolume = 3;
// Consolidated open interest.
sint64 consolidatedOpenInterest = 4;
/// For internal use only. Ignore
bytes auxiliaryData = 99;
}
/// Session used in snapshot.
message MarketSession {
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 4;
/// Most recent opening price
Open open = 30;
/// High price for the trading session
High high = 31;
/// Low price for the trading session
Low low = 32;
/// Most recent traded price and quantity
Last last = 35;
/// Total traded volume
Volume volume = 38;
/// Most recent settlement price
Settlement settlement = 39;
/// Most recent settlement price
Settlement prevSettlement = 44;
/// Most recent open interest
OpenInterest openInterest = 40;
/// Number of trades
NumberOfTrades numberOfTrades = 41;
/// Monetary value
MonetaryValue monetaryValue = 42;
// UTC Timestamp, nano seconds since Unix epoch
sint64 transactionTime = 43;
}
/// Snapshot for a market
message MarketSnapshot {
/// Unique id identifying the market
sint64 marketId = 1;
// UTC Timestamp of transaction, nano seconds since Unix epoch
sint64 transactionTime = 2;
// Instrument level sequence number
int64 marketSequence = 3;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 4;
/// A snapshot with market depth may exceed the maximum message size.
// In that case, the snapshot will be broken up across multiple
// snapshot messages.
sint32 totalChunks = 5;
sint32 currentChunk = 6;
// Optional symbol identifier
string symbol = 7;
/// Divide prices by this value to get real price values. Optional, use value
/// from InstrumentDefinition if not set.
sint32 priceDenominator = 8;
//
Service service = 9;
//
InstrumentStatus instrumentStatus = 10;
// Best Bid Offer
BestBidOffer bbo = 11;
// Index Value
IndexValue index = 12;
// Price Level Book
repeated AddPriceLevel priceLevels = 13;
// Order Book
repeated AddOrder orders = 14;
News news = 15;
/// Most recent opening price
Open open = 30;
/// High price for the trading session
High high = 31;
/// Low price for the trading session
Low low = 32;
/// Most recent closing price
Close close = 33;
/// Previous closing price
PrevClose prevClose = 34;
/// Most recent traded price and quantity
Last last = 35;
/// Year high price
YearHigh yearHigh = 36;
/// Year low price
YearLow yearLow = 37;
/// Total traded volume
Volume volume = 38;
/// Most recent settlement price
Settlement settlement = 39;
/// Most recent open interest
OpenInterest openInterest = 40;
/// Most recent volume weighted average price
Vwap vwap = 41;
DividendsIncomeDistributions dividendsIncomeDistributions = 42;
NumberOfTrades numberOfTrades = 43;
MonetaryValue monetaryValue = 44;
CapitalDistributions capitalDistributions = 45;
SharesOutstanding sharesOutstanding = 46;
NetAssetValue netAssetValue = 47;
/// Previous session.
MarketSession previousSession = 48;
/// 'T' session.
MarketSession tSession = 49;
/// Volume at price. Used by the market state/ JERQ.
VolumeAtPrice volumeAtPrice = 50;
HighRolling highRolling = 51;
LowRolling lowRolling = 52;
/// 'Z' session. Includes all trades, even the ones that do not update Last.
MarketSession zSession = 53;
}
enum SnapshotRequestResult {
SNAPSHOT_REQUEST_UNKNOWN_RESULT = 0;
SNAPSHOT_REQUEST_SUCCESS = 1;
SNAPSHOT_REQUEST_NOT_FOUND = 2;
SNAPSHOT_REQUEST_SERVICE_NOT_AVAILABLE = 3;
SNAPSHOT_REQUEST_GENERIC_FAILURE = 4;
}
// Used by market state to return snapshot.
message MarketSnapshotResponse {
SnapshotRequestResult result = 1;
string message = 2;
MarketSnapshot marketSnapshot = 3;
}
//
// Market Update for an instrument
//
message MarketUpdate {
/// Unique id identifying the market
sint64 marketId = 1;
// Optional symbol identifier
string symbol = 2;
/// UTC Timestamp of transaction, nano seconds since Unix epoch
/// This is usually the execution venue timestamp.
sint64 transactionTime = 3;
/// Distribution time in nano seconds since epoch.
sint64 distributionTime = 4;
/// Market level sequencing number
sint64 marketSequence = 5;
/// Data source sequence number
sint64 sourceSequence = 6;
// Market participant/originator
bytes originatorId = 7;
/// The consolidated messages are the default. Regional exchanges will have regional = true
/// deprecated bool consolidated = 8;
reserved 8;
/// Divide prices by this value to get real price values. Optional, use value
/// from InstrumentDefinition if not set.
sint32 priceDenominator = 9;
// Feed specific context data set as required.
Context context = 10;
/// Current session. This is used to 'enhance' updates from the translator in the Market State
MarketSession session = 11;
/// 'T' session. This is used to 'enhance' updates from the translator in the Market State
MarketSession tSession = 12;
/// Previous session. This is used to 'enhance' updates from the translator in the Market State
MarketSession previousSession = 13;
/// True if message applies to regional/participant member
bool regional = 14;
/// 'Z' session. Includes all trades, even the ones that do not update Last.
MarketSession zSession = 15;
oneof data {
News news = 20;
ClearBook clearBook = 21;
InstrumentStatus instrumentStatus = 22;
BestBidOffer bbo = 23;
DepthPriceLevel depthPriceLevel = 24;
DepthOrder depthOrder = 25;
IndexValue index = 26;
Trades trades = 27;
Open open = 28;
High high = 29;
Low low = 30;
Close close = 31;
PrevClose prevClose = 32;
Last last = 33;
YearHigh yearHigh = 34;
YearLow yearLow = 35;
Volume volume = 36;
Settlement settlement = 37;
OpenInterest openInterest = 38;
Vwap vwap = 39;
DividendsIncomeDistributions dividendsIncomeDistributions = 40;
NumberOfTrades numberOfTrades = 41;
MonetaryValue monetaryValue = 42;
CapitalDistributions capitalDistributions = 43;
SharesOutstanding sharesOutstanding = 44;
NetAssetValue netAssetValue = 45;
MarketSummary marketSummary = 46;
HighRolling highRolling = 47;
LowRolling lowRolling = 48;
RequestForQuote requestForQuote = 49;
}
}
/// Depth Price Level
message DepthPriceLevel {
repeated Entry levels = 1;
message Entry {
oneof data {
AddPriceLevel addPriceLevel = 1;
DeletePriceLevel deletePriceLevel = 2;
ModifyPriceLevel modifyPriceLevel = 3;
}
}
}
/// Depth By Order
message DepthOrder {
repeated Entry orders = 1;
message Entry {
oneof data {
AddOrder addOrder = 1;
DeleteOrder deleteOrder = 2;
ModifyOrder modifyOrder = 3;
}
}
}
/// News or informational message
message News {
// Origination time = UTC timestamp nano seconds since Unix epoch
sint64 originationTime = 1;
string source = 2;
string languageCode = 3;
string headLine = 4;
string text = 5;
repeated string symbols = 6;
}
/// Clear all data from the order books that are configured for this market.
message ClearBook {
sint32 reserved = 1;
sint64 transactionTime = 2;
}
//
// Instrument Status
//
message InstrumentStatus {
// UTC Timestamp, nano seconds since Unix epoch
sint64 transactionTime = 9;
/// Trading status.
InstrumentTradingStatus tradingStatus = 10;
// UTC Timestamp, nano seconds since Unix epoch
sint64 openingTime = 11;
string note = 12;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 13;
RegulationSHOShortSalePriceTest regulationSHOShortSalePriceTest = 14;
/// Prior trading status for the instrument.
InstrumentTradingStatus priorTradingStatus = 15;
}
/// Best Bid and Offer.
/// If a side is not present, then that side has been deleted.
/// By default this value is the NBBO, if regional/participant quote then regional = true
message BestBidOffer {
// UTC Timestamp, nano seconds since Unix epoch
sint64 transactionTime = 9;
/// Divide by priceDenominator
sint64 bidPrice = 10;
/// Divide by quantityDenominator
sint64 bidQuantity = 11;
sint32 bidOrderCount = 12;
/// Liquidity provider information
// For Forex: BANK:CITY
// For Equities: EXCHANGE_MIC
bytes bidOriginator = 13;
bytes bidQuoteCondition = 14;
/// Divide by priceDenominator
sint64 offerPrice = 20;
/// Divide by quantityDenominator
sint64 offerQuantity = 21;
sint32 offerOrderCount = 22;
/// Liquidity provider information
// For Forex: BANK:CITY
// For Equities: EXCHANGE_MIC
bytes offerOriginator = 23;
bytes offerQuoteCondition = 24;
bytes quoteCondition = 30;
/// By default this BBO is the NBBO
/// Deprecated bool nationalBboUpdated = 31;
reserved 31;
/// True if regional/participant member quote
bool regional = 32;
/// True if not persisted in the EOD database.
bool transient = 33;
}
/// Insert a new price level, pushing existing levels down
message AddPriceLevel {
// UTC Timestamp, nano seconds since Unix epoch
sint64 transactionTime = 9;
/// price level index, starting at 1
sint32 level = 10;
BookSide side = 11;
/// Divide by priceDenominator
sint64 price = 12;
/// Divide by quantityDenominator
sint64 quantity = 13;
sint32 orderCount = 14;
sint64 impliedQuantity = 15;
}
/// Delete an existing price level, pulling existing levels up
message DeletePriceLevel {
// UTC Timestamp, nano seconds since Unix epoch
sint64 transactionTime = 9;
/// price level index, starting at 1
sint32 level = 10;
BookSide side = 11;
}
/// Modify the quantity or orderCount of an existing price level.
/// The price itself will not change.
message ModifyPriceLevel {
// UTC Timestamp, nano seconds since Unix epoch
sint64 transactionTime = 9;
/// price level index, starting at 1
sint32 level = 10;
BookSide side = 11;
/// Divide by priceDenominator
sint64 price = 12;
/// Divide by quantityDenominator
sint64 quantity = 13;
sint32 orderCount = 14;
sint64 impliedQuantity = 15;
}
// Add an order to the order book. Indexed by orderId, which is unique per channel
message AddOrder {
sint64 transactionTime = 9;
sint64 orderId = 10;
BookSide side = 11;
sint64 price = 12;
sint64 quantity = 13;
bool isImplied = 14;
sint64 priority = 15;
}
/// Delete an order from the order book. Indexed by orderId, which is unique per channel
message DeleteOrder {
sint64 transactionTime = 9;
sint64 orderId = 10;
BookSide side = 11;
}
/// Modify the price or quantity of an order. The side and implied flag cannot change
message ModifyOrder {
sint64 transactionTime = 9;
sint64 orderId = 10;
BookSide side = 11;
sint64 price = 12;
sint64 quantity = 13;
bool isImplied = 14;
sint64 priority = 15;
}
/// For non-tradable index products
message IndexValue {
// UTC Timestamp, nano seconds since Unix epoch
sint64 transactionTime = 9;
// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
sint64 last = 11;
sint64 volume = 12;
sint64 open = 13;
sint64 settlementOpen = 14;
sint64 specialOpen = 15;
sint64 high = 16;
sint64 low = 17;
sint64 close = 18;
sint64 bid = 19;
sint64 offer = 20;
}
/// Trades
message Trades {
repeated Entry trades = 1;
message Entry {
oneof data {
Trade trade = 1;
TradeCorrection tradeCorrection = 2;
TradeCancel tradeCancel = 3;
}
}
}
/// A live trade. When received, update the "last" field
message Trade {
// Market participant/originator
bytes originatorId = 8;
// UTC Timestamp, nano seconds since Unix epoch
sint64 transactionTime = 9;
/// Divide by priceDenominator
sint64 price = 10;
/// Divide by quantityDenominator
sint64 quantity = 11;
bytes tradeId = 12;
/// The side of the aggressing order that caused the trade
BookSide side = 13;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 14;
bytes buyerId = 15;
bytes sellerId = 16;
bool openingTrade = 17;
bool systemPriced = 18;
bool marketOnClose = 19;
bool oddLot = 20;
SettlementTerms settlementTerms = 21;
CrossType crossType = 22;
bool byPass = 23;
sint64 lastPrice = 24;
bytes saleCondition = 25;
string currency = 26;
// Does not update Last
bool doesNotUpdateLast = 27;
// Does not update Volume
bool doesNotUpdateVolume = 28;
string session = 30;
// Is this a block trade.
bool blockTrade = 31;
/// Distribution time in nano seconds since epoch.
sint64 distributionTime = 32;
/// time in nano seconds since epoch.
sint64 transactionTime2 = 33;
string consolidatedPriceIndicator = 34;
/// True if not persisted in the EOD database.
bool transient = 35;
/// Index short name used to identify index.
string indexShortName = 36;
}
/// Trade Correction
message TradeCorrection {
// Market participant/originator
bytes originatorId = 8;
sint64 transactionTime = 9;
// Corrected Price
sint64 price = 10;
// Corrected Quantity
sint64 quantity = 11;
bytes tradeId = 12;
BookSide side = 13;
// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 14;
bytes buyerId = 15;
bytes sellerId = 16;
bool openingTrade = 17;
bool systemPriced = 18;
bool marketOnClose = 19;
bool oddLot = 20;
SettlementTerms settlementTerms = 21;
CrossType crossType = 22;
bool byPass = 23;
bytes originalTradeId = 24;
bytes saleCondition = 25;
string currency = 26;
/// Distribution time in nano seconds since epoch.
sint64 distributionTime = 27;
/// time in nano seconds since epoch.
sint64 transactionTime2 = 28;
// Original Price
sint64 originalTradePrice = 29;
// Original Quantity
sint64 originalTradeQuantity = 30;
}
//
// Trade Cancel/Break
//
message TradeCancel {
// Market participant/originator
bytes originatorId = 8;
sint64 transactionTime = 9;
sint64 correctedTradePrice = 10;
sint64 correctedTradeQuantity = 11;
bytes tradeId = 12;
bytes saleCondition = 13;
string currency = 14;
/// Distribution time in nano seconds since epoch.
sint64 distributionTime = 15;
/// time in nano seconds since epoch.
sint64 transactionTime2 = 16;
}
message Open {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// Divide by priceDenominator
sint64 price = 11;
OpenCloseSettlementFlag OpenCloseSettlementFlag = 12;
string currency = 13;
}
message High {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// Divide by priceDenominator
sint64 price = 11;
string currency = 12;
}
// 24 hour rolling window
message HighRolling {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// Divide by priceDenominator
sint64 price = 11;
string currency = 12;
}
message Low {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// Divide by priceDenominator
sint64 price = 11;
string currency = 12;
}
// 24 hour rolling window
message LowRolling {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// Divide by priceDenominator
sint64 price = 11;
string currency = 12;
}
message Close {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// Divide by priceDenominator
sint64 price = 11;
string currency = 12;
}
message PrevClose {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// Divide by priceDenominator
sint64 price = 11;
string currency = 12;
}
message Last {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// Divide by priceDenominator
sint64 price = 11;
/// Divide by quantityDenominator
sint64 quantity = 12;
string currency = 13;
string session = 30;
}
/// 52 week
message YearHigh {
sint64 transactionTime = 9;
/// Divide by priceDenominator
sint64 price = 10;
string currency = 11;
}
/// 52 week
message YearLow {
sint64 transactionTime = 9;
/// Divide by priceDenominator
sint64 price = 10;
string currency = 11;
}
/// Total volume traded
message Volume {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
// Total volume traded.
sint64 volume = 11;
}
/// Total number of trades
message NumberOfTrades {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
sint64 numberTrades = 11;
}
/// Total monetary value of trades
message MonetaryValue {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// 2 decimals of precision
sint64 value = 11;
string valueCurrencyCode = 12;
}
//// Settlement value for futures and options markets.
message Settlement {
sint64 transactionTime = 9;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
/// Divide by priceDenominator
sint64 price = 11;
bool preliminarySettle = 12;
string currency = 13;
SettlementSource settlementSource = 14;
/// Used by CME ITC.
string session = 15;
/// True if not persisted in the EOD database.
bool transient = 16;
/// Reserved
bool reserved = 127;
}
/// Open interest
message OpenInterest {
sint64 transactionTime = 9;
// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
sint64 volume = 11;
}
/// Volume Weighted Average Price
message Vwap {
sint64 transactionTime = 9;
// Date only, format 2012-07-04 -> 20120704
sint32 tradeDate = 10;
sint64 vwap = 11;
}
/// Dividends and Income Distributions
message DividendsIncomeDistributions {
sint64 transactionTime = 6;
string instrumentType = 7;
// Corporate Action
string corporateAction = 8;
// Distribution Type
string distributionType = 9;
// Date only, format 2012-07-04 -> 20120704
sint32 payableDate = 10;
sint32 recordDate = 11;
sint32 exDividendDate = 12;
// Cash amount of distribution
sint64 amount = 13;
string currencyCode = 14;
repeated string notes = 15;
//
sint64 totalCashDistribution = 16;
sint64 nonQualifiedCashDistribution = 17;
sint64 qualifiedCashDistribution = 18;
sint64 taxFreeCashDistribution = 19;
sint64 ordinaryForeignTaxCredit = 20;
sint64 qualifiedForeignTaxCredit = 21;
sint64 stockDividendRatio = 22;
//
sint32 reinvestDate = 23;
}
/// Capital Distributions
message CapitalDistributions {
sint64 transactionTime = 8;
string instrumentType = 9;
// Corporate Action
string corporateAction = 10;
// Date only, format 2012-07-04 -> 20120704
sint32 payableDate = 11;
sint32 recordDate = 12;
sint32 exDate = 13;
// Distributions
sint64 shortTermCapitalGain = 14;
sint64 longTermCapitalGain = 15;
sint64 unallocatedDistributions = 16;
sint64 returnOfCapital = 17;
string currencyCode = 18;
repeated string notes = 19;
//
sint32 reinvestDate = 20;
}
//
message SharesOutstanding {
sint64 sharesOutstanding = 1;
sint64 transactionTime = 2;
}
//
message NetAssetValue {
sint64 netAssetValue = 1;
sint64 transactionTime = 2;
}
/// Intra and EOD Market Summary
message MarketSummary {
sint64 transactionTime = 1;
/// Date only, format 2012-07-04 -> 20120704
sint32 tradingDate = 2;
bool startOfDay = 3;
bool endOfDay = 4;
ClearSet clear = 5;
//
InstrumentStatus instrumentStatus = 9;
BestBidOffer bbo = 10;
Open open = 11;
High high = 12;
Low low = 13;
Close close = 14;
PrevClose prevClose = 15;
Last last = 16;
Volume volume = 17;
Settlement settlement = 18;
OpenInterest openInterest = 19;
Vwap vwap = 20;
// Clears sets of fields
enum ClearSet {
NONE = 0;
ALL = 1;
BA = 2;
CUSTOM_1 = 3;
}
/// Used by CME ITC.
string session = 21;
/// Used to differentiate various ddf messages.
enum SummaryType {
// DDF 2/1 Exchange refresh
EXCHANGE_REFRESH = 0;
// DDF 2/6 Live Prices refresh
REFRESH_LIVE_PRICE = 1;
// DDF 3/C end-of-day commodity prices
EOD_COMMODITY_PRICES = 2;
// DDF 3/S end-of-day stock and forex prices and volume
EOD_STOCK_FOREX_PRICES = 3;
// DDF 3/I end-of-day commodity volume and open interest message
EOD_COMMODITY_STATS = 4;
}
SummaryType summaryType = 22;
/// Total traded volume for the prior day.
Volume prevVolume = 23;
/// True if not persisted in the EOD database.
bool transient = 24;
}
message Context {
repeated ContextData data = 1;
repeated TracePoint tracePoints = 2;
}
message ContextData {
string id = 1;
oneof data {
string vstring = 5;
bytes vbytes = 6;
bool vbool = 7;
sint32 vsint32 = 8;
sint64 vsint64 = 9;
float vfloat = 10;
double vdouble = 11;
}
}
// Tracing
message TracePoint {
string id = 1;
string componentId = 2;
sint64 timestampNs = 3;
int32 componentLatencyNs = 4;
}
// TCP replay request.
message TCPHistoricalReplayRequest {
int32 channel = 1;
int32 resetNumber = 2;
int64 sequence = 3;
int32 count = 4;
string requestId = 5;
}