Skip to main content
Version: mainnet (v0.72)

commands.proto

path vega/commands/v1/commands.proto

package vega.commands.v1


Messages

BatchMarketInstructions

Batch of order instructions. This command accepts only the following batches of commands and will be processed in the following order: - OrderCancellation - OrderAmendment - OrderSubmission The total amount of commands in the batch across all three lists of instructions is restricted by the following network parameter: "spam.protection.max.batchSize"

NameTypeDescription
cancellationsOrderCancellationList of order cancellations to be processed sequentially.
amendmentsOrderAmendmentList of order amendments to be processed sequentially.
submissionsOrderSubmissionList of order submissions to be processed sequentially.
stop_orders_cancellationStopOrdersCancellationList of stop order cancellations to be processed sequentially.
stop_orders_submissionStopOrdersSubmissionList of stop order submissions to be processed sequentially.

CancelTransfer

Request for cancelling a recurring transfer

NameTypeDescription
transfer_idstringTransfer ID of the transfer to cancel.

DelegateSubmission

Command to submit an instruction to delegate some stake to a node

NameTypeDescription
node_idstringDelegate to the specified node ID.
amountstringAmount of stake to delegate. This field is an unsigned integer scaled to the asset's decimal places.

IcebergOpts

Iceberg order options

NameTypeDescription
peak_sizeuint64Size of the order that is made visible and can be traded with during the execution of a single order.
minimum_visible_sizeuint64Minimum allowed remaining size of the order before it is replenished back to its peak size.

IssueSignatures

Transaction for a validator to submit signatures to a smart contract

NameTypeDescription
submitterstringEthereum address which will submit the signatures to the smart contract.
kindNodeSignatureKindWhat kind of signatures to generate, namely for whether a signer is being added or removed.
validator_node_idstringNode ID of the validator node that will be signed in or out of the smart contract. the node for which to emit the signatures.

LiquidityProvisionAmendment

Amend a liquidity provision request

NameTypeDescription
market_idstringUnique ID for the market with the liquidity provision to be amended.
commitment_amountstringFrom here at least one of the following is required to consider the command valid. empty strings means no change
feestringempty strings means no change
sellsvega.LiquidityOrderempty slice means no change
buysvega.LiquidityOrderempty slice means no change
referencestringempty string means no change

LiquidityProvisionCancellation

Cancel a liquidity provision request

NameTypeDescription
market_idstringUnique ID for the market with the liquidity provision to be cancelled.

LiquidityProvisionSubmission

A liquidity provision submitted for a given market

NameTypeDescription
market_idstringMarket ID for the order.
commitment_amountstringSpecified as a unitless number that represents the amount of settlement asset of the market. This field is an unsigned integer scaled using the asset's decimal places.
feestringNominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per setting fees and rewarding liquidity providers.
sellsvega.LiquidityOrderSet of liquidity sell orders to meet the liquidity provision obligation.
buysvega.LiquidityOrderSet of liquidity buy orders to meet the liquidity provision obligation.
referencestringReference to be added to every order created out of this liquidity provision submission.

OneOffTransfer

Specific details for a one off transfer

NameTypeDescription
deliver_onint64Timestamp in Unix nanoseconds for when the transfer should be delivered into the receiver's account.

OrderAmendment

An order amendment is a request to amend or update an existing order on Vega The `orderID` and `marketID` fields are used for looking up the order only and cannot be amended by this command.

NameTypeDescription
order_idstringOrder ID, this is required to find the order and will not be updated, required field.
market_idstringMarket ID, this is required to find the order and will not be updated.
pricestringAmend the price for the order if the price value is set, otherwise price will remain unchanged. This field is an unsigned integer scaled to the market's decimal places.
size_deltaint64Amend the size for the order by the delta specified: - To reduce the size from the current value set a negative integer value - To increase the size from the current value, set a positive integer value - To leave the size unchanged set a value of zero This field needs to be scaled using the market's position decimal places.
expires_atint64Amend the expiry time for the order, if the Timestamp value is set, otherwise expiry time will remain unchanged.
time_in_forcevega.Order.TimeInForceAmend the time in force for the order, set to TIME_IN_FORCE_UNSPECIFIED to remain unchanged.
pegged_offsetstringAmend the pegged order offset for the order. This field is an unsigned integer scaled to the market's decimal places.
pegged_referencevega.PeggedReferenceAmend the pegged order reference for the order.

OrderCancellation

Order cancellation is a request to cancel an existing order on Vega

NameTypeDescription
order_idstringUnique ID for the order. This is set by the system after consensus. Required field.
market_idstringMarket ID for the order, required field.

OrderSubmission

Order submission is a request to submit or create a new order on Vega

NameTypeDescription
market_idstringMarket ID for the order, required field.
pricestringPrice for the order, the price is an integer, for example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places, required field for limit orders, however it is not required for market orders. This field is an unsigned integer scaled to the market's decimal places.
sizeuint64Size for the order, for example, in a futures market the size equals the number of units, cannot be negative.
sidevega.SideSide for the order, e.g. SIDE_BUY or SIDE_SELL, required field.
time_in_forcevega.Order.TimeInForceTime in force indicates how long an order will remain active before it is executed or expires, required field.
expires_atint64Timestamp in Unix nanoseconds for when the order will expire, required field only for `Order.TimeInForce`.TIME_IN_FORCE_GTT`.
typevega.Order.TypeType for the order, required field - See `Order.Type`.
referencestringReference given for the order, this is typically used to retrieve an order submitted through consensus, currently set internally by the node to return a unique reference ID for the order submission.
pegged_ordervega.PeggedOrderUsed to specify the details for a pegged order.
post_onlyboolOnly valid for Limit orders. Cannot be True at the same time as Reduce-Only.
reduce_onlyboolOnly valid for Non-Persistent orders. Cannot be True at the same time as Post-Only. If set, order will only be executed if the outcome of the trade moves the trader's position closer to 0.
iceberg_optsIcebergOptsParameters used to specify an iceberg order.

ProposalSubmission

Command to submit a new proposal for the Vega network governance

NameTypeDescription
referencestringReference identifying the proposal.
termsvega.ProposalTermsProposal configuration and the actual change that is meant to be executed when proposal is enacted.
rationalevega.ProposalRationaleRationale behind a proposal.

RecurringTransfer

Specific details for a recurring transfer

NameTypeDescription
start_epochuint64First epoch from which this transfer shall be paid.
end_epochuint64Last epoch at which this transfer shall be paid.
factorstringFactor needs to be > 0.
dispatch_strategyvega.DispatchStrategyOptional parameter defining how a transfer is dispatched.

StopOrderSetup

Price and expiry configuration for a stop order

NameTypeDescription
order_submissionOrderSubmissionOrder to be submitted once the trigger is breached.
expires_atint64Optional expiry timestamp.
expiry_strategyvega.StopOrder.ExpiryStrategyStrategy to adopt if the expiry time is reached.
pricestringFixed price at which the order will be submitted.
trailing_percent_offsetstringTrailing percentage at which the order will be submitted.

StopOrdersCancellation

Cancel a stop order. The following combinations are available: Empty object will cancel all stop orders for the party Market ID alone will cancel all stop orders in a market Market ID and order ID will cancel a specific stop order in a market If the stop order is part of an OCO, both stop orders will be cancelled

NameTypeDescription
market_idstringOptional market ID.
stop_order_idstringOptional order ID.

StopOrdersSubmission

Stop order submission submits stops orders. It is possible to make a single stop order submission by specifying a single direction, or an OCO (One Cancels the Other) stop order submission by specifying a configuration for both directions

NameTypeDescription
rises_aboveStopOrderSetupStop order that will be triggered if the price rises above a given trigger price.
falls_belowStopOrderSetupStop order that will be triggered if the price falls below a given trigger price.

Transfer

Transfer initiated by a party

NameTypeDescription
from_account_typevega.AccountTypeAccount type from which the funds of the party should be taken.
tostringPublic key of the destination account.
to_account_typevega.AccountTypeType of the destination account.
assetstringAsset ID of the asset to be transferred.
amountstringAmount to be taken from the source account. This field is an unsigned integer scaled to the asset's decimal places.
referencestringReference to be attached to the transfer.
one_offOneOffTransfer
recurringRecurringTransfer

UndelegateSubmission

NameTypeDescription
node_idstringNode ID to delegate to.
amountstringOptional, if not specified = ALL. If provided, this field must be an unsigned integer passed as a string and needs to be scaled using the asset decimal places for the token.
methodUndelegateSubmission.MethodMethod of delegation.

VoteSubmission

Command to submit a new vote for a governance proposal.

NameTypeDescription
proposal_idstringSubmit vote for the specified proposal ID.
valuevega.Vote.ValueActual value of the vote.

WithdrawSubmission

Represents the submission request to withdraw funds for a party on Vega

NameTypeDescription
amountstringAmount to be withdrawn. This field is an unsigned integer scaled to the asset's decimal places.
assetstringAsset to be withdrawn.
extvega.WithdrawExtForeign chain specifics.

Enums

UndelegateSubmission.Method

NameNumberDescription
METHOD_UNSPECIFIED0
METHOD_NOW1
METHOD_AT_END_OF_EPOCH2