OBJECT

Query

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

link GraphQL Schema definition

1type Query {
2
3# One or more instruments that are trading on the VEGA network
4#
5# Arguments
6# id: ID of the market
7markets(id: ID): [Market!]
8
9marketsPaged(id: ID, pagination: Pagination): MarketConnection!
10
11# An instrument that is trading on the VEGA network
12#
13# Arguments
14# id: Optional ID of a market
15market(id: ID!): Market
16
17# One or more entities that are trading on the VEGA network
18#
19# Arguments
20# id: Optional ID of a party
21parties(id: ID): [Party!]
22
23partiesPaged(id: ID, pagination: Pagination): PartyConnection!
24
25# An entity that is trading on the VEGA network
26#
27# Arguments
28# id: ID of a party
29party(id: ID!): Party
30
31# The last block process by the blockchain
32lastBlockHeight: String!
33
34# All registered oracle specs
35#
36# Arguments
37# pagination: Pagination
38oracleSpecs(pagination: OffsetPagination): [OracleSpec!]
39
40# An oracle spec for a given oracle spec ID
41#
42# Arguments
43# oracleSpecID: ID for an oracle spec
44oracleSpec(oracleSpecID: String!): OracleSpec
45
46# All oracle data for a given oracle spec ID
47#
48# Arguments
49# oracleSpecID: ID for an oracle spec
50# pagination: Pagination
51oracleDataBySpec(
52oracleSpecID: String!,
53pagination: OffsetPagination
54): [OracleData!]
55
56# All registered oracle specs
57#
58# Arguments
59# pagination: Pagination
60oracleData(pagination: OffsetPagination): [OracleData!]
61
62# An order in the VEGA network found by orderID
63#
64# Arguments
65# orderId: ID for an order
66# version: version of the order (omitted or 0 for most recent; 1
67# for original; 2 for first amendment, etc)
68orderByID(orderId: ID!, version: Int): Order!
69
70# Order versions (created via amendments if any) found by orderID
71#
72# Arguments
73# orderId: ID for an order
74# skip: Pagination skip
75# first: Pagination first element
76# last: Pagination last element
77orderVersions(
78orderId: ID!,
79skip: Int,
80first: Int,
81last: Int
82): [Order!] @deprecated( reason: "Use orderVersionsPaged instead" )
83
84# Order versions (created via amendments if any) found by orderID
85#
86# Arguments
87# orderId: ID for an order
88# pagination: Pagination information
89orderVersionsPaged(orderId: ID, pagination: Pagination): OrderConnection!
90
91# An order in the VEGA network found by referenceID
92#
93# Arguments
94# reference: Reference for an order
95orderByReference(reference: String!): Order!
96
97# All governance proposals in the VEGA network
98#
99# Arguments
100# inState: Returns only proposals in the specified state. Leave
101# out to get all proposals
102proposals(inState: ProposalState): [Proposal!]
103
104# A governance proposal located by either its id or reference. If both are set, id
105# is used.
106#
107# Arguments
108# id: Optionally, locate proposal by its id
109# reference: Optionally, locate proposal by its reference. If id
110# is set, this parameter is ignored.
111proposal(id: ID, reference: String): Proposal!
112
113# Governance proposals that aim to create new markets
114#
115# Arguments
116# inState: Returns only proposals in the specified state. Leave
117# out to get all proposals
118newMarketProposals(inState: ProposalState): [Proposal!]
119
120# Governance proposals that aim to update existing markets
121#
122# Arguments
123# marketId: Optionally, select proposals for a specific market.
124# Leave out for all
125# inState: Returns only proposals in the specified state. Leave
126# out to get all proposals
127updateMarketProposals(marketId: ID, inState: ProposalState): [Proposal!]
128
129# Governance proposals that aim to update Vega network parameters
130#
131# Arguments
132# inState: Returns only proposals in the specified state. Leave
133# out to get all proposals
134networkParametersProposals(inState: ProposalState): [Proposal!]
135
136# Governance proposals that aim to create new assets in Vega
137#
138# Arguments
139# inState: Returns only proposals in the specified state. Leave
140# out to get all proposals
141newAssetProposals(inState: ProposalState): [Proposal!]
142
143# Governance proposals that allows creation of free form proposals in Vega
144#
145# Arguments
146# inState: Returns only proposals in the specified state. Leave
147# out to get all proposals
148newFreeformProposals(inState: ProposalState): [Proposal!]
149
150# Return a list of aggregated node signature for a given resource ID
151nodeSignatures(resourceId: ID!): [NodeSignature!]
152
153# An asset which is used in the vega network
154#
155# Arguments
156# assetId: Id of the asset
157asset(assetId: ID!): Asset
158
159# The list of all assets in use in the vega network
160assets: [Asset!]
161
162# return an estimation of the potential cost for a new order
163#
164# Arguments
165# marketId: ID of the market to place the order
166# partyId: ID of the party placing the order
167# price: Price of the asset
168# size: Size of the order
169# side: Side of the order (Buy or Sell)
170# timeInForce: TimeInForce of the order
171# expiration: expiration of the the order
172# type: type of the order
173estimateOrder(
174marketId: ID!,
175partyId: ID!,
176price: String,
177size: String!,
178side: Side!,
179timeInForce: OrderTimeInForce!,
180expiration: String,
181type: OrderType!
182): OrderEstimate!
183
184# find a withdrawal using its id
185#
186# Arguments
187# id: id of the withdrawal
188withdrawal(id: ID!): Withdrawal
189
190# find an erc20 withdrawal approval using its withdrawal id
191#
192# Arguments
193# withdrawalId: id of the withdrawal
194erc20WithdrawalApproval(withdrawalId: ID!): Erc20WithdrawalApproval
195
196# find a deposit using its id
197#
198# Arguments
199# id: id of the Deposit
200deposit(id: ID!): Deposit
201
202# return the full list of network parameters
203networkParameters: [NetworkParameter!]
204
205# returns information about nodes
206nodeData: NodeData
207
208# all known network nodes
209nodes: [Node!]
210
211# specific node in network
212#
213# Arguments
214# id: required id of node
215node(id: String!): Node
216
217# query for historic key rotations
218keyRotations(id: String): [KeyRotation!]
219
220# get data for a specific epoch, if id omitted it gets the current epoch. If the
221# string is 'next', fetch the next epoch
222epoch(id: String): Epoch!
223
224# get a list of all transfers for a pubkey
225#
226# Arguments
227# pubkey: the pubkey to look for
228# isFrom: is the pubkey on the sending part of the transfer
229# isTo: is the pubkey in the receiving part of the transfer
230transfers(pubkey: String!, isFrom: Boolean, isTo: Boolean): [Transfer!]
231
232# get statistics about the vega node
233statistics: Statistics!
234
235historicBalances(filter: AccountFilter, groupBy: [AccountField]): [AggregatedBalance!]!
236
237# Current network limits
238networkLimits: NetworkLimits
239
240# get market data history for a specific market. If no dates are given, the latest
241# snapshot will be returned. If only the start date is provided all history from
242# the given date will be provided, and if only the end date is provided, all
243# history from the start upto and including the end date will be provided.
244#
245# Arguments
246# start: Optional start date time for the historic data query.
247# If both the start and end date is not provided, only the latest snapshot will be
248# returned.
249# If only the start date is provided, all market data for the market from the
250# start date forward will be returned.
251# end: Optional end date time for the historic data query.
252# If both the start and end date is not provided, only the latest snapshot will be
253# returned.
254# If only the end date is provided, all market data for the market up to and
255# including the end date will be returned.
256# skip: Pagination skip
257# first: Pagination first element
258# last: Pagination last element
259getMarketDataHistoryByID(
260id: String!,
261start: Int,
262end: Int,
263skip: Int,
264first: Int,
265last: Int
266): [MarketData] @deprecated( reason: "Use getMarketDataHistoryConnectionByID instead" )
267
268# get market data history for a specific market. If no dates are given, the latest
269# snapshot will be returned. If only the start date is provided all history from
270# the given date will be provided, and if only the end date is provided, all
271# history from the start upto and including the end date will be provided.
272# Pagination is provided using a cursor based pagination model
273#
274# Arguments
275# start: Optional start date time for the historic data query.
276# If both the start and end date is not provided, only the latest snapshot will be
277# returned.
278# If only the start date is provided, all market data for the market from the
279# start date forward will be returned.
280# end: Optional end date time for the historic data query.
281# If both the start and end date is not provided, only the latest snapshot will be
282# returned.
283# If only the end date is provided, all market data for the market up to and
284# including the end date will be returned.
285# pagination: Optional Pagination
286getMarketDataHistoryConnectionByID(
287id: String!,
288start: Int,
289end: Int,
290pagination: Pagination
291): MarketDataConnection!
292
293}

link Required by

This element is not required by anyone