-
Notifications
You must be signed in to change notification settings - Fork 91
/
order.pb.go
2705 lines (2572 loc) · 71.9 KB
/
order.pb.go
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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: dydxprotocol/clob/order.proto
package types
import (
encoding_binary "encoding/binary"
fmt "fmt"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
types "github.com/dydxprotocol/v4-chain/protocol/x/subaccounts/types"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// Represents the side of the orderbook the order will be placed on.
// Note that Side.SIDE_UNSPECIFIED is an invalid order and cannot be
// placed on the orderbook.
type Order_Side int32
const (
// Default value. This value is invalid and unused.
Order_SIDE_UNSPECIFIED Order_Side = 0
// SIDE_BUY is used to represent a BUY order.
Order_SIDE_BUY Order_Side = 1
// SIDE_SELL is used to represent a SELL order.
Order_SIDE_SELL Order_Side = 2
)
var Order_Side_name = map[int32]string{
0: "SIDE_UNSPECIFIED",
1: "SIDE_BUY",
2: "SIDE_SELL",
}
var Order_Side_value = map[string]int32{
"SIDE_UNSPECIFIED": 0,
"SIDE_BUY": 1,
"SIDE_SELL": 2,
}
func (x Order_Side) String() string {
return proto.EnumName(Order_Side_name, int32(x))
}
func (Order_Side) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{7, 0}
}
// TimeInForce indicates how long an order will remain active before it
// is executed or expires.
type Order_TimeInForce int32
const (
// TIME_IN_FORCE_UNSPECIFIED represents the default behavior where an
// order will first match with existing orders on the book, and any
// remaining size will be added to the book as a maker order.
Order_TIME_IN_FORCE_UNSPECIFIED Order_TimeInForce = 0
// TIME_IN_FORCE_IOC enforces that an order only be matched with
// maker orders on the book. If the order has remaining size after
// matching with existing orders on the book, the remaining size
// is not placed on the book.
Order_TIME_IN_FORCE_IOC Order_TimeInForce = 1
// TIME_IN_FORCE_POST_ONLY enforces that an order only be placed
// on the book as a maker order. Note this means that validators will cancel
// any newly-placed post only orders that would cross with other maker
// orders.
Order_TIME_IN_FORCE_POST_ONLY Order_TimeInForce = 2
// TIME_IN_FORCE_FILL_OR_KILL enforces that an order will either be filled
// completely and immediately by maker orders on the book or canceled if the
// entire amount can‘t be matched.
Order_TIME_IN_FORCE_FILL_OR_KILL Order_TimeInForce = 3
)
var Order_TimeInForce_name = map[int32]string{
0: "TIME_IN_FORCE_UNSPECIFIED",
1: "TIME_IN_FORCE_IOC",
2: "TIME_IN_FORCE_POST_ONLY",
3: "TIME_IN_FORCE_FILL_OR_KILL",
}
var Order_TimeInForce_value = map[string]int32{
"TIME_IN_FORCE_UNSPECIFIED": 0,
"TIME_IN_FORCE_IOC": 1,
"TIME_IN_FORCE_POST_ONLY": 2,
"TIME_IN_FORCE_FILL_OR_KILL": 3,
}
func (x Order_TimeInForce) String() string {
return proto.EnumName(Order_TimeInForce_name, int32(x))
}
func (Order_TimeInForce) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{7, 1}
}
type Order_ConditionType int32
const (
// CONDITION_TYPE_UNSPECIFIED represents the default behavior where an
// order will be placed immediately on the orderbook.
Order_CONDITION_TYPE_UNSPECIFIED Order_ConditionType = 0
// CONDITION_TYPE_STOP_LOSS represents a stop order. A stop order will
// trigger when the oracle price moves at or above the trigger price for
// buys, and at or below the trigger price for sells.
Order_CONDITION_TYPE_STOP_LOSS Order_ConditionType = 1
// CONDITION_TYPE_TAKE_PROFIT represents a take profit order. A take profit
// order will trigger when the oracle price moves at or below the trigger
// price for buys and at or above the trigger price for sells.
Order_CONDITION_TYPE_TAKE_PROFIT Order_ConditionType = 2
)
var Order_ConditionType_name = map[int32]string{
0: "CONDITION_TYPE_UNSPECIFIED",
1: "CONDITION_TYPE_STOP_LOSS",
2: "CONDITION_TYPE_TAKE_PROFIT",
}
var Order_ConditionType_value = map[string]int32{
"CONDITION_TYPE_UNSPECIFIED": 0,
"CONDITION_TYPE_STOP_LOSS": 1,
"CONDITION_TYPE_TAKE_PROFIT": 2,
}
func (x Order_ConditionType) String() string {
return proto.EnumName(Order_ConditionType_name, int32(x))
}
func (Order_ConditionType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{7, 2}
}
// OrderId refers to a single order belonging to a Subaccount.
type OrderId struct {
// The subaccount ID that opened this order.
// Note that this field has `gogoproto.nullable = false` so that it is
// generated as a value instead of a pointer. This is because the `OrderId`
// proto is used as a key within maps, and map comparisons will compare
// pointers for equality (when the desired behavior is to compare the values).
SubaccountId types.SubaccountId `protobuf:"bytes,1,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id"`
// The client ID of this order, unique with respect to the specific
// sub account (I.E., the same subaccount can't have two orders with
// the same ClientId).
ClientId uint32 `protobuf:"fixed32,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// order_flags represent order flags for the order. This field is invalid if
// it's greater than 127 (larger than one byte). Each bit in the first byte
// represents a different flag. Currently only two flags are supported.
//
// Starting from the bit after the most MSB (note that the MSB is used in
// proto varint encoding, and therefore cannot be used): Bit 1 is set if this
// order is a Long-Term order (0x40, or 64 as a uint8). Bit 2 is set if this
// order is a Conditional order (0x20, or 32 as a uint8).
//
// If neither bit is set, the order is assumed to be a Short-Term order.
//
// If both bits are set or bits other than the 2nd and 3rd are set, the order
// ID is invalid.
OrderFlags uint32 `protobuf:"varint,3,opt,name=order_flags,json=orderFlags,proto3" json:"order_flags,omitempty"`
// ID of the CLOB the order is created for.
ClobPairId uint32 `protobuf:"varint,4,opt,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"`
}
func (m *OrderId) Reset() { *m = OrderId{} }
func (m *OrderId) String() string { return proto.CompactTextString(m) }
func (*OrderId) ProtoMessage() {}
func (*OrderId) Descriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{0}
}
func (m *OrderId) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OrderId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OrderId.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *OrderId) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrderId.Merge(m, src)
}
func (m *OrderId) XXX_Size() int {
return m.Size()
}
func (m *OrderId) XXX_DiscardUnknown() {
xxx_messageInfo_OrderId.DiscardUnknown(m)
}
var xxx_messageInfo_OrderId proto.InternalMessageInfo
func (m *OrderId) GetSubaccountId() types.SubaccountId {
if m != nil {
return m.SubaccountId
}
return types.SubaccountId{}
}
func (m *OrderId) GetClientId() uint32 {
if m != nil {
return m.ClientId
}
return 0
}
func (m *OrderId) GetOrderFlags() uint32 {
if m != nil {
return m.OrderFlags
}
return 0
}
func (m *OrderId) GetClobPairId() uint32 {
if m != nil {
return m.ClobPairId
}
return 0
}
// OrdersFilledDuringLatestBlock represents a list of `OrderIds` that were
// filled by any non-zero amount in the latest block.
type OrdersFilledDuringLatestBlock struct {
// A list of unique order_ids that were filled by any non-zero amount in the
// latest block.
OrderIds []OrderId `protobuf:"bytes,1,rep,name=order_ids,json=orderIds,proto3" json:"order_ids"`
}
func (m *OrdersFilledDuringLatestBlock) Reset() { *m = OrdersFilledDuringLatestBlock{} }
func (m *OrdersFilledDuringLatestBlock) String() string { return proto.CompactTextString(m) }
func (*OrdersFilledDuringLatestBlock) ProtoMessage() {}
func (*OrdersFilledDuringLatestBlock) Descriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{1}
}
func (m *OrdersFilledDuringLatestBlock) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OrdersFilledDuringLatestBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OrdersFilledDuringLatestBlock.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *OrdersFilledDuringLatestBlock) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrdersFilledDuringLatestBlock.Merge(m, src)
}
func (m *OrdersFilledDuringLatestBlock) XXX_Size() int {
return m.Size()
}
func (m *OrdersFilledDuringLatestBlock) XXX_DiscardUnknown() {
xxx_messageInfo_OrdersFilledDuringLatestBlock.DiscardUnknown(m)
}
var xxx_messageInfo_OrdersFilledDuringLatestBlock proto.InternalMessageInfo
func (m *OrdersFilledDuringLatestBlock) GetOrderIds() []OrderId {
if m != nil {
return m.OrderIds
}
return nil
}
// PotentiallyPrunableOrders represents a list of orders that may be prunable
// from state at a future block height.
type PotentiallyPrunableOrders struct {
// A list of unique order_ids that may potentially be pruned from state at a
// future block height.
OrderIds []OrderId `protobuf:"bytes,1,rep,name=order_ids,json=orderIds,proto3" json:"order_ids"`
}
func (m *PotentiallyPrunableOrders) Reset() { *m = PotentiallyPrunableOrders{} }
func (m *PotentiallyPrunableOrders) String() string { return proto.CompactTextString(m) }
func (*PotentiallyPrunableOrders) ProtoMessage() {}
func (*PotentiallyPrunableOrders) Descriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{2}
}
func (m *PotentiallyPrunableOrders) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PotentiallyPrunableOrders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PotentiallyPrunableOrders.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PotentiallyPrunableOrders) XXX_Merge(src proto.Message) {
xxx_messageInfo_PotentiallyPrunableOrders.Merge(m, src)
}
func (m *PotentiallyPrunableOrders) XXX_Size() int {
return m.Size()
}
func (m *PotentiallyPrunableOrders) XXX_DiscardUnknown() {
xxx_messageInfo_PotentiallyPrunableOrders.DiscardUnknown(m)
}
var xxx_messageInfo_PotentiallyPrunableOrders proto.InternalMessageInfo
func (m *PotentiallyPrunableOrders) GetOrderIds() []OrderId {
if m != nil {
return m.OrderIds
}
return nil
}
// OrderFillState represents the fill amount of an order according to on-chain
// state. This proto includes both the current on-chain fill amount of the
// order, as well as the block at which this information can be pruned from
// state.
type OrderFillState struct {
// The current fillAmount of the order according to on-chain state.
FillAmount uint64 `protobuf:"varint,1,opt,name=fill_amount,json=fillAmount,proto3" json:"fill_amount,omitempty"`
// The block height at which the fillAmount state for this order can be
// pruned.
PrunableBlockHeight uint32 `protobuf:"varint,2,opt,name=prunable_block_height,json=prunableBlockHeight,proto3" json:"prunable_block_height,omitempty"`
}
func (m *OrderFillState) Reset() { *m = OrderFillState{} }
func (m *OrderFillState) String() string { return proto.CompactTextString(m) }
func (*OrderFillState) ProtoMessage() {}
func (*OrderFillState) Descriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{3}
}
func (m *OrderFillState) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *OrderFillState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_OrderFillState.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *OrderFillState) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrderFillState.Merge(m, src)
}
func (m *OrderFillState) XXX_Size() int {
return m.Size()
}
func (m *OrderFillState) XXX_DiscardUnknown() {
xxx_messageInfo_OrderFillState.DiscardUnknown(m)
}
var xxx_messageInfo_OrderFillState proto.InternalMessageInfo
func (m *OrderFillState) GetFillAmount() uint64 {
if m != nil {
return m.FillAmount
}
return 0
}
func (m *OrderFillState) GetPrunableBlockHeight() uint32 {
if m != nil {
return m.PrunableBlockHeight
}
return 0
}
// StatefulOrderTimeSliceValue represents the type of the value of the
// `StatefulOrdersTimeSlice` in state. The `StatefulOrdersTimeSlice`
// in state consists of key/value pairs where the keys are UTF-8-encoded
// `RFC3339NANO` timestamp strings with right-padded zeroes and no
// time zone info, and the values are of type `StatefulOrderTimeSliceValue`.
// This `StatefulOrderTimeSliceValue` in state is used for managing stateful
// order expiration. Stateful order expirations can be for either long term
// or conditional orders.
type StatefulOrderTimeSliceValue struct {
// A unique list of order_ids that expire at this timestamp, sorted in
// ascending order by block height and transaction index of each stateful
// order.
OrderIds []OrderId `protobuf:"bytes,1,rep,name=order_ids,json=orderIds,proto3" json:"order_ids"`
}
func (m *StatefulOrderTimeSliceValue) Reset() { *m = StatefulOrderTimeSliceValue{} }
func (m *StatefulOrderTimeSliceValue) String() string { return proto.CompactTextString(m) }
func (*StatefulOrderTimeSliceValue) ProtoMessage() {}
func (*StatefulOrderTimeSliceValue) Descriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{4}
}
func (m *StatefulOrderTimeSliceValue) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *StatefulOrderTimeSliceValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_StatefulOrderTimeSliceValue.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *StatefulOrderTimeSliceValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatefulOrderTimeSliceValue.Merge(m, src)
}
func (m *StatefulOrderTimeSliceValue) XXX_Size() int {
return m.Size()
}
func (m *StatefulOrderTimeSliceValue) XXX_DiscardUnknown() {
xxx_messageInfo_StatefulOrderTimeSliceValue.DiscardUnknown(m)
}
var xxx_messageInfo_StatefulOrderTimeSliceValue proto.InternalMessageInfo
func (m *StatefulOrderTimeSliceValue) GetOrderIds() []OrderId {
if m != nil {
return m.OrderIds
}
return nil
}
// LongTermOrderPlacement represents the placement of a stateful order in
// state. It stores the stateful order itself and the `BlockHeight` and
// `TransactionIndex` at which the order was placed.
type LongTermOrderPlacement struct {
Order Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order"`
// The block height and transaction index at which the order was placed.
// Used for ordering by time priority when the chain is restarted.
PlacementIndex TransactionOrdering `protobuf:"bytes,2,opt,name=placement_index,json=placementIndex,proto3" json:"placement_index"`
}
func (m *LongTermOrderPlacement) Reset() { *m = LongTermOrderPlacement{} }
func (m *LongTermOrderPlacement) String() string { return proto.CompactTextString(m) }
func (*LongTermOrderPlacement) ProtoMessage() {}
func (*LongTermOrderPlacement) Descriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{5}
}
func (m *LongTermOrderPlacement) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *LongTermOrderPlacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_LongTermOrderPlacement.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *LongTermOrderPlacement) XXX_Merge(src proto.Message) {
xxx_messageInfo_LongTermOrderPlacement.Merge(m, src)
}
func (m *LongTermOrderPlacement) XXX_Size() int {
return m.Size()
}
func (m *LongTermOrderPlacement) XXX_DiscardUnknown() {
xxx_messageInfo_LongTermOrderPlacement.DiscardUnknown(m)
}
var xxx_messageInfo_LongTermOrderPlacement proto.InternalMessageInfo
func (m *LongTermOrderPlacement) GetOrder() Order {
if m != nil {
return m.Order
}
return Order{}
}
func (m *LongTermOrderPlacement) GetPlacementIndex() TransactionOrdering {
if m != nil {
return m.PlacementIndex
}
return TransactionOrdering{}
}
// ConditionalOrderPlacement represents the placement of a conditional order in
// state. It stores the stateful order itself, the `BlockHeight` and
// `TransactionIndex` at which the order was placed and triggered.
type ConditionalOrderPlacement struct {
Order Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order"`
// The block height and transaction index at which the order was placed.
PlacementIndex TransactionOrdering `protobuf:"bytes,2,opt,name=placement_index,json=placementIndex,proto3" json:"placement_index"`
// The block height and transaction index at which the order was triggered.
// Set to be nil if the transaction has not been triggered.
// Used for ordering by time priority when the chain is restarted.
TriggerIndex *TransactionOrdering `protobuf:"bytes,3,opt,name=trigger_index,json=triggerIndex,proto3" json:"trigger_index,omitempty"`
}
func (m *ConditionalOrderPlacement) Reset() { *m = ConditionalOrderPlacement{} }
func (m *ConditionalOrderPlacement) String() string { return proto.CompactTextString(m) }
func (*ConditionalOrderPlacement) ProtoMessage() {}
func (*ConditionalOrderPlacement) Descriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{6}
}
func (m *ConditionalOrderPlacement) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ConditionalOrderPlacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ConditionalOrderPlacement.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ConditionalOrderPlacement) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConditionalOrderPlacement.Merge(m, src)
}
func (m *ConditionalOrderPlacement) XXX_Size() int {
return m.Size()
}
func (m *ConditionalOrderPlacement) XXX_DiscardUnknown() {
xxx_messageInfo_ConditionalOrderPlacement.DiscardUnknown(m)
}
var xxx_messageInfo_ConditionalOrderPlacement proto.InternalMessageInfo
func (m *ConditionalOrderPlacement) GetOrder() Order {
if m != nil {
return m.Order
}
return Order{}
}
func (m *ConditionalOrderPlacement) GetPlacementIndex() TransactionOrdering {
if m != nil {
return m.PlacementIndex
}
return TransactionOrdering{}
}
func (m *ConditionalOrderPlacement) GetTriggerIndex() *TransactionOrdering {
if m != nil {
return m.TriggerIndex
}
return nil
}
// Order represents a single order belonging to a `Subaccount`
// for a particular `ClobPair`.
type Order struct {
// The unique ID of this order. Meant to be unique across all orders.
OrderId OrderId `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id"`
Side Order_Side `protobuf:"varint,2,opt,name=side,proto3,enum=dydxprotocol.clob.Order_Side" json:"side,omitempty"`
// The size of this order in base quantums. Must be a multiple of
// `ClobPair.StepBaseQuantums` (where `ClobPair.Id = orderId.ClobPairId`).
Quantums uint64 `protobuf:"varint,3,opt,name=quantums,proto3" json:"quantums,omitempty"`
// The price level that this order will be placed at on the orderbook,
// in subticks. Must be a multiple of ClobPair.SubticksPerTick
// (where `ClobPair.Id = orderId.ClobPairId`).
Subticks uint64 `protobuf:"varint,4,opt,name=subticks,proto3" json:"subticks,omitempty"`
// Information about when the order expires.
//
// Types that are valid to be assigned to GoodTilOneof:
//
// *Order_GoodTilBlock
// *Order_GoodTilBlockTime
GoodTilOneof isOrder_GoodTilOneof `protobuf_oneof:"good_til_oneof"`
// The time in force of this order.
TimeInForce Order_TimeInForce `protobuf:"varint,7,opt,name=time_in_force,json=timeInForce,proto3,enum=dydxprotocol.clob.Order_TimeInForce" json:"time_in_force,omitempty"`
// Enforces that the order can only reduce the size of an existing position.
// If a ReduceOnly order would change the side of the existing position,
// its size is reduced to that of the remaining size of the position.
// If existing orders on the book with ReduceOnly
// would already close the position, the least aggressive (out-of-the-money)
// ReduceOnly orders are resized and canceled first.
ReduceOnly bool `protobuf:"varint,8,opt,name=reduce_only,json=reduceOnly,proto3" json:"reduce_only,omitempty"`
// Set of bit flags set arbitrarily by clients and ignored by the protocol.
// Used by indexer to infer information about a placed order.
ClientMetadata uint32 `protobuf:"varint,9,opt,name=client_metadata,json=clientMetadata,proto3" json:"client_metadata,omitempty"`
ConditionType Order_ConditionType `protobuf:"varint,10,opt,name=condition_type,json=conditionType,proto3,enum=dydxprotocol.clob.Order_ConditionType" json:"condition_type,omitempty"`
// conditional_order_trigger_subticks represents the price at which this order
// will be triggered. If the condition_type is CONDITION_TYPE_UNSPECIFIED,
// this value is enforced to be 0. If this value is nonzero, condition_type
// cannot be CONDITION_TYPE_UNSPECIFIED. Value is in subticks.
// Must be a multiple of ClobPair.SubticksPerTick (where `ClobPair.Id =
// orderId.ClobPairId`).
ConditionalOrderTriggerSubticks uint64 `protobuf:"varint,11,opt,name=conditional_order_trigger_subticks,json=conditionalOrderTriggerSubticks,proto3" json:"conditional_order_trigger_subticks,omitempty"`
}
func (m *Order) Reset() { *m = Order{} }
func (m *Order) String() string { return proto.CompactTextString(m) }
func (*Order) ProtoMessage() {}
func (*Order) Descriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{7}
}
func (m *Order) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Order.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Order) XXX_Merge(src proto.Message) {
xxx_messageInfo_Order.Merge(m, src)
}
func (m *Order) XXX_Size() int {
return m.Size()
}
func (m *Order) XXX_DiscardUnknown() {
xxx_messageInfo_Order.DiscardUnknown(m)
}
var xxx_messageInfo_Order proto.InternalMessageInfo
type isOrder_GoodTilOneof interface {
isOrder_GoodTilOneof()
MarshalTo([]byte) (int, error)
Size() int
}
type Order_GoodTilBlock struct {
GoodTilBlock uint32 `protobuf:"varint,5,opt,name=good_til_block,json=goodTilBlock,proto3,oneof" json:"good_til_block,omitempty"`
}
type Order_GoodTilBlockTime struct {
GoodTilBlockTime uint32 `protobuf:"fixed32,6,opt,name=good_til_block_time,json=goodTilBlockTime,proto3,oneof" json:"good_til_block_time,omitempty"`
}
func (*Order_GoodTilBlock) isOrder_GoodTilOneof() {}
func (*Order_GoodTilBlockTime) isOrder_GoodTilOneof() {}
func (m *Order) GetGoodTilOneof() isOrder_GoodTilOneof {
if m != nil {
return m.GoodTilOneof
}
return nil
}
func (m *Order) GetOrderId() OrderId {
if m != nil {
return m.OrderId
}
return OrderId{}
}
func (m *Order) GetSide() Order_Side {
if m != nil {
return m.Side
}
return Order_SIDE_UNSPECIFIED
}
func (m *Order) GetQuantums() uint64 {
if m != nil {
return m.Quantums
}
return 0
}
func (m *Order) GetSubticks() uint64 {
if m != nil {
return m.Subticks
}
return 0
}
func (m *Order) GetGoodTilBlock() uint32 {
if x, ok := m.GetGoodTilOneof().(*Order_GoodTilBlock); ok {
return x.GoodTilBlock
}
return 0
}
func (m *Order) GetGoodTilBlockTime() uint32 {
if x, ok := m.GetGoodTilOneof().(*Order_GoodTilBlockTime); ok {
return x.GoodTilBlockTime
}
return 0
}
func (m *Order) GetTimeInForce() Order_TimeInForce {
if m != nil {
return m.TimeInForce
}
return Order_TIME_IN_FORCE_UNSPECIFIED
}
func (m *Order) GetReduceOnly() bool {
if m != nil {
return m.ReduceOnly
}
return false
}
func (m *Order) GetClientMetadata() uint32 {
if m != nil {
return m.ClientMetadata
}
return 0
}
func (m *Order) GetConditionType() Order_ConditionType {
if m != nil {
return m.ConditionType
}
return Order_CONDITION_TYPE_UNSPECIFIED
}
func (m *Order) GetConditionalOrderTriggerSubticks() uint64 {
if m != nil {
return m.ConditionalOrderTriggerSubticks
}
return 0
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Order) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Order_GoodTilBlock)(nil),
(*Order_GoodTilBlockTime)(nil),
}
}
// TransactionOrdering represents a unique location in the block where a
// transaction was placed. This proto includes both block height and the
// transaction index that the specific transaction was placed. This information
// is used for ordering by time priority when the chain is restarted.
type TransactionOrdering struct {
// Block height in which the transaction was placed.
BlockHeight uint32 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
// Within the block, the unique transaction index.
TransactionIndex uint32 `protobuf:"varint,2,opt,name=transaction_index,json=transactionIndex,proto3" json:"transaction_index,omitempty"`
}
func (m *TransactionOrdering) Reset() { *m = TransactionOrdering{} }
func (m *TransactionOrdering) String() string { return proto.CompactTextString(m) }
func (*TransactionOrdering) ProtoMessage() {}
func (*TransactionOrdering) Descriptor() ([]byte, []int) {
return fileDescriptor_673c6f4faa93736b, []int{8}
}
func (m *TransactionOrdering) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *TransactionOrdering) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_TransactionOrdering.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *TransactionOrdering) XXX_Merge(src proto.Message) {
xxx_messageInfo_TransactionOrdering.Merge(m, src)
}
func (m *TransactionOrdering) XXX_Size() int {
return m.Size()
}
func (m *TransactionOrdering) XXX_DiscardUnknown() {
xxx_messageInfo_TransactionOrdering.DiscardUnknown(m)
}
var xxx_messageInfo_TransactionOrdering proto.InternalMessageInfo
func (m *TransactionOrdering) GetBlockHeight() uint32 {
if m != nil {
return m.BlockHeight
}
return 0
}
func (m *TransactionOrdering) GetTransactionIndex() uint32 {
if m != nil {
return m.TransactionIndex
}
return 0
}
func init() {
proto.RegisterEnum("dydxprotocol.clob.Order_Side", Order_Side_name, Order_Side_value)
proto.RegisterEnum("dydxprotocol.clob.Order_TimeInForce", Order_TimeInForce_name, Order_TimeInForce_value)
proto.RegisterEnum("dydxprotocol.clob.Order_ConditionType", Order_ConditionType_name, Order_ConditionType_value)
proto.RegisterType((*OrderId)(nil), "dydxprotocol.clob.OrderId")
proto.RegisterType((*OrdersFilledDuringLatestBlock)(nil), "dydxprotocol.clob.OrdersFilledDuringLatestBlock")
proto.RegisterType((*PotentiallyPrunableOrders)(nil), "dydxprotocol.clob.PotentiallyPrunableOrders")
proto.RegisterType((*OrderFillState)(nil), "dydxprotocol.clob.OrderFillState")
proto.RegisterType((*StatefulOrderTimeSliceValue)(nil), "dydxprotocol.clob.StatefulOrderTimeSliceValue")
proto.RegisterType((*LongTermOrderPlacement)(nil), "dydxprotocol.clob.LongTermOrderPlacement")
proto.RegisterType((*ConditionalOrderPlacement)(nil), "dydxprotocol.clob.ConditionalOrderPlacement")
proto.RegisterType((*Order)(nil), "dydxprotocol.clob.Order")
proto.RegisterType((*TransactionOrdering)(nil), "dydxprotocol.clob.TransactionOrdering")
}
func init() { proto.RegisterFile("dydxprotocol/clob/order.proto", fileDescriptor_673c6f4faa93736b) }
var fileDescriptor_673c6f4faa93736b = []byte{
// 989 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0x8e, 0xdb, 0x6c, 0x9b, 0x9e, 0xfc, 0xac, 0x3b, 0xdd, 0x05, 0xb7, 0xa5, 0x69, 0x88, 0x50,
0x29, 0x42, 0x24, 0xa2, 0xac, 0x90, 0x10, 0xe2, 0x62, 0xdb, 0x26, 0xaa, 0xd5, 0xb4, 0x0e, 0xb6,
0x8b, 0xd4, 0x15, 0x62, 0xe4, 0xd8, 0x53, 0x77, 0xb4, 0x13, 0x4f, 0xb0, 0xc7, 0xa8, 0xb9, 0xe3,
0x11, 0x78, 0x09, 0xde, 0x82, 0x07, 0xd8, 0xcb, 0xbd, 0xe4, 0x0a, 0xa1, 0xf6, 0x19, 0x10, 0xb7,
0x68, 0xc6, 0x6e, 0xea, 0x74, 0xb7, 0x42, 0x68, 0x6f, 0xb8, 0xf3, 0x7c, 0xe7, 0x3b, 0xdf, 0x9c,
0xdf, 0x91, 0x61, 0x2b, 0x98, 0x06, 0x57, 0x93, 0x98, 0x0b, 0xee, 0x73, 0xd6, 0xf5, 0x19, 0x1f,
0x75, 0x79, 0x1c, 0x90, 0xb8, 0xa3, 0x30, 0xb4, 0x5a, 0x34, 0x77, 0xa4, 0x79, 0xe3, 0x49, 0xc8,
0x43, 0xae, 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8, 0x87, 0x87, 0xb6, 0xd5, 0x37, 0x5d, 0x7d, 0x61, 0x5f, 0x2f, 0x4c, 0x2d, 0x8f, 0x08, 0xbf,
0x68, 0x13, 0x58, 0x7b, 0xcb, 0x7a, 0xa2, 0x0f, 0xa1, 0x36, 0xf7, 0x72, 0x6b, 0x6a, 0x2e, 0xaa,
0xa3, 0xbb, 0x17, 0x1b, 0x7d, 0x0a, 0xab, 0xe2, 0xce, 0xb3, 0xf0, 0xb2, 0xd4, 0x6d, 0xbd, 0x60,
0x50, 0x0b, 0xbe, 0x3f, 0x7c, 0x75, 0xdd, 0xd4, 0x5e, 0x5f, 0x37, 0xb5, 0x3f, 0xaf, 0x9b, 0xda,
0x2f, 0x37, 0xcd, 0xd2, 0xeb, 0x9b, 0x66, 0xe9, 0xf7, 0x9b, 0x66, 0xe9, 0xc5, 0x97, 0x21, 0x15,
0x97, 0xe9, 0xa8, 0xe3, 0xf3, 0x71, 0x77, 0xee, 0x87, 0xe0, 0xa7, 0x67, 0x9f, 0xf9, 0x97, 0x1e,
0x8d, 0xba, 0x33, 0xe4, 0x2a, 0xfb, 0xd9, 0x90, 0x03, 0x98, 0x8c, 0x96, 0x14, 0xfc, 0xc5, 0x3f,
0x01, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x0b, 0xbd, 0x8a, 0x8e, 0x08, 0x00, 0x00,
}
func (m *OrderId) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *OrderId) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *OrderId) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.ClobPairId != 0 {
i = encodeVarintOrder(dAtA, i, uint64(m.ClobPairId))
i--
dAtA[i] = 0x20
}
if m.OrderFlags != 0 {
i = encodeVarintOrder(dAtA, i, uint64(m.OrderFlags))
i--
dAtA[i] = 0x18
}
if m.ClientId != 0 {
i -= 4
encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.ClientId))
i--
dAtA[i] = 0x15
}
{
size, err := m.SubaccountId.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintOrder(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *OrdersFilledDuringLatestBlock) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *OrdersFilledDuringLatestBlock) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *OrdersFilledDuringLatestBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.OrderIds) > 0 {
for iNdEx := len(m.OrderIds) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.OrderIds[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintOrder(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *PotentiallyPrunableOrders) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PotentiallyPrunableOrders) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PotentiallyPrunableOrders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.OrderIds) > 0 {