OBJECT

Mutation

Mutations are similar to GraphQL queries, however they allow a caller to change or mutate data.

link GraphQL Schema definition

1 type Mutation {
2
3 # Send a submit order request to be prepared, and returns a blob of the
4 # transaction to submit.
5 # The OrderSubmit data is validated. Price and expiration will be converted to
6 # uint64 internally.
7 #
8 # Arguments
9 # marketId: ID of the market to place the order
10 # price: Price of the asset
11 # size: Size of the order
12 # side: Side of the order (Buy or Sell)
13 # timeInForce: TimeInForce of the order
14 # expiration: expiration of the the order
15 # type: type of the order
16 # reference: client reference for the order
17 # peggedOrder: pegged order details
18 prepareOrderSubmit(
19 marketId: ID!,
20 price: String,
21 size: String!,
22 side: Side!,
23 timeInForce: OrderTimeInForce!,
24 expiration: String,
25 type: OrderType!,
26 reference: String,
27 peggedOrder: PeggedOrderInput
28 ): PreparedSubmitOrder!
29
30 # Send a cancel order request to be prepared. Returns a pending order + blob of
31 # the transaction to submit.
32 # The data is verified. The response can be signed and submitted through the
33 # submitTransaction mutation.
34 #
35 # Arguments
36 # id: ID of the order to cancel
37 # marketId: ID of the market where to find the order
38 prepareOrderCancel(id: ID, marketId: ID): PreparedCancelOrder!
39
40 # Send an amend order request to be prepared. Returns a pending order + blob of
41 # the transaction to submit.
42 # The data is verified. The response can be signed and submitted through the
43 # submitTransaction mutation.
44 #
45 # Arguments
46 # id: ID of the order to amend
47 # price: New price for this order
48 # sizeDelta: New size for this order
49 # expiration: New expiration time
50 # timeInForce: Time in force
51 # peggedReference: The reference point for pegged orders
52 # peggedOffset: The offset from the reference price for pegged
53 # orders
54 prepareOrderAmend(
55 id: ID!,
56 price: String!,
57 sizeDelta: String!,
58 expiration: String,
59 timeInForce: OrderTimeInForce!,
60 peggedReference: PeggedReference,
61 peggedOffset: String
62 ): PreparedAmendOrder!
63
64 # Prepare a proposal so it can be sent into the network.
65 # Returns a pending proposal along with a transaction blob ready for submission.
66 # The data is verified. The response can be signed and submitted through the
67 # submitTransaction mutation.
68 #
69 # Arguments
70 # partyId: ID of the party which created this proposal
71 # reference: A UUID reference for the caller to aid in tracking
72 # operations on VEGA
73 # proposalTerms: Terms of the proposal
74 prepareProposal(
75 partyId: ID!,
76 reference: String,
77 proposalTerms: ProposalTermsInput!
78 ): PreparedProposal!
79
80 # Prepare a vote so it can be signed and submitted.
81 # Returns a pending vote with a transaction blob for signing.
82 # No validation other than the vote value being correct is done.
83 #
84 # Arguments
85 # value: vote value
86 # partyId: the party casting the vote
87 # proposalId: the proposal voted on
88 prepareVote(value: VoteValue!, partyId: ID!, proposalId: ID!): PreparedVote!
89
90 # Prepare a withdrawal so it can be signed and submitted.
91 # Returns a pending withdrawSubmission with a transaction blob for signing.
92 #
93 # Arguments
94 # amount: The amount to be withdrawn
95 # asset: The asset from which we want to withdraw funds
96 # erc20Details: ERC20 specific details to process the withdrawal
97 # nullable as not required by all kind of withdrawals
98 prepareWithdrawal(
99 amount: String!,
100 asset: String!,
101 erc20Details: Erc20WithdrawalDetailsInput
102 ): PreparedWithdrawal!
103
104 # Submit a new, signed, transaction to the VEGA network. This transaction will not
105 # be executed immediately.
106 # It validates the signature, and sends the transaction out for consensus
107 #
108 # Arguments
109 # data: The signed transaction
110 # sig: The signature
111 # type: The way to send the transaction
112 submitTransaction(
113 data: String!,
114 sig: SignatureInput!,
115 type: SubmitTransactionType
116 ): TransactionSubmitted!
117
118 # Prepare a Liquidity provision order so it can be signed and submitted
119 #
120 # Arguments
121 # marketId: Market identifier for the order
122 # commitmentAmount: Specified as a unitless number that
123 # represents the amount of settlement asset of the market.
124 # fee: nominated liquidity fee factor, which is an input to the
125 # calculation of taker fees on the market, as per setting fees and rewarding
126 # liquidity providers.
127 # sells: a set of liquidity sell orders to meet the liquidity
128 # provision obligation, see MM orders spec.
129 # buys: a set of liquidity buy orders to meet the liquidity
130 # provision obligation, see MM orders spec.
131 # reference: A reference for the order created from this
132 # liquidity provision
133 prepareLiquidityProvision(
134 marketId: ID!,
135 commitmentAmount: Int!,
136 fee: String!,
137 sells: [LiquidityOrderInput!]!,
138 buys: [LiquidityOrderInput!]!,
139 reference: String
140 ): PreparedLiquidityProvision!
141
142 }

link Required by

This element is not required by anyone