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"
Name | Type | Description |
---|---|---|
cancellations | OrderCancellation | List of order cancellations to be processed sequentially. |
amendments | OrderAmendment | List of order amendments to be processed sequentially. |
submissions | OrderSubmission | List of order submissions to be processed sequentially. |
stop_orders_cancellation | StopOrdersCancellation | List of stop order cancellations to be processed sequentially. |
stop_orders_submission | StopOrdersSubmission | List of stop order submissions to be processed sequentially. |
CancelTransfer
Request for cancelling a recurring transfer
Name | Type | Description |
---|---|---|
transfer_id | string | Transfer ID of the transfer to cancel. |
DelegateSubmission
Command to submit an instruction to delegate some stake to a node
Name | Type | Description |
---|---|---|
node_id | string | Delegate to the specified node ID. |
amount | string | Amount of stake to delegate. This field is an unsigned integer scaled to the asset's decimal places. |
IcebergOpts
Iceberg order options
Name | Type | Description |
---|---|---|
peak_size | uint64 | Size of the order that is made visible and can be traded with during the execution of a single order. |
minimum_visible_size | uint64 | Minimum 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
Name | Type | Description |
---|---|---|
submitter | string | Ethereum address which will submit the signatures to the smart contract. |
kind | NodeSignatureKind | What kind of signatures to generate, namely for whether a signer is being added or removed. |
validator_node_id | string | Node 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
Name | Type | Description |
---|---|---|
market_id | string | Unique ID for the market with the liquidity provision to be amended. |
commitment_amount | string | From here at least one of the following is required to consider the command valid. empty strings means no change |
fee | string | empty strings means no change |
sells | vega.LiquidityOrder | empty slice means no change |
buys | vega.LiquidityOrder | empty slice means no change |
reference | string | empty string means no change |
LiquidityProvisionCancellation
Cancel a liquidity provision request
Name | Type | Description |
---|---|---|
market_id | string | Unique ID for the market with the liquidity provision to be cancelled. |
LiquidityProvisionSubmission
A liquidity provision submitted for a given market
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the order. |
commitment_amount | string | Specified 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. |
fee | string | Nominated liquidity fee factor, which is an input to the calculation of taker fees on the market, as per setting fees and rewarding liquidity providers. |
sells | vega.LiquidityOrder | Set of liquidity sell orders to meet the liquidity provision obligation. |
buys | vega.LiquidityOrder | Set of liquidity buy orders to meet the liquidity provision obligation. |
reference | string | Reference to be added to every order created out of this liquidity provision submission. |
OneOffTransfer
Specific details for a one off transfer
Name | Type | Description |
---|---|---|
deliver_on | int64 | Timestamp 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.
Name | Type | Description |
---|---|---|
order_id | string | Order ID, this is required to find the order and will not be updated, required field. |
market_id | string | Market ID, this is required to find the order and will not be updated. |
price | string | Amend 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_delta | int64 | Amend 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_at | int64 | Amend the expiry time for the order, if the Timestamp value is set, otherwise expiry time will remain unchanged. |
time_in_force | vega.Order.TimeInForce | Amend the time in force for the order, set to TIME_IN_FORCE_UNSPECIFIED to remain unchanged. |
pegged_offset | string | Amend the pegged order offset for the order. This field is an unsigned integer scaled to the market's decimal places. |
pegged_reference | vega.PeggedReference | Amend the pegged order reference for the order. |
OrderCancellation
Order cancellation is a request to cancel an existing order on Vega
Name | Type | Description |
---|---|---|
order_id | string | Unique ID for the order. This is set by the system after consensus. Required field. |
market_id | string | Market ID for the order, required field. |
OrderSubmission
Order submission is a request to submit or create a new order on Vega
Name | Type | Description |
---|---|---|
market_id | string | Market ID for the order, required field. |
price | string | Price 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. |
size | uint64 | Size for the order, for example, in a futures market the size equals the number of units, cannot be negative. |
side | vega.Side | Side for the order, e.g. SIDE_BUY or SIDE_SELL, required field. |
time_in_force | vega.Order.TimeInForce | Time in force indicates how long an order will remain active before it is executed or expires, required field. |
expires_at | int64 | Timestamp in Unix nanoseconds for when the order will expire, required field only for `Order.TimeInForce`.TIME_IN_FORCE_GTT`. |
type | vega.Order.Type | Type for the order, required field - See `Order.Type`. |
reference | string | Reference 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_order | vega.PeggedOrder | Used to specify the details for a pegged order. |
post_only | bool | Only valid for Limit orders. Cannot be True at the same time as Reduce-Only. |
reduce_only | bool | Only 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_opts | IcebergOpts | Parameters used to specify an iceberg order. |
ProposalSubmission
Command to submit a new proposal for the Vega network governance
Name | Type | Description |
---|---|---|
reference | string | Reference identifying the proposal. |
terms | vega.ProposalTerms | Proposal configuration and the actual change that is meant to be executed when proposal is enacted. |
rationale | vega.ProposalRationale | Rationale behind a proposal. |
RecurringTransfer
Specific details for a recurring transfer
Name | Type | Description |
---|---|---|
start_epoch | uint64 | First epoch from which this transfer shall be paid. |
end_epoch | uint64 | Last epoch at which this transfer shall be paid. |
factor | string | Factor needs to be > 0. |
dispatch_strategy | vega.DispatchStrategy | Optional parameter defining how a transfer is dispatched. |
StopOrderSetup
Price and expiry configuration for a stop order
Name | Type | Description |
---|---|---|
order_submission | OrderSubmission | Order to be submitted once the trigger is breached. |
expires_at | int64 | Optional expiry timestamp. |
expiry_strategy | vega.StopOrder.ExpiryStrategy | Strategy to adopt if the expiry time is reached. |
price | string | Fixed price at which the order will be submitted. |
trailing_percent_offset | string | Trailing 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
Name | Type | Description |
---|---|---|
market_id | string | Optional market ID. |
stop_order_id | string | Optional 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
Name | Type | Description |
---|---|---|
rises_above | StopOrderSetup | Stop order that will be triggered if the price rises above a given trigger price. |
falls_below | StopOrderSetup | Stop order that will be triggered if the price falls below a given trigger price. |
Transfer
Transfer initiated by a party
Name | Type | Description |
---|---|---|
from_account_type | vega.AccountType | Account type from which the funds of the party should be taken. |
to | string | Public key of the destination account. |
to_account_type | vega.AccountType | Type of the destination account. |
asset | string | Asset ID of the asset to be transferred. |
amount | string | Amount to be taken from the source account. This field is an unsigned integer scaled to the asset's decimal places. |
reference | string | Reference to be attached to the transfer. |
one_off | OneOffTransfer | |
recurring | RecurringTransfer |
UndelegateSubmission
Name | Type | Description |
---|---|---|
node_id | string | Node ID to delegate to. |
amount | string | Optional, 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. |
method | UndelegateSubmission.Method | Method of delegation. |
VoteSubmission
Command to submit a new vote for a governance proposal.
Name | Type | Description |
---|---|---|
proposal_id | string | Submit vote for the specified proposal ID. |
value | vega.Vote.Value | Actual value of the vote. |
WithdrawSubmission
Represents the submission request to withdraw funds for a party on Vega
Name | Type | Description |
---|---|---|
amount | string | Amount to be withdrawn. This field is an unsigned integer scaled to the asset's decimal places. |
asset | string | Asset to be withdrawn. |
ext | vega.WithdrawExt | Foreign chain specifics. |
Enums
UndelegateSubmission.Method
Name | Number | Description |
---|---|---|
METHOD_UNSPECIFIED | 0 | |
METHOD_NOW | 1 | |
METHOD_AT_END_OF_EPOCH | 2 |