-
Notifications
You must be signed in to change notification settings - Fork 19
/
markets.pb.go
2864 lines (2557 loc) · 109 KB
/
markets.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/markets.proto
package vega
import (
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)
)
// Current state of the market
type Market_State int32
const (
// Default value, invalid
Market_STATE_UNSPECIFIED Market_State = 0
// Governance proposal valid and accepted
Market_STATE_PROPOSED Market_State = 1
// Outcome of governance votes is to reject the market
Market_STATE_REJECTED Market_State = 2
// Governance vote passes/wins
Market_STATE_PENDING Market_State = 3
// Market triggers cancellation condition or governance
// votes to close before market becomes Active
Market_STATE_CANCELLED Market_State = 4
// Enactment date reached and usual auction exit checks pass
Market_STATE_ACTIVE Market_State = 5
// Price monitoring or liquidity monitoring trigger
Market_STATE_SUSPENDED Market_State = 6
// Governance vote to close (Not currently implemented)
Market_STATE_CLOSED Market_State = 7
// Defined by the product (i.e. from a product parameter,
// specified in market definition, giving close date/time)
Market_STATE_TRADING_TERMINATED Market_State = 8
// Settlement triggered and completed as defined by product
Market_STATE_SETTLED Market_State = 9
// Market has been suspended via governance
Market_STATE_SUSPENDED_VIA_GOVERNANCE Market_State = 10
)
// Enum value maps for Market_State.
var (
Market_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "STATE_PROPOSED",
2: "STATE_REJECTED",
3: "STATE_PENDING",
4: "STATE_CANCELLED",
5: "STATE_ACTIVE",
6: "STATE_SUSPENDED",
7: "STATE_CLOSED",
8: "STATE_TRADING_TERMINATED",
9: "STATE_SETTLED",
10: "STATE_SUSPENDED_VIA_GOVERNANCE",
}
Market_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"STATE_PROPOSED": 1,
"STATE_REJECTED": 2,
"STATE_PENDING": 3,
"STATE_CANCELLED": 4,
"STATE_ACTIVE": 5,
"STATE_SUSPENDED": 6,
"STATE_CLOSED": 7,
"STATE_TRADING_TERMINATED": 8,
"STATE_SETTLED": 9,
"STATE_SUSPENDED_VIA_GOVERNANCE": 10,
}
)
func (x Market_State) Enum() *Market_State {
p := new(Market_State)
*p = x
return p
}
func (x Market_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Market_State) Descriptor() protoreflect.EnumDescriptor {
return file_vega_markets_proto_enumTypes[0].Descriptor()
}
func (Market_State) Type() protoreflect.EnumType {
return &file_vega_markets_proto_enumTypes[0]
}
func (x Market_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Market_State.Descriptor instead.
func (Market_State) EnumDescriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{23, 0}
}
// Trading mode the market is currently running, also referred to as 'market state'
type Market_TradingMode int32
const (
// Default value, this is invalid
Market_TRADING_MODE_UNSPECIFIED Market_TradingMode = 0
// Normal trading
Market_TRADING_MODE_CONTINUOUS Market_TradingMode = 1
// Auction trading (FBA)
Market_TRADING_MODE_BATCH_AUCTION Market_TradingMode = 2
// Opening auction
Market_TRADING_MODE_OPENING_AUCTION Market_TradingMode = 3
// Auction triggered by monitoring
Market_TRADING_MODE_MONITORING_AUCTION Market_TradingMode = 4
// No trading is allowed
Market_TRADING_MODE_NO_TRADING Market_TradingMode = 5
// Special auction mode triggered via governance
Market_TRADING_MODE_SUSPENDED_VIA_GOVERNANCE Market_TradingMode = 6
)
// Enum value maps for Market_TradingMode.
var (
Market_TradingMode_name = map[int32]string{
0: "TRADING_MODE_UNSPECIFIED",
1: "TRADING_MODE_CONTINUOUS",
2: "TRADING_MODE_BATCH_AUCTION",
3: "TRADING_MODE_OPENING_AUCTION",
4: "TRADING_MODE_MONITORING_AUCTION",
5: "TRADING_MODE_NO_TRADING",
6: "TRADING_MODE_SUSPENDED_VIA_GOVERNANCE",
}
Market_TradingMode_value = map[string]int32{
"TRADING_MODE_UNSPECIFIED": 0,
"TRADING_MODE_CONTINUOUS": 1,
"TRADING_MODE_BATCH_AUCTION": 2,
"TRADING_MODE_OPENING_AUCTION": 3,
"TRADING_MODE_MONITORING_AUCTION": 4,
"TRADING_MODE_NO_TRADING": 5,
"TRADING_MODE_SUSPENDED_VIA_GOVERNANCE": 6,
}
)
func (x Market_TradingMode) Enum() *Market_TradingMode {
p := new(Market_TradingMode)
*p = x
return p
}
func (x Market_TradingMode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Market_TradingMode) Descriptor() protoreflect.EnumDescriptor {
return file_vega_markets_proto_enumTypes[1].Descriptor()
}
func (Market_TradingMode) Type() protoreflect.EnumType {
return &file_vega_markets_proto_enumTypes[1]
}
func (x Market_TradingMode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Market_TradingMode.Descriptor instead.
func (Market_TradingMode) EnumDescriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{23, 1}
}
// Auction duration is used to configure 3 auction periods:
// 1. `duration > 0`, `volume == 0`:
// The auction will last for at least N seconds
// 2. `duration == 0`, `volume > 0`:
// The auction will end once the given volume will match at uncrossing
// 3. `duration > 0`, `volume > 0`:
// The auction will take at least N seconds, but can end sooner if the market can trade a certain volume
type AuctionDuration struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Duration of the auction in seconds.
Duration int64 `protobuf:"varint,1,opt,name=duration,proto3" json:"duration,omitempty"`
// Target uncrossing trading volume.
Volume uint64 `protobuf:"varint,2,opt,name=volume,proto3" json:"volume,omitempty"`
}
func (x *AuctionDuration) Reset() {
*x = AuctionDuration{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AuctionDuration) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AuctionDuration) ProtoMessage() {}
func (x *AuctionDuration) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 AuctionDuration.ProtoReflect.Descriptor instead.
func (*AuctionDuration) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{0}
}
func (x *AuctionDuration) GetDuration() int64 {
if x != nil {
return x.Duration
}
return 0
}
func (x *AuctionDuration) GetVolume() uint64 {
if x != nil {
return x.Volume
}
return 0
}
// Spot product definition
type Spot struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Asset ID of the underlying base asset for the spot product.
BaseAsset string `protobuf:"bytes,1,opt,name=base_asset,json=baseAsset,proto3" json:"base_asset,omitempty"`
// Asset ID of the underlying quote asset for the spot product.
QuoteAsset string `protobuf:"bytes,2,opt,name=quote_asset,json=quoteAsset,proto3" json:"quote_asset,omitempty"`
// Name of the instrument.
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *Spot) Reset() {
*x = Spot{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Spot) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Spot) ProtoMessage() {}
func (x *Spot) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 Spot.ProtoReflect.Descriptor instead.
func (*Spot) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{1}
}
func (x *Spot) GetBaseAsset() string {
if x != nil {
return x.BaseAsset
}
return ""
}
func (x *Spot) GetQuoteAsset() string {
if x != nil {
return x.QuoteAsset
}
return ""
}
func (x *Spot) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// Future product definition
type Future struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Underlying asset for the future.
SettlementAsset string `protobuf:"bytes,1,opt,name=settlement_asset,json=settlementAsset,proto3" json:"settlement_asset,omitempty"`
// Quote name of the instrument.
QuoteName string `protobuf:"bytes,2,opt,name=quote_name,json=quoteName,proto3" json:"quote_name,omitempty"`
// Data source specification that describes the settlement data source filter.
DataSourceSpecForSettlementData *DataSourceSpec `protobuf:"bytes,3,opt,name=data_source_spec_for_settlement_data,json=dataSourceSpecForSettlementData,proto3" json:"data_source_spec_for_settlement_data,omitempty"`
// Data source specification that describes the trading termination data source filter.
DataSourceSpecForTradingTermination *DataSourceSpec `protobuf:"bytes,4,opt,name=data_source_spec_for_trading_termination,json=dataSourceSpecForTradingTermination,proto3" json:"data_source_spec_for_trading_termination,omitempty"`
// Binding between the data spec and the data source.
DataSourceSpecBinding *DataSourceSpecToFutureBinding `protobuf:"bytes,5,opt,name=data_source_spec_binding,json=dataSourceSpecBinding,proto3" json:"data_source_spec_binding,omitempty"`
}
func (x *Future) Reset() {
*x = Future{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Future) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Future) ProtoMessage() {}
func (x *Future) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 Future.ProtoReflect.Descriptor instead.
func (*Future) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{2}
}
func (x *Future) GetSettlementAsset() string {
if x != nil {
return x.SettlementAsset
}
return ""
}
func (x *Future) GetQuoteName() string {
if x != nil {
return x.QuoteName
}
return ""
}
func (x *Future) GetDataSourceSpecForSettlementData() *DataSourceSpec {
if x != nil {
return x.DataSourceSpecForSettlementData
}
return nil
}
func (x *Future) GetDataSourceSpecForTradingTermination() *DataSourceSpec {
if x != nil {
return x.DataSourceSpecForTradingTermination
}
return nil
}
func (x *Future) GetDataSourceSpecBinding() *DataSourceSpecToFutureBinding {
if x != nil {
return x.DataSourceSpecBinding
}
return nil
}
// Perpetual product definition
type Perpetual struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Underlying asset for the perpetual.
SettlementAsset string `protobuf:"bytes,1,opt,name=settlement_asset,json=settlementAsset,proto3" json:"settlement_asset,omitempty"`
// Quote name of the instrument.
QuoteName string `protobuf:"bytes,2,opt,name=quote_name,json=quoteName,proto3" json:"quote_name,omitempty"`
// Controls how much the upcoming funding payment liability contributes to party's margin, in the range [0, 1].
MarginFundingFactor string `protobuf:"bytes,3,opt,name=margin_funding_factor,json=marginFundingFactor,proto3" json:"margin_funding_factor,omitempty"`
// Continuously compounded interest rate used in funding rate calculation, in the range [-1, 1].
InterestRate string `protobuf:"bytes,4,opt,name=interest_rate,json=interestRate,proto3" json:"interest_rate,omitempty"`
// Lower bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1].
ClampLowerBound string `protobuf:"bytes,5,opt,name=clamp_lower_bound,json=clampLowerBound,proto3" json:"clamp_lower_bound,omitempty"`
// Upper bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1].
ClampUpperBound string `protobuf:"bytes,6,opt,name=clamp_upper_bound,json=clampUpperBound,proto3" json:"clamp_upper_bound,omitempty"`
// Data source spec describing the data source for settlement schedule.
DataSourceSpecForSettlementSchedule *DataSourceSpec `protobuf:"bytes,7,opt,name=data_source_spec_for_settlement_schedule,json=dataSourceSpecForSettlementSchedule,proto3" json:"data_source_spec_for_settlement_schedule,omitempty"`
// Data source spec describing the data source for settlement.
DataSourceSpecForSettlementData *DataSourceSpec `protobuf:"bytes,8,opt,name=data_source_spec_for_settlement_data,json=dataSourceSpecForSettlementData,proto3" json:"data_source_spec_for_settlement_data,omitempty"`
// Binding between the data source spec and the settlement data.
DataSourceSpecBinding *DataSourceSpecToPerpetualBinding `protobuf:"bytes,9,opt,name=data_source_spec_binding,json=dataSourceSpecBinding,proto3" json:"data_source_spec_binding,omitempty"`
}
func (x *Perpetual) Reset() {
*x = Perpetual{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Perpetual) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Perpetual) ProtoMessage() {}
func (x *Perpetual) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 Perpetual.ProtoReflect.Descriptor instead.
func (*Perpetual) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{3}
}
func (x *Perpetual) GetSettlementAsset() string {
if x != nil {
return x.SettlementAsset
}
return ""
}
func (x *Perpetual) GetQuoteName() string {
if x != nil {
return x.QuoteName
}
return ""
}
func (x *Perpetual) GetMarginFundingFactor() string {
if x != nil {
return x.MarginFundingFactor
}
return ""
}
func (x *Perpetual) GetInterestRate() string {
if x != nil {
return x.InterestRate
}
return ""
}
func (x *Perpetual) GetClampLowerBound() string {
if x != nil {
return x.ClampLowerBound
}
return ""
}
func (x *Perpetual) GetClampUpperBound() string {
if x != nil {
return x.ClampUpperBound
}
return ""
}
func (x *Perpetual) GetDataSourceSpecForSettlementSchedule() *DataSourceSpec {
if x != nil {
return x.DataSourceSpecForSettlementSchedule
}
return nil
}
func (x *Perpetual) GetDataSourceSpecForSettlementData() *DataSourceSpec {
if x != nil {
return x.DataSourceSpecForSettlementData
}
return nil
}
func (x *Perpetual) GetDataSourceSpecBinding() *DataSourceSpecToPerpetualBinding {
if x != nil {
return x.DataSourceSpecBinding
}
return nil
}
// DataSourceSpecToFutureBinding describes which property of the data source data is to be
// used as settlement data and which to use as the trading terminated trigger
type DataSourceSpecToFutureBinding struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the property in the source data that should be used as settlement data.
// If it is set to "prices.BTC.value", then the Future will use the value of
// this property as settlement data.
SettlementDataProperty string `protobuf:"bytes,1,opt,name=settlement_data_property,json=settlementDataProperty,proto3" json:"settlement_data_property,omitempty"`
// Name of the property in the data source data that signals termination of trading.
TradingTerminationProperty string `protobuf:"bytes,2,opt,name=trading_termination_property,json=tradingTerminationProperty,proto3" json:"trading_termination_property,omitempty"`
}
func (x *DataSourceSpecToFutureBinding) Reset() {
*x = DataSourceSpecToFutureBinding{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DataSourceSpecToFutureBinding) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSourceSpecToFutureBinding) ProtoMessage() {}
func (x *DataSourceSpecToFutureBinding) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 DataSourceSpecToFutureBinding.ProtoReflect.Descriptor instead.
func (*DataSourceSpecToFutureBinding) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{4}
}
func (x *DataSourceSpecToFutureBinding) GetSettlementDataProperty() string {
if x != nil {
return x.SettlementDataProperty
}
return ""
}
func (x *DataSourceSpecToFutureBinding) GetTradingTerminationProperty() string {
if x != nil {
return x.TradingTerminationProperty
}
return ""
}
// Describes which property of the data source data is to be
// used as settlement data and which to use as the trading terminated trigger
type DataSourceSpecToPerpetualBinding struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the property in the source data that should be used as settlement data.
// If it is set to "prices.BTC.value", then the perpetual market will use the value of
// this property as settlement data.
SettlementDataProperty string `protobuf:"bytes,1,opt,name=settlement_data_property,json=settlementDataProperty,proto3" json:"settlement_data_property,omitempty"`
// Name of the property in the source data that should be used as settlement data.
// If it is set to "prices.BTC.value", then the perpetual market will use the value of
// this property as settlement data.
SettlementScheduleProperty string `protobuf:"bytes,2,opt,name=settlement_schedule_property,json=settlementScheduleProperty,proto3" json:"settlement_schedule_property,omitempty"`
}
func (x *DataSourceSpecToPerpetualBinding) Reset() {
*x = DataSourceSpecToPerpetualBinding{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DataSourceSpecToPerpetualBinding) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSourceSpecToPerpetualBinding) ProtoMessage() {}
func (x *DataSourceSpecToPerpetualBinding) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 DataSourceSpecToPerpetualBinding.ProtoReflect.Descriptor instead.
func (*DataSourceSpecToPerpetualBinding) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{5}
}
func (x *DataSourceSpecToPerpetualBinding) GetSettlementDataProperty() string {
if x != nil {
return x.SettlementDataProperty
}
return ""
}
func (x *DataSourceSpecToPerpetualBinding) GetSettlementScheduleProperty() string {
if x != nil {
return x.SettlementScheduleProperty
}
return ""
}
// Instrument metadata definition
type InstrumentMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// List of 0 or more tags.
Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
}
func (x *InstrumentMetadata) Reset() {
*x = InstrumentMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InstrumentMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InstrumentMetadata) ProtoMessage() {}
func (x *InstrumentMetadata) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 InstrumentMetadata.ProtoReflect.Descriptor instead.
func (*InstrumentMetadata) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{6}
}
func (x *InstrumentMetadata) GetTags() []string {
if x != nil {
return x.Tags
}
return nil
}
// Instrument definition
type Instrument struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Unique instrument ID.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Code for the instrument.
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
// Name of the instrument.
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// Collection of instrument meta-data.
Metadata *InstrumentMetadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
// Product the instrument is composed of.
//
// Types that are assignable to Product:
//
// *Instrument_Future
// *Instrument_Spot
// *Instrument_Perpetual
Product isInstrument_Product `protobuf_oneof:"product"`
}
func (x *Instrument) Reset() {
*x = Instrument{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Instrument) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Instrument) ProtoMessage() {}
func (x *Instrument) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 Instrument.ProtoReflect.Descriptor instead.
func (*Instrument) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{7}
}
func (x *Instrument) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Instrument) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *Instrument) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Instrument) GetMetadata() *InstrumentMetadata {
if x != nil {
return x.Metadata
}
return nil
}
func (m *Instrument) GetProduct() isInstrument_Product {
if m != nil {
return m.Product
}
return nil
}
func (x *Instrument) GetFuture() *Future {
if x, ok := x.GetProduct().(*Instrument_Future); ok {
return x.Future
}
return nil
}
func (x *Instrument) GetSpot() *Spot {
if x, ok := x.GetProduct().(*Instrument_Spot); ok {
return x.Spot
}
return nil
}
func (x *Instrument) GetPerpetual() *Perpetual {
if x, ok := x.GetProduct().(*Instrument_Perpetual); ok {
return x.Perpetual
}
return nil
}
type isInstrument_Product interface {
isInstrument_Product()
}
type Instrument_Future struct {
// Future.
Future *Future `protobuf:"bytes,100,opt,name=future,proto3,oneof"`
}
type Instrument_Spot struct {
// Spot.
Spot *Spot `protobuf:"bytes,101,opt,name=spot,proto3,oneof"`
}
type Instrument_Perpetual struct {
// Perpetual.
Perpetual *Perpetual `protobuf:"bytes,102,opt,name=perpetual,proto3,oneof"`
}
func (*Instrument_Future) isInstrument_Product() {}
func (*Instrument_Spot) isInstrument_Product() {}
func (*Instrument_Perpetual) isInstrument_Product() {}
// Risk model for log normal
type LogNormalRiskModel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Risk Aversion Parameter.
RiskAversionParameter float64 `protobuf:"fixed64,1,opt,name=risk_aversion_parameter,json=riskAversionParameter,proto3" json:"risk_aversion_parameter,omitempty"`
// Tau parameter of the risk model, projection horizon measured as a year fraction used in the expected shortfall
// calculation to obtain the maintenance margin, must be a strictly non-negative real number.
Tau float64 `protobuf:"fixed64,2,opt,name=tau,proto3" json:"tau,omitempty"`
// Risk model parameters for log normal.
Params *LogNormalModelParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"`
}
func (x *LogNormalRiskModel) Reset() {
*x = LogNormalRiskModel{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LogNormalRiskModel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LogNormalRiskModel) ProtoMessage() {}
func (x *LogNormalRiskModel) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 LogNormalRiskModel.ProtoReflect.Descriptor instead.
func (*LogNormalRiskModel) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{8}
}
func (x *LogNormalRiskModel) GetRiskAversionParameter() float64 {
if x != nil {
return x.RiskAversionParameter
}
return 0
}
func (x *LogNormalRiskModel) GetTau() float64 {
if x != nil {
return x.Tau
}
return 0
}
func (x *LogNormalRiskModel) GetParams() *LogNormalModelParams {
if x != nil {
return x.Params
}
return nil
}
// Risk model parameters for log normal
type LogNormalModelParams struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Mu parameter, annualised growth rate of the underlying asset.
Mu float64 `protobuf:"fixed64,1,opt,name=mu,proto3" json:"mu,omitempty"`
// R parameter, annualised growth rate of the risk-free asset, used for discounting of future cash flows, can be any real number.
R float64 `protobuf:"fixed64,2,opt,name=r,proto3" json:"r,omitempty"`
// Sigma parameter, annualised volatility of the underlying asset, must be a strictly non-negative real number.
Sigma float64 `protobuf:"fixed64,3,opt,name=sigma,proto3" json:"sigma,omitempty"`
}
func (x *LogNormalModelParams) Reset() {
*x = LogNormalModelParams{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LogNormalModelParams) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LogNormalModelParams) ProtoMessage() {}
func (x *LogNormalModelParams) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 LogNormalModelParams.ProtoReflect.Descriptor instead.
func (*LogNormalModelParams) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{9}
}
func (x *LogNormalModelParams) GetMu() float64 {
if x != nil {
return x.Mu
}
return 0
}
func (x *LogNormalModelParams) GetR() float64 {
if x != nil {
return x.R
}
return 0
}
func (x *LogNormalModelParams) GetSigma() float64 {
if x != nil {
return x.Sigma
}
return 0
}
// Risk model for simple modelling
type SimpleRiskModel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Risk model params for simple modelling.
Params *SimpleModelParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}
func (x *SimpleRiskModel) Reset() {
*x = SimpleRiskModel{}
if protoimpl.UnsafeEnabled {
mi := &file_vega_markets_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SimpleRiskModel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SimpleRiskModel) ProtoMessage() {}
func (x *SimpleRiskModel) ProtoReflect() protoreflect.Message {
mi := &file_vega_markets_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 SimpleRiskModel.ProtoReflect.Descriptor instead.
func (*SimpleRiskModel) Descriptor() ([]byte, []int) {
return file_vega_markets_proto_rawDescGZIP(), []int{10}