-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.graphql
3739 lines (3135 loc) · 102 KB
/
schema.graphql
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
## VEGA - GraphQL schema
schema {
query: Query
subscription: Subscription
}
"Create an order linked to an index rather than a price"
type PeggedOrder {
"Index to link this order to"
reference: PeggedReference!
"Price offset from the peg"
offset: String!
}
"Subscriptions allow a caller to receive new information as it is available from the VEGA platform."
type Subscription {
"Subscribe to the candles updates"
candles(
"ID of the market we want to listen candles for"
marketId: ID!
"Interval of the candles we want to listen for"
interval: Interval!
): Candle!
"Subscribe to orders updates"
orders(
"ID of the market from which we want orders updates"
marketId: ID
"ID of the party from which we want orders updates"
partyId: ID
): [Order!]
"Subscribe to the trades updates"
trades(
"ID of the market from which we want trades updates"
marketId: ID
"ID of the party from which we want trades updates"
partyId: ID
): [Trade!]
"Subscribe to the positions updates"
positions(
"ID of the party from we want updates for"
partyId: ID
"ID of the market from which we want position updates"
marketId: ID
): Position!
"Subscribe to the market depths update"
marketDepth(
"ID of the market we want to receive market depth updates for"
marketId: ID!
): MarketDepth! @deprecated(reason: "Use marketsDepth instead")
"Subscribe to price level market depth updates"
marketDepthUpdate(
"ID of the market we want to receive market depth pricelevel updates for"
marketId: ID!
): MarketDepthUpdate! @deprecated(reason: "Use marketsDepthUpdate instead")
"Subscribe to the accounts updates"
accounts(
"ID of the market from which we want accounts updates"
marketId: ID
"ID of the party from which we want accounts updates"
partyId: ID
"Asset code"
asset: String
"Type of the account"
type: AccountType
): Account!
"Subscribe to the mark price changes"
marketData(
"id of the market we want to subscribe to the market data changes"
marketId: ID
): MarketData! @deprecated(reason: "Use marketsData instead")
"Subscribe to the market depths update"
marketsDepth(
"ID of the market we want to receive market depth updates for"
marketIds: [ID!]!
): [ObservableMarketDepth!]!
"Subscribe to price level market depth updates"
marketsDepthUpdate(
"ID of the market we want to receive market depth pricelevel updates for"
marketIds: [ID!]!
): [ObservableMarketDepthUpdate!]!
"Subscribe to the mark price changes"
marketsData(
"id of the market we want to subscribe to the market data changes"
marketIds: [ID!]!
): [ObservableMarketData!]!
"Subscribe to the margin changes"
margins(
"id of the party we want to subscribe for margin updates"
partyId: ID!
"market we want to listen to margin updates (nil if we want updates for all markets)"
marketId: ID
): MarginLevels!
"Subscribe to proposals. Leave out all arguments to receive all proposals"
proposals(
"Optional party id whose proposals are to be streamed"
partyId: ID
): Proposal!
"Subscribe to votes, either by proposal id or party id"
votes(
"Optional proposal id which votes are to be streamed"
proposalId: ID
"Optional party id whose votes are to be streamed"
partyId: ID
): ProposalVote!
"Subscribe to event data from the event bus"
busEvents(
"the types to subscribe to has to be an array"
types: [BusEventType!]!
"optional filter by market ID"
marketId: ID
"optional filter by party ID"
partyId: ID
"Specifies the size that the client will receive events in. Using 0 results in a variable batch size being sent. The stream will be closed if the client fails to read a batch within 5 seconds"
batchSize: Int!
): [BusEvent!]
"Subscribe to delegation data"
delegations(
"the party to subscribe for, empty if all"
party: ID
"the node to subscribe for, empty if all"
nodeID: ID
): Delegation!
"Subscribe to reward details data"
rewards(
"the asset to subscribe for, empty if all"
assetId: ID
"the party to subscribe for, empty if all"
party: ID
): Reward!
}
"Margins for a given a party"
type MarginLevels {
"market in which the margin is required for this party"
market: Market!
"asset for the current margins"
asset: Asset!
"id of the party for this margin"
party: Party!
"minimal margin for the position to be maintained in the network (unsigned int actually)"
maintenanceLevel: String!
"if the margin is between maintenance and search, the network will initiate a collateral search (unsigned int actually)"
searchLevel: String!
"this is the minimal margin required for a party to place a new order on the network (unsigned int actually)"
initialLevel: String!
"""
If the margin of the party is greater than this level, then collateral will be released from the margin account into
the general account of the party for the given asset.
"""
collateralReleaseLevel: String!
"RFC3339Nano time from at which this margin level was relevant"
timestamp: String!
}
"Live data of a Market"
type MarketData {
"market id of the associated mark price"
market: Market!
"the mark price (actually an unsigned int)"
markPrice: String!
"the highest price level on an order book for buy orders."
bestBidPrice: String!
"the aggregated volume being bid at the best bid price."
bestBidVolume: String!
"the lowest price level on an order book for offer orders."
bestOfferPrice: String!
"the aggregated volume being offered at the best offer price."
bestOfferVolume: String!
"the highest price level on an order book for buy orders not including pegged orders."
bestStaticBidPrice: String!
"the aggregated volume being offered at the best static bid price, excluding pegged orders"
bestStaticBidVolume: String!
"the lowest price level on an order book for offer orders not including pegged orders."
bestStaticOfferPrice: String!
"the aggregated volume being offered at the best static offer price, excluding pegged orders."
bestStaticOfferVolume: String!
"the arithmetic average of the best bid price and best offer price."
midPrice: String!
"the arithmetic average of the best static bid price and best static offer price"
staticMidPrice: String!
"RFC3339Nano time at which this market price was relevant"
timestamp: String!
"the sum of the size of all positions greater than 0."
openInterest: String!
"RFC3339Nano time at which the auction will stop (null if not in auction mode)"
auctionEnd: String
"RFC3339Nano time at which the next auction will start (null if none is scheduled)"
auctionStart: String
"indicative price if the auction ended now, 0 if not in auction mode"
indicativePrice: String!
"indicative volume if the auction ended now, 0 if not in auction mode"
indicativeVolume: String!
"what state the market is in (auction, continuous etc)"
marketTradingMode: MarketTradingMode!
"what triggered an auction (if an auction was started)"
trigger: AuctionTrigger!
"what extended the ongoing auction (if an auction was extended)"
extensionTrigger: AuctionTrigger!
"the amount of stake targeted for this market"
targetStake: String
"the supplied stake for the market"
suppliedStake: String
"The liquidity commitments for a given market"
commitments: MarketDataCommitments!
"A list of valid price ranges per associated trigger"
priceMonitoringBounds: [PriceMonitoringBounds!]
"the market value proxy"
marketValueProxy: String!
"the equity like share of liquidity fee for each liquidity provider"
liquidityProviderFeeShare: [LiquidityProviderFeeShare!]
}
"Live data of a Market"
type ObservableMarketData {
"market id of the associated mark price"
marketId: String!
"the mark price (actually an unsigned int)"
markPrice: String!
"the highest price level on an order book for buy orders."
bestBidPrice: String!
"the aggregated volume being bid at the best bid price."
bestBidVolume: String!
"the lowest price level on an order book for offer orders."
bestOfferPrice: String!
"the aggregated volume being offered at the best offer price."
bestOfferVolume: String!
"the highest price level on an order book for buy orders not including pegged orders."
bestStaticBidPrice: String!
"the aggregated volume being offered at the best static bid price, excluding pegged orders"
bestStaticBidVolume: String!
"the lowest price level on an order book for offer orders not including pegged orders."
bestStaticOfferPrice: String!
"the aggregated volume being offered at the best static offer price, excluding pegged orders."
bestStaticOfferVolume: String!
"the arithmetic average of the best bid price and best offer price."
midPrice: String!
"the arithmetic average of the best static bid price and best static offer price"
staticMidPrice: String!
"RFC3339Nano time at which this market price was relevant"
timestamp: String!
"the sum of the size of all positions greater than 0."
openInterest: String!
"RFC3339Nano time at which the auction will stop (null if not in auction mode)"
auctionEnd: String
"RFC3339Nano time at which the next auction will start (null if none is scheduled)"
auctionStart: String
"indicative price if the auction ended now, 0 if not in auction mode"
indicativePrice: String!
"indicative volume if the auction ended now, 0 if not in auction mode"
indicativeVolume: String!
"what state the market is in (auction, continuous etc)"
marketTradingMode: MarketTradingMode!
"what triggered an auction (if an auction was started)"
trigger: AuctionTrigger!
"what extended the ongoing auction (if an auction was extended)"
extensionTrigger: AuctionTrigger!
"the amount of stake targeted for this market"
targetStake: String
"the supplied stake for the market"
suppliedStake: String
"A list of valid price ranges per associated trigger"
priceMonitoringBounds: [PriceMonitoringBounds!]
"the market value proxy"
marketValueProxy: String!
"the equity like share of liquidity fee for each liquidity provider"
liquidityProviderFeeShare: [ObservableLiquidityProviderFeeShare!]
}
"timestamps for when the market changes state"
type MarketTimestamps {
"Time when the market is first proposed"
proposed: String
"Time when the market has been voted in and waiting to be created"
pending: String
"Time when the market is open and ready to accept trades"
open: String
"Time when the market is closed"
close: String
}
"The equity like share of liquidity fee for each liquidity provider"
type LiquidityProviderFeeShare {
"The liquidity provider party id"
party: Party!
"The share own by this liquidity provider (float)"
equityLikeShare: String!
"the average entry valuation of the liquidity provider for the market"
averageEntryValuation: String!
}
"The equity like share of liquidity fee for each liquidity provider"
type ObservableLiquidityProviderFeeShare {
"The liquidity provider party id"
partyId: String!
"The share own by this liquidity provider (float)"
equityLikeShare: String!
"the average entry valuation of the liquidity provider for the market"
averageEntryValuation: String!
}
"The MM commitments for this market"
type MarketDataCommitments {
"a set of liquidity sell orders to meet the liquidity provision obligation, see MM orders spec."
sells: [LiquidityOrderReference!]
"a set of liquidity buy orders to meet the liquidity provision obligation, see MM orders spec."
buys: [LiquidityOrderReference!]
}
type TransactionSubmitted {
success: Boolean!
}
input AccountFilter {
assetId: ID
partyIds: [ID!]
marketIds: [ID!]
accountTypes: [AccountType!]
}
"Queries allow a caller to read data and filter data via GraphQL."
type Query {
"One or more instruments that are trading on the VEGA network"
markets("ID of the market" id: ID): [Market!]
marketsConnection(
"Optional ID of a market"
id: ID
"Optional pagination information"
pagination: Pagination
): MarketConnection!
"An instrument that is trading on the VEGA network"
market("Optional ID of a market" id: ID!): Market
"One or more entities that are trading on the VEGA network"
parties("Optional ID of a party" id: ID): [Party!]
partiesConnection(
"Optional ID of a party to retrieve"
id: ID
"Optional pagination information"
pagination: Pagination
): PartyConnection!
"An entity that is trading on the VEGA network"
party("ID of a party" id: ID!): Party
"The last block process by the blockchain"
lastBlockHeight: String!
"All registered oracle specs"
oracleSpecs(
"Pagination"
pagination: OffsetPagination
): [OracleSpec!] @deprecated(reason: "Use oracleSpecsConnection instead")
"All registered oracle specs"
oracleSpecsConnection(
"Pagination"
pagination: Pagination
): OracleSpecsConnection!
"An oracle spec for a given oracle spec ID"
oracleSpec("ID for an oracle spec" oracleSpecID: String!): OracleSpec
"All oracle data for a given oracle spec ID"
oracleDataBySpec(
"ID for an oracle spec"
oracleSpecID: String!
"Pagination"
pagination: OffsetPagination
): [OracleData!] @deprecated(reason: "Use oracleDataBySpecConnection instead")
oracleDataBySpecConnection(
"ID for an oracle spec"
oracleSpecID: String!
"Pagination"
pagination: Pagination
): OracleDataConnection!
"All registered oracle specs"
oracleData(
"Pagination"
pagination: OffsetPagination
): [OracleData!] @deprecated(reason: "Use oracleDataConnection instead")
"All registered oracle specs"
oracleDataConnection(
"Pagination"
pagination: Pagination
): OracleDataConnection!
"An order in the VEGA network found by orderID"
orderByID(
"ID for an order"
orderId: ID!
"version of the order (omitted or 0 for most recent; 1 for original; 2 for first amendment, etc)"
version: Int
): Order!
"Order versions (created via amendments if any) found by orderID"
orderVersions(
"ID for an order"
orderId: ID!
"Pagination skip"
skip: Int
"Pagination first element"
first: Int
"Pagination last element"
last: Int
): [Order!] @deprecated(reason: "Use orderVersionsConnection instead")
"Order versions (created via amendments if any) found by orderID"
orderVersionsConnection(
"ID for an order"
orderId: ID
"Pagination information"
pagination: Pagination
): OrderConnection!
"An order in the VEGA network found by referenceID"
orderByReference("Reference for an order" reference: String!): Order!
"All governance proposals in the VEGA network"
proposals(
"Returns only proposals in the specified state. Leave out to get all proposals"
inState: ProposalState
): [Proposal!] @deprecated(reason: "Use proposalsConnection instead")
"All governance proposals in the VEGA network"
proposalsConnection(
"Optional type of proposal to retrieve data for"
proposalType: ProposalType
"Returns only proposals in the specified state. Leave out to get all proposals"
inState: ProposalState
"Optional Pagination information"
pagination: Pagination
): ProposalsConnection!
"A governance proposal located by either its id or reference. If both are set, id is used."
proposal(
"Optionally, locate proposal by its id"
id: ID
"Optionally, locate proposal by its reference. If id is set, this parameter is ignored."
reference: String
): Proposal!
"Governance proposals that aim to create new markets"
newMarketProposals(
"Returns only proposals in the specified state. Leave out to get all proposals"
inState: ProposalState
): [Proposal!] @deprecated(reason: "Use proposalsConnection instead")
"Governance proposals that aim to update existing markets"
updateMarketProposals(
"Optionally, select proposals for a specific market. Leave out for all"
marketId: ID
"Returns only proposals in the specified state. Leave out to get all proposals"
inState: ProposalState
): [Proposal!] @deprecated(reason: "Use proposalsConnection instead")
"Governance proposals that aim to update Vega network parameters"
networkParametersProposals(
"Returns only proposals in the specified state. Leave out to get all proposals"
inState: ProposalState
): [Proposal!] @deprecated(reason: "Use proposalsConnection instead")
"Governance proposals that aim to create new assets in Vega"
newAssetProposals(
"Returns only proposals in the specified state. Leave out to get all proposals"
inState: ProposalState
): [Proposal!] @deprecated(reason: "Use proposalsConnection instead")
"Governance proposals that allows creation of free form proposals in Vega"
newFreeformProposals(
"Returns only proposals in the specified state. Leave out to get all proposals"
inState: ProposalState
): [Proposal!] @deprecated(reason: "Use proposalsConnection instead")
"Return a list of aggregated node signature for a given resource ID"
nodeSignatures(resourceId: ID!): [NodeSignature!]
"An asset which is used in the vega network"
asset("Id of the asset" assetId: ID!): Asset
"The list of all assets in use in the vega network"
assets: [Asset!] @deprecated(reason: "Use assetsConnection instead")
"The list of all assets in use in the vega network or the specified asset if id is provided"
assetsConnection(id: ID, pagination: Pagination): AssetsConnection!
"return an estimation of the potential cost for a new order"
estimateOrder(
"ID of the market to place the order"
marketId: ID!
"ID of the party placing the order"
partyId: ID!
"Price of the asset"
price: String
"Size of the order"
size: String!
"Side of the order (Buy or Sell)"
side: Side!
"TimeInForce of the order"
timeInForce: OrderTimeInForce!
"expiration of the the order"
expiration: String
"type of the order"
type: OrderType!
): OrderEstimate!
"find a withdrawal using its id"
withdrawal("id of the withdrawal" id: ID!): Withdrawal
"find an erc20 withdrawal approval using its withdrawal id"
erc20WithdrawalApproval(
"id of the withdrawal"
withdrawalId: ID!
): Erc20WithdrawalApproval
"find a deposit using its id"
deposit("id of the Deposit" id: ID!): Deposit
"return the full list of network parameters"
networkParameters: [NetworkParameter!]
"returns information about nodes"
nodeData: NodeData
"all known network nodes"
nodes: [Node!] @deprecated(reason: "use nodesConnection instead")
"all known network nodes"
nodesConnection(pagination: Pagination): NodesConnection!
"specific node in network"
node("required id of node" id: String!): Node
"query for historic key rotations"
keyRotations(id: String): [KeyRotation!]
"get data for a specific epoch, if id omitted it gets the current epoch. If the string is 'next', fetch the next epoch"
epoch(id: String): Epoch!
"get a list of all transfers for a pubkey"
transfers(
"the pubkey to look for"
pubkey: String!
"is the pubkey on the sending part of the transfer"
isFrom: Boolean
"is the pubkey in the receiving part of the transfer"
isTo: Boolean
): [Transfer!] @deprecated(reason: "Use transfersConnection instead")
"get a list of all transfers for a pubkey"
transfersConnection(
"the pubkey to look for"
pubkey: String
"direction of the transfer with respect to the pubkey"
direction: TransferDirection!
"Pagination information"
pagination: Pagination
): TransferConnection!
"get statistics about the vega node"
statistics: Statistics!
historicBalances(
filter: AccountFilter,
groupBy: [AccountField])
: [AggregatedBalance!]!
"Current network limits"
networkLimits: NetworkLimits
"get market data history for a specific market. If no dates are given, the latest snapshot will be returned. If only the start date is provided all history from the given date will be provided, and if only the end date is provided, all history from the start upto and including the end date will be provided."
getMarketDataHistoryByID(
id: String!
"""
Optional start date time for the historic data query.
If both the start and end date is not provided, only the latest snapshot will be returned.
If only the start date is provided, all market data for the market from the start date forward will be returned.
"""
start: Int
"""
Optional end date time for the historic data query.
If both the start and end date is not provided, only the latest snapshot will be returned.
If only the end date is provided, all market data for the market up to and including the end date will be returned.
"""
end: Int
"Pagination skip"
skip: Int
"Pagination first element"
first: Int
"Pagination last element"
last: Int): [MarketData] @deprecated(reason: "Use getMarketDataHistoryConnectionByID instead")
"get market data history for a specific market. If no dates are given, the latest snapshot will be returned. If only the start date is provided all history from the given date will be provided, and if only the end date is provided, all history from the start upto and including the end date will be provided. Pagination is provided using a cursor based pagination model"
getMarketDataHistoryConnectionByID(
id: String!
"""
Optional start date time for the historic data query.
If both the start and end date is not provided, only the latest snapshot will be returned.
If only the start date is provided, all market data for the market from the start date forward will be returned.
"""
start: Int
"""
Optional end date time for the historic data query.
If both the start and end date is not provided, only the latest snapshot will be returned.
If only the end date is provided, all market data for the market up to and including the end date will be returned.
"""
end: Int
"Optional Pagination"
pagination: Pagination): MarketDataConnection!
}
enum TransferStatus {
"Indicate a transfer still being processed"
Pending
"Indicate of an transfer accepted by the vega network"
Done
"Indicate of an transfer rejected by the vega network"
Rejected
"""
Indicate of a transfer stopped by the vega network
e.g: no funds left to cover the transfer
"""
Stopped
"Indicate of a transfer cancel by the user"
Cancelled
}
"A user initiated transfer"
type Transfer {
"Identified of this transfer"
id: ID!
"The public key of the sender in this transfer"
from: String!
"The account type from which funds have been sent from"
fromAccountType: AccountType!
"The public key of the received of the funds"
to: String!
"The account type which has received the funds"
toAccountType: AccountType!
"The asset"
asset: Asset
"The amount sent"
amount: String!
"An optional reference"
reference: String
"The status of this transfer"
status: TransferStatus!
"The time at which the transfer was submitted"
timestamp: String!
kind: TransferKind!
}
union TransferKind = OneOffTransfer | RecurringTransfer
"The specific details for a one off transfer"
type OneOffTransfer {
"An optional time at which the transfer should be delivered"
deliverOn: String
}
"The specific details for a recurring transfer"
type RecurringTransfer {
"The epoch at which this recurring transfer will start"
startEpoch: Int!
"An optional epoch at whihc this transfer will stop"
endEpoch: Int
"The factor of the initial amount to be distributed"
factor: String!
"An optional dispatch strategy for the recurring transfer"
dispatchStrategy: DispatchStrategy
}
enum DispatchMetric {
MarketTradingValue
MakerFeesReceived
TakerFeesPaid
LPFeesReceived
}
type DispatchStrategy {
"What to contribution is measured"
dispatchMetric: DispatchMetric!
"The asset to use for measuring contibution to the metric"
dispatchMetricAssetId: ID!
"Scope the dispatch to this markets only under the metric asset"
marketIdsInScope: [ID!]
}
enum NodeStatus {
"The node is non-validating"
NonValidator
"The node is validating"
Validator
}
# Describes in both human readable and block time when an epoch spans.
type EpochTimestamps {
"RFC3339 timestamp - Vega time of epoch start, null if not started"
start: String
"RFC3339 timestamp - Vega time of epoch expiry"
expiry: String
"RFC3339 timestamp - Vega time of epoch end, null if not ended"
end: String
# @TODO - blocks support
# "Height of first block in the epoch, null if not started"
# firstBlock: String!
# "Height of last block in the epoch, null if not ended"
# lastBlock: String
}
type KeyRotation {
"ID of node where rotation took place"
nodeId: String!
"Old public key rotated from"
oldPubKey: String!
"New public key rotated to"
newPubKey: String!
"Block height of where the rotation took place"
blockHeight: String!
}
type Epoch {
"Presumably this is an integer or something. If there's no such thing, disregard"
id: String!
"Timestamps for start/end etc"
timestamps: EpochTimestamps!
"Validators that participated in this epoch"
validators: [Node!]! @deprecated(reason: "Use validatorsConnection instead")
"Validators that participated in this epoch"
validatorsConnection(pagination: Pagination): NodesConnection!
delegations(
# Optional party id to filter on
partyId: String
# Optional node id to filter on
nodeId: String
"Pagination skip"
skip: Int
"Pagination first element"
first: Int
"Pagination last element"
last: Int): [Delegation!]! @deprecated(reason: "Use delegationsConnection instead")
delegationsConnection(
# Optional party id to filter on
partyId: String
# Optional node id to filter on
nodeId: String
"Pagination information"
pagination: Pagination
): DelegationsConnection!
}
type NodeData {
"Total staked amount across all nodes"
stakedTotal: String!
"Total number of nodes"
totalNodes: Int!
"Number of inactive nodes"
inactiveNodes: Int!
"Number of nodes validating"
validatingNodes: Int!
# @TODO allow to query based on number of epochs uptime(epochs: Int)
"Total uptime for all epochs across all nodes. Or specify a number of epochs"
uptime: Float!
}
type EpochParticipation {
epoch: Epoch
"RFC3339 timestamp"
offline: String
"RFC3339 timestamp"
online: String
totalRewards: Float
}
type EpochData {
"Total number of epochs since node was created"
total: Int!
"Total number of offline epochs since node was created"
offline: Int!
"Total number of online epochs since node was created"
online: Int!
}
type Node {
"The node url eg n01.vega.xyz"
id: String!
"Pubkey of the node operator"
pubkey: String!
"Public key of Tendermint"
tmPubkey: String!
"Ethereum public key of the node"
ethereumAdddress: String!
"URL where I can find out more info on the node. Will this be possible?"
infoUrl: String!
"Country code for the location of the node"
location: String!
"The amount the node has put up themselves"
stakedByOperator: String!
"The amount of stake that has been delegated by token holders"
stakedByDelegates: String!
"Total amount staked on node"
stakedTotal: String!
# "Max amount of (wanted) stake, is this a network param or a node param"
# @TODO - add this field
# maxIntendedStake: String!
"Amount of stake on the next epoch"
pendingStake: String!
epochData: EpochData
# @TODO implement this filter
# epochs(last: Int, since: String): [EpochParticipation!]!
status: NodeStatus!
# All delegation for a node by a given party if specified, or all delegations.
delegations(partyId: String,
"Pagination skip"
skip: Int
"Pagination first element"
first: Int
"Pagination last element"
last: Int): [Delegation!] @deprecated(reason: "Use delegationsConnection instead")
delegationsConnection(
partyId: String,
pagination: Pagination
): DelegationsConnection!
"Reward scores for the current epoch for the validator"
rewardScore: RewardScore
"Ranking scores and status for the validator for the current epoch"
rankingScore: RankingScore!
# The name of the node
name: String!
# An url to an avatar
avatarUrl: String
}
type RewardScore {
"The stake based validator score with anti-whaling"
rawValidatorScore: String!
"The performance score of the validator"
performanceScore: String!
"The multisig score of the validator"
multisigScore: String!
"The composite score of the validator"
validatorScore: String!
"The normalised score of the validator"
normalisedScore: String!
"The status of the validator for this score"
validatorStatus: String!
}
type RankingScore {
"The current validation status of the validator"
status: String!
"The former validation status of teh validator"
previousStatus: String!
"The ranking score of the validator"
rankingScore: String!
"The stake based score of the validator (no anti-whaling)"
stakeScore: String!
"The performance score of the validator"
performanceScore: String!
"The tendermint voting power of the validator (uint32)"
votingPower: String!
}
type Delegation {
"Amount delegated"
amount: String!
"Party which is delegating"
party: Party!
"URL of node you are delegating to"
node: Node!
"Epoch of delegation"
epoch: Int!
}
enum AssetStatus {
"Asset is proposed to be added to the network"
Proposed
"Asset has been rejected"
Rejected
"Asset is pending listing on the ethereum bridge"
PendingListing
"Asset can be used on the vega network"
Enabled
}
"Represents an asset in vega"
type Asset {
"The id of the asset"
id: ID!
"The full name of the asset (e.g: Great British Pound)"
name: String!
"The symbol of the asset (e.g: GBP)"
symbol: String!
"The total supply of the market"
totalSupply: String!
"The precision of the asset"
decimals: Int!
"The minimum economically meaningful amount in the asset"
quantum: String!
"The origin source of the asset (e.g: an erc20 asset)"
source: AssetSource!
"The status of the asset in the vega network"
status: AssetStatus!
"The infrastructure fee account for this asset"
infrastructureFeeAccount: Account!
"The global reward pool account for this asset"