-
Notifications
You must be signed in to change notification settings - Fork 22
/
commands.pb.go
2782 lines (2479 loc) · 108 KB
/
commands.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-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc (unknown)
// source: vega/commands/v1/commands.proto
package v1
import (
vega "code.vegaprotocol.io/vega/protos/vega"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type UndelegateSubmission_Method int32
const (
UndelegateSubmission_METHOD_UNSPECIFIED UndelegateSubmission_Method = 0
// Undelegate straight away, losing all rewards for the current epoch.
UndelegateSubmission_METHOD_NOW UndelegateSubmission_Method = 1
// Undelegate at the end of an epoch, retaining all rewards for the current epoch.
UndelegateSubmission_METHOD_AT_END_OF_EPOCH UndelegateSubmission_Method = 2
)
// Enum value maps for UndelegateSubmission_Method.
var (
UndelegateSubmission_Method_name = map[int32]string{
0: "METHOD_UNSPECIFIED",
1: "METHOD_NOW",
2: "METHOD_AT_END_OF_EPOCH",
}
UndelegateSubmission_Method_value = map[string]int32{
"METHOD_UNSPECIFIED": 0,
"METHOD_NOW": 1,
"METHOD_AT_END_OF_EPOCH": 2,
}
)
func (x UndelegateSubmission_Method) Enum() *UndelegateSubmission_Method {
p := new(UndelegateSubmission_Method)
*p = x
return p
}
func (x UndelegateSubmission_Method) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (UndelegateSubmission_Method) Descriptor() protoreflect.EnumDescriptor {
return file_vega_commands_v1_commands_proto_enumTypes[0].Descriptor()
}
func (UndelegateSubmission_Method) Type() protoreflect.EnumType {
return &file_vega_commands_v1_commands_proto_enumTypes[0]
}
func (x UndelegateSubmission_Method) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use UndelegateSubmission_Method.Descriptor instead.
func (UndelegateSubmission_Method) EnumDescriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{15, 0}
}
// A command that allows the submission of a batch market instruction which wraps up multiple market instructions into a single transaction.
// These instructions are then processed sequentially in the following order:
// - OrderCancellation
// - OrderAmendment
// - OrderSubmission
// - StopOrderSubmission
// where the maximum allow of instructions in a batch is controlled by the network parameter "spam.protection.max.batchSize".
type BatchMarketInstructions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// List of order cancellations to be processed sequentially.
Cancellations []*OrderCancellation `protobuf:"bytes,1,rep,name=cancellations,proto3" json:"cancellations,omitempty"`
// List of order amendments to be processed sequentially.
Amendments []*OrderAmendment `protobuf:"bytes,2,rep,name=amendments,proto3" json:"amendments,omitempty"`
// List of order submissions to be processed sequentially.
Submissions []*OrderSubmission `protobuf:"bytes,3,rep,name=submissions,proto3" json:"submissions,omitempty"`
// List of stop order cancellations to be processed sequentially.
StopOrdersCancellation []*StopOrdersCancellation `protobuf:"bytes,4,rep,name=stop_orders_cancellation,json=stopOrdersCancellation,proto3" json:"stop_orders_cancellation,omitempty"`
// List of stop order submissions to be processed sequentially.
StopOrdersSubmission []*StopOrdersSubmission `protobuf:"bytes,5,rep,name=stop_orders_submission,json=stopOrdersSubmission,proto3" json:"stop_orders_submission,omitempty"`
}
func (x *BatchMarketInstructions) Reset() {
*x = BatchMarketInstructions{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchMarketInstructions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchMarketInstructions) ProtoMessage() {}
func (x *BatchMarketInstructions) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchMarketInstructions.ProtoReflect.Descriptor instead.
func (*BatchMarketInstructions) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{0}
}
func (x *BatchMarketInstructions) GetCancellations() []*OrderCancellation {
if x != nil {
return x.Cancellations
}
return nil
}
func (x *BatchMarketInstructions) GetAmendments() []*OrderAmendment {
if x != nil {
return x.Amendments
}
return nil
}
func (x *BatchMarketInstructions) GetSubmissions() []*OrderSubmission {
if x != nil {
return x.Submissions
}
return nil
}
func (x *BatchMarketInstructions) GetStopOrdersCancellation() []*StopOrdersCancellation {
if x != nil {
return x.StopOrdersCancellation
}
return nil
}
func (x *BatchMarketInstructions) GetStopOrdersSubmission() []*StopOrdersSubmission {
if x != nil {
return x.StopOrdersSubmission
}
return nil
}
// A command that allows a party to submit a stop order for a given market.
// A stop order is a normal order that remains off the order book and is only submitted if a given trigger is breached from a particular direction.
// If both rises-above and falls-below are configured, then if one is triggered the other will be cancelled (OCO).
type StopOrdersSubmission struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Stop order that will be triggered if the price rises above a given trigger price.
RisesAbove *StopOrderSetup `protobuf:"bytes,1,opt,name=rises_above,json=risesAbove,proto3,oneof" json:"rises_above,omitempty"`
// Stop order that will be triggered if the price falls below a given trigger price.
FallsBelow *StopOrderSetup `protobuf:"bytes,2,opt,name=falls_below,json=fallsBelow,proto3,oneof" json:"falls_below,omitempty"`
}
func (x *StopOrdersSubmission) Reset() {
*x = StopOrdersSubmission{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StopOrdersSubmission) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StopOrdersSubmission) ProtoMessage() {}
func (x *StopOrdersSubmission) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StopOrdersSubmission.ProtoReflect.Descriptor instead.
func (*StopOrdersSubmission) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{1}
}
func (x *StopOrdersSubmission) GetRisesAbove() *StopOrderSetup {
if x != nil {
return x.RisesAbove
}
return nil
}
func (x *StopOrdersSubmission) GetFallsBelow() *StopOrderSetup {
if x != nil {
return x.FallsBelow
}
return nil
}
// Price and expiry configuration for a stop order.
type StopOrderSetup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Order to be submitted once the trigger is breached.
OrderSubmission *OrderSubmission `protobuf:"bytes,1,opt,name=order_submission,json=orderSubmission,proto3" json:"order_submission,omitempty"`
// Timestamp, in Unix nanoseconds, for when the stop order should expire. If not set the stop order will not expire.
ExpiresAt *int64 `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"`
// Strategy to adopt if the expiry time is reached.
ExpiryStrategy *vega.StopOrder_ExpiryStrategy `protobuf:"varint,3,opt,name=expiry_strategy,json=expiryStrategy,proto3,enum=vega.StopOrder_ExpiryStrategy,oneof" json:"expiry_strategy,omitempty"`
// Trigger that will need to be breached for the order to be submitted to the book.
//
// Types that are assignable to Trigger:
//
// *StopOrderSetup_Price
// *StopOrderSetup_TrailingPercentOffset
Trigger isStopOrderSetup_Trigger `protobuf_oneof:"trigger"`
}
func (x *StopOrderSetup) Reset() {
*x = StopOrderSetup{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StopOrderSetup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StopOrderSetup) ProtoMessage() {}
func (x *StopOrderSetup) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StopOrderSetup.ProtoReflect.Descriptor instead.
func (*StopOrderSetup) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{2}
}
func (x *StopOrderSetup) GetOrderSubmission() *OrderSubmission {
if x != nil {
return x.OrderSubmission
}
return nil
}
func (x *StopOrderSetup) GetExpiresAt() int64 {
if x != nil && x.ExpiresAt != nil {
return *x.ExpiresAt
}
return 0
}
func (x *StopOrderSetup) GetExpiryStrategy() vega.StopOrder_ExpiryStrategy {
if x != nil && x.ExpiryStrategy != nil {
return *x.ExpiryStrategy
}
return vega.StopOrder_ExpiryStrategy(0)
}
func (m *StopOrderSetup) GetTrigger() isStopOrderSetup_Trigger {
if m != nil {
return m.Trigger
}
return nil
}
func (x *StopOrderSetup) GetPrice() string {
if x, ok := x.GetTrigger().(*StopOrderSetup_Price); ok {
return x.Price
}
return ""
}
func (x *StopOrderSetup) GetTrailingPercentOffset() string {
if x, ok := x.GetTrigger().(*StopOrderSetup_TrailingPercentOffset); ok {
return x.TrailingPercentOffset
}
return ""
}
type isStopOrderSetup_Trigger interface {
isStopOrderSetup_Trigger()
}
type StopOrderSetup_Price struct {
// Order will be submitted if the last traded price on the market breaches the given price.
Price string `protobuf:"bytes,100,opt,name=price,proto3,oneof"`
}
type StopOrderSetup_TrailingPercentOffset struct {
// Order will be submitted if the last traded price has moved the given percent from the highest/lowest mark price since the stop order was submitted.
TrailingPercentOffset string `protobuf:"bytes,101,opt,name=trailing_percent_offset,json=trailingPercentOffset,proto3,oneof"`
}
func (*StopOrderSetup_Price) isStopOrderSetup_Trigger() {}
func (*StopOrderSetup_TrailingPercentOffset) isStopOrderSetup_Trigger() {}
// A command that instructs the network to cancel untriggered stop orders that were submitted by the sender of this transaction.
// If any cancelled stop order is part of an OCO, both stop orders will be cancelled.
// It is not possible to cancel another party's stop orders with this command.
type StopOrdersCancellation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Restrict cancellations to those submitted to the given market. If not set, all stop orders across all markets will be cancelled.
MarketId *string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3,oneof" json:"market_id,omitempty"`
// Restrict cancellations to a stop order with the given ID. If set, then a market ID must also be provided.
StopOrderId *string `protobuf:"bytes,2,opt,name=stop_order_id,json=stopOrderId,proto3,oneof" json:"stop_order_id,omitempty"`
}
func (x *StopOrdersCancellation) Reset() {
*x = StopOrdersCancellation{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StopOrdersCancellation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StopOrdersCancellation) ProtoMessage() {}
func (x *StopOrdersCancellation) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StopOrdersCancellation.ProtoReflect.Descriptor instead.
func (*StopOrdersCancellation) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{3}
}
func (x *StopOrdersCancellation) GetMarketId() string {
if x != nil && x.MarketId != nil {
return *x.MarketId
}
return ""
}
func (x *StopOrdersCancellation) GetStopOrderId() string {
if x != nil && x.StopOrderId != nil {
return *x.StopOrderId
}
return ""
}
// A command that submits an order to the Vega network for a given market.
type OrderSubmission struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Market ID to submit the order to.
MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
// Price for the order, the price is an integer, for example `123456` is a correctly
// formatted price of `1.23456` assuming market configured to 5 decimal places,
// required field for limit orders, however it is not required for market orders.
// This field is an unsigned integer scaled to the market's decimal places.
Price string `protobuf:"bytes,2,opt,name=price,proto3" json:"price,omitempty"`
// Size for the order, for example, in a futures market the size equals the number of units.
Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
// Which side of the order book the order is for, e.g. buy or sell.
Side vega.Side `protobuf:"varint,4,opt,name=side,proto3,enum=vega.Side" json:"side,omitempty"`
// Time in force indicates how long an order will remain active before it is executed or expires..
TimeInForce vega.Order_TimeInForce `protobuf:"varint,5,opt,name=time_in_force,json=timeInForce,proto3,enum=vega.Order_TimeInForce" json:"time_in_force,omitempty"`
// Timestamp, in Unix nanoseconds, for when the order will expire. Can only be set when the order's time-in-force is GTT.
ExpiresAt int64 `protobuf:"varint,6,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
// Type of the order.
Type vega.Order_Type `protobuf:"varint,7,opt,name=type,proto3,enum=vega.Order_Type" json:"type,omitempty"`
// Arbitrary optional reference for the order, to be used as a human-readable non-unique identifier for the order.
Reference string `protobuf:"bytes,8,opt,name=reference,proto3" json:"reference,omitempty"`
// Pegged order details. If set, the order's price will be offset from a particular reference price of the order book at all times.
PeggedOrder *vega.PeggedOrder `protobuf:"bytes,9,opt,name=pegged_order,json=peggedOrder,proto3" json:"pegged_order,omitempty"`
// If set, the order will only be executed if it would not trade on entry to the order book. Only valid for limit orders.
PostOnly bool `protobuf:"varint,10,opt,name=post_only,json=postOnly,proto3" json:"post_only,omitempty"`
// If set, the order will only be executed if the outcome of the trade moves the trader's position closer to 0.
// Only valid for non-persistent orders.
ReduceOnly bool `protobuf:"varint,11,opt,name=reduce_only,json=reduceOnly,proto3" json:"reduce_only,omitempty"`
// Iceberg order details. If set, the order will exist on the order book in chunks.
IcebergOpts *IcebergOpts `protobuf:"bytes,12,opt,name=iceberg_opts,json=icebergOpts,proto3,oneof" json:"iceberg_opts,omitempty"`
}
func (x *OrderSubmission) Reset() {
*x = OrderSubmission{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderSubmission) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderSubmission) ProtoMessage() {}
func (x *OrderSubmission) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderSubmission.ProtoReflect.Descriptor instead.
func (*OrderSubmission) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{4}
}
func (x *OrderSubmission) GetMarketId() string {
if x != nil {
return x.MarketId
}
return ""
}
func (x *OrderSubmission) GetPrice() string {
if x != nil {
return x.Price
}
return ""
}
func (x *OrderSubmission) GetSize() uint64 {
if x != nil {
return x.Size
}
return 0
}
func (x *OrderSubmission) GetSide() vega.Side {
if x != nil {
return x.Side
}
return vega.Side(0)
}
func (x *OrderSubmission) GetTimeInForce() vega.Order_TimeInForce {
if x != nil {
return x.TimeInForce
}
return vega.Order_TimeInForce(0)
}
func (x *OrderSubmission) GetExpiresAt() int64 {
if x != nil {
return x.ExpiresAt
}
return 0
}
func (x *OrderSubmission) GetType() vega.Order_Type {
if x != nil {
return x.Type
}
return vega.Order_Type(0)
}
func (x *OrderSubmission) GetReference() string {
if x != nil {
return x.Reference
}
return ""
}
func (x *OrderSubmission) GetPeggedOrder() *vega.PeggedOrder {
if x != nil {
return x.PeggedOrder
}
return nil
}
func (x *OrderSubmission) GetPostOnly() bool {
if x != nil {
return x.PostOnly
}
return false
}
func (x *OrderSubmission) GetReduceOnly() bool {
if x != nil {
return x.ReduceOnly
}
return false
}
func (x *OrderSubmission) GetIcebergOpts() *IcebergOpts {
if x != nil {
return x.IcebergOpts
}
return nil
}
// Iceberg order options
type IcebergOpts struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Size of the order that is made visible and can be traded with during the execution of a single order.
PeakSize uint64 `protobuf:"varint,1,opt,name=peak_size,json=peakSize,proto3" json:"peak_size,omitempty"`
// Minimum allowed remaining size of the order before it is replenished back to its peak size.
MinimumVisibleSize uint64 `protobuf:"varint,2,opt,name=minimum_visible_size,json=minimumVisibleSize,proto3" json:"minimum_visible_size,omitempty"`
}
func (x *IcebergOpts) Reset() {
*x = IcebergOpts{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IcebergOpts) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IcebergOpts) ProtoMessage() {}
func (x *IcebergOpts) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IcebergOpts.ProtoReflect.Descriptor instead.
func (*IcebergOpts) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{5}
}
func (x *IcebergOpts) GetPeakSize() uint64 {
if x != nil {
return x.PeakSize
}
return 0
}
func (x *IcebergOpts) GetMinimumVisibleSize() uint64 {
if x != nil {
return x.MinimumVisibleSize
}
return 0
}
// A command that instructs the network to cancel orders, active or partially filled, that were previously submitted by the sender of this transaction.
// It is not possible to cancel another party's order with this command.
type OrderCancellation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Restrict cancellations to an order with the given ID. If set, then a market ID must also be provided.
OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
// Restrict cancellations to those submitted to the given market. If not set, all stop orders across all markets will be cancelled.
MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
}
func (x *OrderCancellation) Reset() {
*x = OrderCancellation{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderCancellation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderCancellation) ProtoMessage() {}
func (x *OrderCancellation) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderCancellation.ProtoReflect.Descriptor instead.
func (*OrderCancellation) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{6}
}
func (x *OrderCancellation) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *OrderCancellation) GetMarketId() string {
if x != nil {
return x.MarketId
}
return ""
}
// A command that allows a party to update the details of an existing order.
// Any field that is left unset or as a default value indicates that this field on the original order will be left unchanged.
// It is not possible to change an order's type through this command.
type OrderAmendment struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// ID of the order to amend.
OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
// Market ID that the order was originally submitted to.
MarketId string `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
// New price for the order. This field is an unsigned integer scaled to the market's decimal places.
Price *string `protobuf:"bytes,3,opt,name=price,proto3,oneof" json:"price,omitempty"`
// Amend the size for the order by the delta specified:
// - To reduce the size from the current value set a negative integer value
// - To increase the size from the current value, set a positive integer value
// - To leave the size unchanged set a value of zero
// This field needs to be scaled using the market's position decimal places.
SizeDelta int64 `protobuf:"varint,4,opt,name=size_delta,json=sizeDelta,proto3" json:"size_delta,omitempty"`
// Timestamp, in Unix nanoseconds, for the new expiry time for the order.
ExpiresAt *int64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"`
// New time in force for the order.
TimeInForce vega.Order_TimeInForce `protobuf:"varint,6,opt,name=time_in_force,json=timeInForce,proto3,enum=vega.Order_TimeInForce" json:"time_in_force,omitempty"`
// New pegged offset for the order.
// This field is an unsigned integer scaled to the market's decimal places.
PeggedOffset string `protobuf:"bytes,7,opt,name=pegged_offset,json=peggedOffset,proto3" json:"pegged_offset,omitempty"`
// New pegged reference for the order.
PeggedReference vega.PeggedReference `protobuf:"varint,8,opt,name=pegged_reference,json=peggedReference,proto3,enum=vega.PeggedReference" json:"pegged_reference,omitempty"`
}
func (x *OrderAmendment) Reset() {
*x = OrderAmendment{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderAmendment) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderAmendment) ProtoMessage() {}
func (x *OrderAmendment) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OrderAmendment.ProtoReflect.Descriptor instead.
func (*OrderAmendment) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{7}
}
func (x *OrderAmendment) GetOrderId() string {
if x != nil {
return x.OrderId
}
return ""
}
func (x *OrderAmendment) GetMarketId() string {
if x != nil {
return x.MarketId
}
return ""
}
func (x *OrderAmendment) GetPrice() string {
if x != nil && x.Price != nil {
return *x.Price
}
return ""
}
func (x *OrderAmendment) GetSizeDelta() int64 {
if x != nil {
return x.SizeDelta
}
return 0
}
func (x *OrderAmendment) GetExpiresAt() int64 {
if x != nil && x.ExpiresAt != nil {
return *x.ExpiresAt
}
return 0
}
func (x *OrderAmendment) GetTimeInForce() vega.Order_TimeInForce {
if x != nil {
return x.TimeInForce
}
return vega.Order_TimeInForce(0)
}
func (x *OrderAmendment) GetPeggedOffset() string {
if x != nil {
return x.PeggedOffset
}
return ""
}
func (x *OrderAmendment) GetPeggedReference() vega.PeggedReference {
if x != nil {
return x.PeggedReference
}
return vega.PeggedReference(0)
}
// A command that indicates to the network the party's intention to supply liquidity to the given market and become a liquidity provider.
// An active liquidity provider for a market will earn fees based on the trades that occur in the market.
type LiquidityProvisionSubmission struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Market that the submitter wishes to provide liquidity for.
MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
// Amount that the submitter will commit as liquidity to the market, specified as a unitless number in the settlement asset of the market.
// This field is an unsigned integer scaled using the asset's decimal places.
CommitmentAmount string `protobuf:"bytes,2,opt,name=commitment_amount,json=commitmentAmount,proto3" json:"commitment_amount,omitempty"`
// Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per setting fees and rewarding liquidity providers.
Fee string `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"`
// Arbitrary reference to be added to every order created out of this liquidity provision submission.
Reference string `protobuf:"bytes,6,opt,name=reference,proto3" json:"reference,omitempty"`
}
func (x *LiquidityProvisionSubmission) Reset() {
*x = LiquidityProvisionSubmission{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LiquidityProvisionSubmission) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LiquidityProvisionSubmission) ProtoMessage() {}
func (x *LiquidityProvisionSubmission) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LiquidityProvisionSubmission.ProtoReflect.Descriptor instead.
func (*LiquidityProvisionSubmission) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{8}
}
func (x *LiquidityProvisionSubmission) GetMarketId() string {
if x != nil {
return x.MarketId
}
return ""
}
func (x *LiquidityProvisionSubmission) GetCommitmentAmount() string {
if x != nil {
return x.CommitmentAmount
}
return ""
}
func (x *LiquidityProvisionSubmission) GetFee() string {
if x != nil {
return x.Fee
}
return ""
}
func (x *LiquidityProvisionSubmission) GetReference() string {
if x != nil {
return x.Reference
}
return ""
}
// Command that allows a liquidity provider to inform the network that they will stop providing liquidity for a market.
type LiquidityProvisionCancellation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Market that the submitter will stop providing liquidity for.
MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
}
func (x *LiquidityProvisionCancellation) Reset() {
*x = LiquidityProvisionCancellation{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LiquidityProvisionCancellation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LiquidityProvisionCancellation) ProtoMessage() {}
func (x *LiquidityProvisionCancellation) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LiquidityProvisionCancellation.ProtoReflect.Descriptor instead.
func (*LiquidityProvisionCancellation) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{9}
}
func (x *LiquidityProvisionCancellation) GetMarketId() string {
if x != nil {
return x.MarketId
}
return ""
}
// Command that allows a liquidity provider to update the details of their existing liquidity commitment.
// Any field that is left unset or as a default value indicates that this field on the original submission will be left unchanged.
type LiquidityProvisionAmendment struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Market that the submitter wants to amend the liquidity commitment for.
MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
// New commitment amount.
CommitmentAmount string `protobuf:"bytes,2,opt,name=commitment_amount,json=commitmentAmount,proto3" json:"commitment_amount,omitempty"`
// New nominated liquidity fee factor.
Fee string `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"`
// New arbitrary reference to be added to every order created out of this liquidity provision submission.
Reference string `protobuf:"bytes,6,opt,name=reference,proto3" json:"reference,omitempty"`
}
func (x *LiquidityProvisionAmendment) Reset() {
*x = LiquidityProvisionAmendment{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_commands_v1_commands_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LiquidityProvisionAmendment) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LiquidityProvisionAmendment) ProtoMessage() {}
func (x *LiquidityProvisionAmendment) ProtoReflect() protoreflect.Message {
mi := &file_vega_commands_v1_commands_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LiquidityProvisionAmendment.ProtoReflect.Descriptor instead.
func (*LiquidityProvisionAmendment) Descriptor() ([]byte, []int) {
return file_vega_commands_v1_commands_proto_rawDescGZIP(), []int{10}
}
func (x *LiquidityProvisionAmendment) GetMarketId() string {
if x != nil {
return x.MarketId
}
return ""
}
func (x *LiquidityProvisionAmendment) GetCommitmentAmount() string {
if x != nil {
return x.CommitmentAmount
}
return ""
}
func (x *LiquidityProvisionAmendment) GetFee() string {
if x != nil {
return x.Fee
}
return ""
}
func (x *LiquidityProvisionAmendment) GetReference() string {
if x != nil {
return x.Reference
}
return ""
}
// Command to instruct the network to process an asset withdrawal from the Vega network.
// The process is specific to the destination foreign chain, for example, a withdrawal to Ethereum will generate signatures
// that allow funds to be taken across the bridge.
type WithdrawSubmission struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Amount to be withdrawn, as an unsigned integer scaled to the asset's decimal places.
Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`