OBJECT

Query

Queries allow a caller to read data and filter data via GraphQL.

link GraphQL Schema definition

1 type Query {
2
3 # One or more instruments that are trading on the VEGA network
4 #
5 # Arguments
6 # id: ID of the market
7 markets(id: ID): [Market!]
8
9 # An instrument that is trading on the VEGA network
10 #
11 # Arguments
12 # id: Optional ID of a market
13 market(id: ID!): Market
14
15 # One or more entities that are trading on the VEGA network
16 #
17 # Arguments
18 # id: Optional ID of a party
19 parties(id: ID): [Party!]
20
21 # An entity that is trading on the VEGA network
22 #
23 # Arguments
24 # id: ID of a party
25 party(id: ID!): Party
26
27 # a bunch of statistics about the node
28 statistics: Statistics!
29
30 # The last block process by the blockchain
31 lastBlockHeight: String!
32
33 # All registered oracle specs
34 oracleSpecs: [OracleSpec!]
35
36 # An oracle spec for a given oracle spec ID
37 #
38 # Arguments
39 # oracleSpecID: ID for an oracle spec
40 oracleSpec(oracleSpecID: String!): OracleSpec
41
42 # All oracle data for a given oracle spec ID
43 #
44 # Arguments
45 # oracleSpecID: ID for an oracle spec
46 oracleDataBySpec(oracleSpecID: String!): [OracleData!]
47
48 # An order in the VEGA network found by orderID
49 #
50 # Arguments
51 # orderId: ID for an order
52 # version: version of the order (omitted or 0 for most recent; 1
53 # for original; 2 for first amendment, etc)
54 orderByID(orderId: ID!, version: Int): Order!
55
56 # Order versions (created via amendments if any) found by orderID
57 #
58 # Arguments
59 # orderId: ID for an order
60 # skip: Pagination skip
61 # first: Pagination first element
62 # last: Pagination last element
63 orderVersions(orderId: ID!, skip: Int, first: Int, last: Int): [Order!]
64
65 # An order in the VEGA network found by referenceID
66 #
67 # Arguments
68 # reference: Reference for an order
69 orderByReference(reference: String!): Order!
70
71 # All governance proposals in the VEGA network
72 #
73 # Arguments
74 # inState: Returns only proposals in the specified state. Leave
75 # out to get all proposals
76 proposals(inState: ProposalState): [Proposal!]
77
78 # A governance proposal located by either its id or reference. If both are set, id
79 # is used.
80 #
81 # Arguments
82 # id: Optionally, locate proposal by its id
83 # reference: Optionally, locate proposal by its reference. If id
84 # is set, this parameter is ignored.
85 proposal(id: ID, reference: String): Proposal!
86
87 # Governance proposals that aim to create new markets
88 #
89 # Arguments
90 # inState: Returns only proposals in the specified state. Leave
91 # out to get all proposals
92 newMarketProposals(inState: ProposalState): [Proposal!]
93
94 # Governance proposals that aim to update existing markets
95 #
96 # Arguments
97 # marketId: Optionally, select proposals for a specific market.
98 # Leave out for all
99 # inState: Returns only proposals in the specified state. Leave
100 # out to get all proposals
101 updateMarketProposals(marketId: ID, inState: ProposalState): [Proposal!]
102
103 # Governance proposals that aim to update Vega network parameters
104 #
105 # Arguments
106 # inState: Returns only proposals in the specified state. Leave
107 # out to get all proposals
108 networkParametersProposals(inState: ProposalState): [Proposal!]
109
110 # Governance proposals that aim to create new assets in Vega
111 #
112 # Arguments
113 # inState: Returns only proposals in the specified state. Leave
114 # out to get all proposals
115 newAssetProposals(inState: ProposalState): [Proposal!]
116
117 # Return a list of aggregated node signature for a given resource ID
118 nodeSignatures(resourceId: ID!): [NodeSignature!]
119
120 # An asset which is used in the vega network
121 #
122 # Arguments
123 # assetId: Id of the asset
124 asset(assetId: ID!): Asset
125
126 # The list of all assets in use in the vega network
127 assets: [Asset!]
128
129 # return an estimation of the potential cost for a new order
130 #
131 # Arguments
132 # marketId: ID of the market to place the order
133 # partyId: ID of the party placing the order
134 # price: Price of the asset
135 # size: Size of the order
136 # side: Side of the order (Buy or Sell)
137 # timeInForce: TimeInForce of the order
138 # expiration: expiration of the the order
139 # type: type of the order
140 estimateOrder(
141 marketId: ID!,
142 partyId: ID!,
143 price: String,
144 size: String!,
145 side: Side!,
146 timeInForce: OrderTimeInForce!,
147 expiration: String,
148 type: OrderType!
149 ): OrderEstimate!
150
151 # find a withdrawal using its id
152 #
153 # Arguments
154 # id: id of the withdrawal
155 withdrawal(id: ID!): Withdrawal
156
157 # find an erc20 withdrawal approval using its withdrawal id
158 #
159 # Arguments
160 # withdrawalId: id of the withdrawal
161 erc20WithdrawalApproval(withdrawalId: ID!): Erc20WithdrawalApproval
162
163 # find a deposit using its id
164 #
165 # Arguments
166 # id: id of the Deposit
167 deposit(id: ID!): Deposit
168
169 # return the full list of network parameters
170 networkParameters: [NetworkParameter!]
171
172 }

link Required by

This element is not required by anyone